In this section, you will learn about Ansible modules and writing an Ansible module with Python.
Writing Ansible modules with Python
Introduction to Ansible modules
Ansible has an extensible and modular architecture in functionalities which are organized by modules. You can use modules directly with playbooks or through ad-hoc commands.
Ansible modules are small pieces of code that perform one function (copying a file, or starting or stopping a daemon, for instance). Ansible comes packaged with about 1,000 modules for all sorts of use cases. You can also extend it with your own modules and roles. Check out the modules list: https://docs.ansible.com/ansible/latest/modules/list_of_all_modules.html.
For example, the ping module...