Modules are each item in a task that carries out a particular command, this can be for anything such as:
System management
Running commands
Managing files
Each module is a set of python script(s) to perform a particular action - this leads to the potential problem of "what if there is no ready-made solution?"
For any custom plugins, one must develop a custom python script to support it. This can then be stored in the project and referred to via an environment variable, or stored alongside other ansible modules downloaded.
Example:
AnsibleModule helps parse arguments
Initiated by providing an argument_spec, a spec outlining how arguments should be provided to the module in a playbook, specifying parameters such as:
Type
Required (Boolean)
module.params['argname'] then passes the arguments into the code for usage