Working on complex argument support.

reviewable/pr18780/r1
Michael DeHaan 12 years ago
parent 711bc4db05
commit fba1d755d6

@ -36,10 +36,15 @@ author: Michael DeHaan
def main():
module = AnsibleModule(
argument_spec = dict(),
argument_spec = dict(
data=dict(required=False, default=None),
),
supports_check_mode = True
)
module.exit_json(ping='pong')
result = dict(ping='pong')
if module.params['data']:
result['ping'] = module.params['data']
module.exit_json(**result)
# this is magic, see lib/ansible/module_common.py
#<<INCLUDE_ANSIBLE_MODULE_COMMON>>

Loading…
Cancel
Save