Skip to content

Commit

Permalink
changing variable names. Added discover state
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth D. Evensen committed Sep 5, 2017
1 parent 12c8cfa commit 4c3b286
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions library/oc.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,22 +382,23 @@ def main():

module = AnsibleModule(
argument_spec=dict(
host=dict(type='str', default='127.0.0.1'),
port=dict(type='int', default=8443),
apihost=dict(type='str', default='127.0.0.1'),
apiport=dict(type='int', default=8443),
definition=dict(aliases=['def', 'inline'],
type='dict'),
kind=dict(type='str'),
name=dict(type='str'),
namespace=dict(type='str'),
token=dict(required=True, type='str', no_log=True),
state=dict(required=True,
choices=['present', 'absent']),
choices=['present', 'absent', 'describe']),
validate_certs=dict(type='bool', default='yes')
),
mutually_exclusive=(['kind', 'definition'],
['name', 'definition'],
['namespace', 'definition']),
required_if=([['state', 'absent', ['kind']]]),
required_if=([['state', 'absent', ['kind']],
['state', 'describe', ['kind']]]),
required_one_of=([['kind', 'definition']]),
no_log=False,
supports_check_mode=True
Expand All @@ -407,8 +408,8 @@ def main():
name = None
namespace = None

host = module.params['host']
port = module.params['port']
host = module.params['apihost']
port = module.params['apiport']
definition = module.params['definition']
state = module.params['state']
kind = module.params['kind']
Expand Down Expand Up @@ -455,6 +456,9 @@ def main():
else:
changed = True
result = definition
elif state == 'describe' and exists:
method = 'describe'
result, changed = oc.get(resource)

facts = {}

Expand Down

0 comments on commit 4c3b286

Please sign in to comment.