从命令行显示 Ansible 配置

从命令行显示 Ansible 配置

问题描述:

Ansible 有很长的配置参数列表,包括 ssh 的不同设置.假设我在当前文件夹中有一些 /etc/ansible/ansible.cfg 和其他 ansible.cfg 文件,我如何查看生成的配置?

Ansible has a pretty long list of configuration parameters including different settings for ssh. Assuming I have some /etc/ansible/ansible.cfg and also other ansible.cfg files in current folder, how do I see the resulting configuration?

我说的是这样的事情:

ansible show-config
ansible-playbook show config

运行 'ansible --version'.

Run 'ansible --version'.

$ ansible --version
ansible 2.0.1.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides

$ touch ~/.ansible.cfg
ansible 2.0.1.0
config file = /home/jdoe/.ansible.cfg
configured module search path = Default w/o overrides