Hi
I installed ansible using the following steps, I am also able to see ansible & ansible-playbooks version which is 2.2.0.0 but the config file path is blank. I checked /etc/ansible but getting error no directory found. Please refer the steps I followed:
yum update -y
easy_install pip
yum groupinstall "Development Tools"
gcc --version
pip install paramiko PyYAML Jinja2 httplib2 six
yum install python-devel
pip install --upgrade setuptools
pip install ansible
ansible --version
ansible 2.2.0.0
config file =
configured module search path = Default w/o overrides
installation directory and config file
2.2.0.0
No ansible.cfg, there is no ansible.cfg on whole / path I searched full filesystem
CentOS
There is no ansible.cfg anywhere on the system, ideally it should be on /etc/ansible/ansible.cfg but there is not the folder itself
Not yet written any playbook. Just installed ansible first time
to get the .cfg file to start with
pip doesn't generally install configuration files and pip with ansible is no different. If you just want to try out ansible, it generally works without an ansible.cfg file. (You do need to specify some inventory but you can do that on the command line rather than a file if you want). If you want to get a sample config file to adapt, you can get it from the tarball or the source repository here: https://github.com/ansible/ansible/blob/devel/examples/ansible.cfg
Inventory files are explained here: http://docs.ansible.com/ansible/intro_inventory.html To specify hosts for inventory on the command line instead just do something like this:
ansible -i 'host1,host2,host3' all -m command -a 'hostname'
If you want to specify a single host via the command line use a trailing comma in the inventory string:
ansible -i 'host1,' all -m command -a 'hostname'
Most helpful comment
pip doesn't generally install configuration files and pip with ansible is no different. If you just want to try out ansible, it generally works without an ansible.cfg file. (You do need to specify some inventory but you can do that on the command line rather than a file if you want). If you want to get a sample config file to adapt, you can get it from the tarball or the source repository here: https://github.com/ansible/ansible/blob/devel/examples/ansible.cfg
Inventory files are explained here: http://docs.ansible.com/ansible/intro_inventory.html To specify hosts for inventory on the command line instead just do something like this:
If you want to specify a single host via the command line use a trailing comma in the inventory string: