我已经使用 pip 安装了 napalm-ansible,现在尝试将 napalm-ansible 库路径添加到我的 ansible.cfg 文件中。root@usvr-1804:/home/labadmin# napalm-ansibleTo ensure Ansible can use the NAPALM modules you will haveto add the following configurtion to your Ansible configurationfile (ansible.cfg):[defaults]library = /usr/local/lib/python2.7/dist-packages/napalm_ansible/modulesaction_plugins = /usr/local/lib/python2.7/dist packages/napalm_ansible/plugins/action但是我的 ansible.cfg 文件已经有一个库路径。root@usvr-1804:/home/labadmin# cat ansible.cfg[defaults]inventory = ./hostslibrary = /etc/ansible/roles/PaloAltoNetworks.paloaltonetworkshost_key_checking = falsetimeout = 5log_path = /var/log/ansible.logroles_path = /etc/ansible/roles如何向 ansible.cfg 文件添加第二个库路径。谢谢
2 回答
江户川乱折腾
TA贡献1851条经验 获得超5个赞
转到Ansible 配置设置的文档 ,找到正确的参数library
:
library
Ansible 将在其中搜索模块的冒号分隔路径。
然后相应地配置:
library = /etc/ansible/roles/PaloAltoNetworks.paloaltonetworks:/usr/local/lib/python2.7/dist-packages/napalm_ansible/modules
添加回答
举报
0/150
提交
取消