从命令行显示Ansible配置 [英] Display Ansible configuration from command line

查看:67
本文介绍了从命令行显示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

这篇关于从命令行显示Ansible配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆