Library contains the directories that will be searched for modules. If Ansible was installed on a Red Hat system using pip, library should contain the following directories.
/home/john.doe/.ansible/plugins/modules /usr/share/ansible/plugins/modules /usr/local/lib/python3.6/site-packages/ansible/modules
You can temporarily append directories to library using the ANSIBLE_LIBRARY environment variable. In this example, the /tmp directory is appended.
And then you can echo the ANSIBLE_LIBRARY environment variable to confirm that the /tmp directory was appended.
~]# echo $ANSIBLE_LIBRARY /home/john.doe/.ansible/plugins/modules:/usr/share/ansible/plugins/modules:/usr/local/lib/python3.6/site-packages/ansible/modules:/tmp
You can permanently append one or more library directory in the main ansible.cfg file.
library = /usr/local/ansible/collections/ansible_collections/ansible/posix