12.1 Ansible Module Development - Basics
In this lab we are going to learn how Ansible uses modules and where to find information about developing a custom module.
Task 1
- In which language has a module to be written?
- Point your webbrowser to the official documentation about Ansible module architecture.
- Point your webbrowser to the official documentation about developing modules.
- Point your webbrowser to the official documentation about developing modules best practices.
- Point your webbrowser to the official documentation about developing collections.
- Point your webbrowser to the official documentation about debugging your module.
- Which environment variable lets you keep the remote module files after executing the module (instead of deleting it)?
Solution Task 1
- either Pyhon (Linux) or Powershell (Windows)
- https://docs.ansible.com/ansible/latest/dev_guide/developing_program_flow_modules.html
- https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html
- https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_best_practices.html#developing-modules-best-practices
- https://docs.ansible.com/ansible/latest/dev_guide/developing_collections.html#developing-collections
- https://docs.ansible.com/ansible/latest/dev_guide/debugging.html#debugging-modules
ANSIBLE_KEEP_REMOTE_FILES
All done?
- Ansible module development on YouTube
- Have a look at the Puzzle OPNsense Ansible Collection
Last modified June 11, 2025: Merge pull request #234 from puzzle/feature/module-development (6deff64)