小编R.a*_*hir的帖子

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

我已经使用 pip 安装了 napalm-ansible,现在尝试将 napalm-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
Run Code Online (Sandbox Code Playgroud)

但我的 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
Run Code Online (Sandbox Code Playgroud)

如何将第二个库路径添加到我的 ansible.cfg 文件中。谢谢

python library-path ansible

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

ansible ×1

library-path ×1

python ×1