Last active
April 26, 2017 19:02
-
-
Save elnygren/66f98e2cfd743aa043dc553524265608 to your computer and use it in GitHub Desktop.
Minimum Viable Ansible Module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from ansible.module_utils.basic import * | |
| module = AnsibleModule( | |
| argument_spec=dict( | |
| state=dict(choices=['present', 'absent'], default='present'), | |
| ) | |
| ) | |
| # do something fancy here | |
| module.exit_json(changed=True, msg='it was a great success') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment