You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
753 B
Python
37 lines
753 B
Python
#!/usr/bin/env python
|
|
|
|
DOCUMENTATION = '''
|
|
module: mitogen_plain_old_add
|
|
options:
|
|
x: {type: int, required: true}
|
|
y: {type: int, required: true}
|
|
author:
|
|
- Alex Willmer (@moreati)
|
|
'''
|
|
|
|
RETURN = '''
|
|
total: {type: int, returned: always, sample: 42}
|
|
'''
|
|
|
|
from ansible.module_utils.basic import AnsibleModule
|
|
|
|
import plain_old_module
|
|
|
|
def main():
|
|
module = AnsibleModule(
|
|
argument_spec={
|
|
'x': {'type': int, 'required': True},
|
|
'x': {'type': int, 'required': True},
|
|
},
|
|
supports_check_mode=True,
|
|
)
|
|
result = {
|
|
'changed': False,
|
|
'total': plain_old_module.add(module.params['x'], module.params['y']),
|
|
}
|
|
module.exit_json(**result)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|