December 2017
Intermediate to advanced
364 pages
7h 30m
English
Here are some snippets of the source code that we will work with to write our module. We have already discussed the metadata and documentation parts. We also need to write docstrings for examples and what the module will be returning.
Our imports—we can import all the modules we need for our module here:
from ansible.module_utils.basic import AnsibleModule
The main code block—inside the function run_module we work and do the following:
def run_module(): # define the available arguments/parameters that a user can pass to # the module module_args = ...
Read now
Unlock full access