summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/src/ansible
diff options
context:
space:
mode:
authorThomas Wiest <twiest@users.noreply.github.com>2017-02-06 17:12:24 -0500
committerGitHub <noreply@github.com>2017-02-06 17:12:24 -0500
commite0a074962abfdaadd177e90c56d186c13d814609 (patch)
tree6b47b62fab751b4007c6627bedc6b362bd1f468b /roles/lib_openshift/src/ansible
parent41ff6013a19c77fdc35adcf58ad523069f20ee2f (diff)
parentd508ec24877a743c6d79dac0574c859e14d40218 (diff)
downloadopenshift-e0a074962abfdaadd177e90c56d186c13d814609.tar.gz
openshift-e0a074962abfdaadd177e90c56d186c13d814609.tar.bz2
openshift-e0a074962abfdaadd177e90c56d186c13d814609.tar.xz
openshift-e0a074962abfdaadd177e90c56d186c13d814609.zip
Merge pull request #3264 from twiest/oc_serviceaccount_secret
Added oc_serviceaccount_secret to lib_openshift.
Diffstat (limited to 'roles/lib_openshift/src/ansible')
-rw-r--r--roles/lib_openshift/src/ansible/oc_serviceaccount.py2
-rw-r--r--roles/lib_openshift/src/ansible/oc_serviceaccount_secret.py29
2 files changed, 30 insertions, 1 deletions
diff --git a/roles/lib_openshift/src/ansible/oc_serviceaccount.py b/roles/lib_openshift/src/ansible/oc_serviceaccount.py
index ea9bdb455..bc9332f9a 100644
--- a/roles/lib_openshift/src/ansible/oc_serviceaccount.py
+++ b/roles/lib_openshift/src/ansible/oc_serviceaccount.py
@@ -3,7 +3,7 @@
def main():
'''
- ansible oc module for route
+ ansible oc module for service accounts
'''
module = AnsibleModule(
diff --git a/roles/lib_openshift/src/ansible/oc_serviceaccount_secret.py b/roles/lib_openshift/src/ansible/oc_serviceaccount_secret.py
new file mode 100644
index 000000000..554d9a6a2
--- /dev/null
+++ b/roles/lib_openshift/src/ansible/oc_serviceaccount_secret.py
@@ -0,0 +1,29 @@
+# pylint: skip-file
+# flake8: noqa
+
+def main():
+ '''
+ ansible oc module to manage service account secrets.
+ '''
+
+ module = AnsibleModule(
+ argument_spec=dict(
+ kubeconfig=dict(default='/etc/origin/master/admin.kubeconfig', type='str'),
+ state=dict(default='present', type='str',
+ choices=['present', 'absent', 'list']),
+ debug=dict(default=False, type='bool'),
+ namespace=dict(default=None, required=True, type='str'),
+ secret=dict(default=None, type='str'),
+ service_account=dict(required=True, type='str'),
+ ),
+ supports_check_mode=True,
+ )
+
+ rval = OCServiceAccountSecret.run_ansible(module.params, module.check_mode)
+ if 'failed' in rval:
+ module.fail_json(**rval)
+
+ module.exit_json(**rval)
+
+if __name__ == '__main__':
+ main()