1 2 3 4 5 6 7 8 9 10 11 12 13 14
from ansible.module_utils.basic import * def main(): spec = { 'msg' : { 'required': True, 'type': 'str' } } module = AnsibleModule(argument_spec=spec) module.exit_json(changed=False, warnings=[ module.params['msg'] ]) if __name__ == '__main__': main()