summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2017-03-21 12:24:50 -0400
committerKenny Woodson <kwoodson@redhat.com>2017-03-21 12:24:50 -0400
commit5e06d9e3b4289be02dfd7a4d61366db95dfc0691 (patch)
tree4fb6e9273b404e2ee580520b65ae29bae252c285 /roles
parent873ec7cda3edb0f8f479da257de168976e386f77 (diff)
downloadopenshift-5e06d9e3b4289be02dfd7a4d61366db95dfc0691.tar.gz
openshift-5e06d9e3b4289be02dfd7a4d61366db95dfc0691.tar.bz2
openshift-5e06d9e3b4289be02dfd7a4d61366db95dfc0691.tar.xz
openshift-5e06d9e3b4289be02dfd7a4d61366db95dfc0691.zip
Fixed doc. Updated test to change existing key. Updated module spec for required name param.
Diffstat (limited to 'roles')
-rw-r--r--roles/lib_openshift/library/oc_configmap.py6
-rw-r--r--roles/lib_openshift/src/ansible/oc_configmap.py2
-rw-r--r--roles/lib_openshift/src/doc/configmap4
-rwxr-xr-xroles/lib_openshift/src/test/integration/oc_configmap.yml3
4 files changed, 8 insertions, 7 deletions
diff --git a/roles/lib_openshift/library/oc_configmap.py b/roles/lib_openshift/library/oc_configmap.py
index 4f5e5e7d8..0b6f1adf8 100644
--- a/roles/lib_openshift/library/oc_configmap.py
+++ b/roles/lib_openshift/library/oc_configmap.py
@@ -84,14 +84,14 @@ options:
name:
description:
- Name of the object that is being queried.
- required: false
+ required: True
default: None
aliases: []
namespace:
description:
- The namespace where the object lives.
required: false
- default: str
+ default: default
aliases: []
from_file:
description:
@@ -1553,7 +1553,7 @@ def main():
choices=['present', 'absent', 'list']),
debug=dict(default=False, type='bool'),
namespace=dict(default='default', type='str'),
- name=dict(default=None, type='str'),
+ name=dict(default=None, required=True, type='str'),
from_file=dict(default=None, type='dict'),
from_literal=dict(default=None, type='dict'),
),
diff --git a/roles/lib_openshift/src/ansible/oc_configmap.py b/roles/lib_openshift/src/ansible/oc_configmap.py
index 659e5cb8d..974f72499 100644
--- a/roles/lib_openshift/src/ansible/oc_configmap.py
+++ b/roles/lib_openshift/src/ansible/oc_configmap.py
@@ -14,7 +14,7 @@ def main():
choices=['present', 'absent', 'list']),
debug=dict(default=False, type='bool'),
namespace=dict(default='default', type='str'),
- name=dict(default=None, type='str'),
+ name=dict(default=None, required=True, type='str'),
from_file=dict(default=None, type='dict'),
from_literal=dict(default=None, type='dict'),
),
diff --git a/roles/lib_openshift/src/doc/configmap b/roles/lib_openshift/src/doc/configmap
index 8ac4a5629..5ca8292c4 100644
--- a/roles/lib_openshift/src/doc/configmap
+++ b/roles/lib_openshift/src/doc/configmap
@@ -33,14 +33,14 @@ options:
name:
description:
- Name of the object that is being queried.
- required: false
+ required: True
default: None
aliases: []
namespace:
description:
- The namespace where the object lives.
required: false
- default: str
+ default: default
aliases: []
from_file:
description:
diff --git a/roles/lib_openshift/src/test/integration/oc_configmap.yml b/roles/lib_openshift/src/test/integration/oc_configmap.yml
index 7e37e7fd3..9153830aa 100755
--- a/roles/lib_openshift/src/test/integration/oc_configmap.yml
+++ b/roles/lib_openshift/src/test/integration/oc_configmap.yml
@@ -54,7 +54,7 @@
from_file:
config: "{{ filename }}"
from_literal:
- foo: bar
+ foo: notbar
deployment_type: online
- name: fetch the updated configmap
@@ -71,6 +71,7 @@
that:
- cmout.results.results[0].metadata.name == 'configmaptest'
- cmout.results.results[0].data.deployment_type == 'online'
+ - cmout.results.results[0].data.foo == 'notbar'
###### end create test ###########
###### delete test ###########