diff options
author | Thomas Wiest <twiest@redhat.com> | 2017-01-29 16:01:49 -0500 |
---|---|---|
committer | Thomas Wiest <twiest@redhat.com> | 2017-01-30 13:49:26 -0500 |
commit | 58b40ef07005076357800daf47c83984adab2567 (patch) | |
tree | 278708655a2e7672ffd0487af3e179321a8ba7ce /roles/lib_openshift/src/ansible/oc_serviceaccount.py | |
parent | 8c7ccc601cab2f84a1fa3af9f4c1278dab96daf5 (diff) | |
download | openshift-58b40ef07005076357800daf47c83984adab2567.tar.gz openshift-58b40ef07005076357800daf47c83984adab2567.tar.bz2 openshift-58b40ef07005076357800daf47c83984adab2567.tar.xz openshift-58b40ef07005076357800daf47c83984adab2567.zip |
Added oc_serviceaccount to lib_openshift.
Diffstat (limited to 'roles/lib_openshift/src/ansible/oc_serviceaccount.py')
-rw-r--r-- | roles/lib_openshift/src/ansible/oc_serviceaccount.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/roles/lib_openshift/src/ansible/oc_serviceaccount.py b/roles/lib_openshift/src/ansible/oc_serviceaccount.py new file mode 100644 index 000000000..ea9bdb455 --- /dev/null +++ b/roles/lib_openshift/src/ansible/oc_serviceaccount.py @@ -0,0 +1,30 @@ +# pylint: skip-file +# flake8: noqa + +def main(): + ''' + ansible oc module for route + ''' + + 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'), + name=dict(default=None, required=True, type='str'), + namespace=dict(default=None, required=True, type='str'), + secrets=dict(default=None, type='list'), + image_pull_secrets=dict(default=None, type='list'), + ), + supports_check_mode=True, + ) + + rval = OCServiceAccount.run_ansible(module.params, module.check_mode) + if 'failed' in rval: + module.fail_json(**rval) + + module.exit_json(**rval) + +if __name__ == '__main__': + main() |