summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/src/ansible/oc_version.py
blob: 57ef849ca6a687e30923ceb34f1d2b06b8ddc74b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# pylint: skip-file
# flake8: noqa

def main():
    ''' ansible oc module for version '''

    module = AnsibleModule(
        argument_spec=dict(
            kubeconfig=dict(default='/etc/origin/master/admin.kubeconfig', type='str'),
            state=dict(default='list', type='str',
                       choices=['list']),
            debug=dict(default=False, type='bool'),
        ),
        supports_check_mode=True,
    )

    rval = OCVersion.run_ansible(module.params)
    if 'failed' in rval:
        module.fail_json(**rval)


    module.exit_json(**rval)


if __name__ == '__main__':
    main()