我创建了名为 venvansible并使用安装了 ansible
pip3 install ansible。现在在检查ansible版本时config file = None
ansible --version
ansible 2.9.12
config file = None
configured module search path = ['/home/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/ansible/ansible/lib/python3.7/site-packages/ansible
executable location = /home/ansible/ansible/bin/ansible
python version = 3.7.4 (default, Aug 18 2019, 12:04:45) [GCC 5.4.0 20160609]
Run Code Online (Sandbox Code Playgroud)
当我运行 ansible 命令时,它会显示No config file found; using defaults默认文件是哪个以及在哪里可以找到它?
问:“默认文件是哪个?在哪里可以找到它?”
答:简短的回答:不必有任何配置文件。在这种情况下,将应用硬编码默认值。
细节:
“如果从包管理器安装 Ansible,最新的 ansible.cfg 文件应该存在于 /etc/ansible ...”
shell> ansible-config dump
Run Code Online (Sandbox Code Playgroud)
小智 5
跑步:
sudo apt remove ansible
sudo apt update
sudo apt install software-properties-common
sudo apt-add-repository --yes --update ppa:ansible/ansible
sudo apt install ansible
Run Code Online (Sandbox Code Playgroud)
现在您可以获取 Ansible 配置位置。
| 归档时间: |
|
| 查看次数: |
34574 次 |
| 最近记录: |