I created my first module using your python boilerplates. How do I get my
Ansible Playbook to find it? According to the docs, I placed it in
./library/env_checks.py but I still get "ERROR: enviro_checks_ansmodule is
not a legal parameter in an Ansible task or handler" What steps am I
missing?
Playbook code
- hosts: myhosts
tasks:
- env_checks:
Module Code:
def main():
module = AnsibleModule(
argument_spec = dict(
state = dict(default='present', choices=['present',
'absent'])
)
)
module.exit_json(changed=True, otherthing=False)
from ansible.module_utils.basic import *
if __name__ == '__main__':
main()
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/4218c49b-2bbb-4cfa-8dd3-9e55f651d55c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.