Working on complex argument support.
This commit is contained in:
parent
711bc4db05
commit
fba1d755d6
1 changed files with 7 additions and 2 deletions
9
ping
9
ping
|
@ -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…
Reference in a new issue