Python 如何在ansible.cfg文件中添加多个库路径

Python 如何在ansible.cfg文件中添加多个库路径,python,ansible,library-path,Python,Ansible,Library Path,我已经使用pip安装了凝固汽油弹ansible,现在正在尝试将凝固汽油弹ansible库路径添加到我的ansible.cfg文件中 root@usvr-1804:/home/labadmin# napalm-ansible To ensure Ansible can use the NAPALM modules you will have to add the following configurtion to your Ansible configuration file (ansible.c

我已经使用pip安装了凝固汽油弹ansible,现在正在尝试将凝固汽油弹ansible库路径添加到我的ansible.cfg文件中

root@usvr-1804:/home/labadmin# napalm-ansible
To ensure Ansible can use the NAPALM modules you will have
to add the following configurtion to your Ansible configuration
file (ansible.cfg):

[defaults]
library = /usr/local/lib/python2.7/dist-packages/napalm_ansible/modules
action_plugins = /usr/local/lib/python2.7/dist 
packages/napalm_ansible/plugins/action
但是我的ansible.cfg文件已经有一个库路径

root@usvr-1804:/home/labadmin# cat ansible.cfg

[defaults]
inventory = ./hosts
library = /etc/ansible/roles/PaloAltoNetworks.paloaltonetworks
host_key_checking = false
timeout = 5
log_path = /var/log/ansible.log
roles_path = /etc/ansible/roles
如何将第二个库路径添加到ansible.cfg文件中。谢谢

转到,找到正确的参数:

以冒号分隔的路径,Ansible将在其中搜索模块

然后相应地配置:

library = /etc/ansible/roles/PaloAltoNetworks.paloaltonetworks:/usr/local/lib/python2.7/dist-packages/napalm_ansible/modules

您可以在
参数中放置任意多个路径,只需在每个路径之间放置一个冒号()


谢谢大家的回答
library = /foo/bar:/foo/baz