Bootstrap FreeKB - Ansible - module_utils
Ansible - module_utils

Updated:   |  Ansible articles

By default, module_utils in ansible.cfg is commented out, like this.

#module_utils = /usr/share/my_module_utils/

 

Typically, the module_utils directory exists in the base Ansible directory (the same directory that contains ansible.cfg), like this.

/etc/ansible/ansible.cfg
/etc/ansible/module_utils

 

However, I observed that this directory did not exist when installing Ansible using PIP. Instead, the module_utils directory was below the "ansible python module location" directory which can be seen using the ansible --version command.

~]# ansible --version
  ansible python module location = /usr/local/lib/python3.6/site-packages/ansible

 

In this scenario, it probably makes sense to update ansible.cfg to point to the module_utils directory, like this.

module_utils = /usr/local/lib/python3.6/site-packages/ansible/module_utils/

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter af6135 in the box below so that we can be sure you are a human.