Ansible: No config file path and file found

Created on 16 Nov 2016  ·  1Comment  ·  Source: ansible/ansible

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

ISSUE TYPE

  • Bug Report
COMPONENT NAME


installation directory and config file

ANSIBLE VERSION

2.2.0.0
CONFIGURATION

No ansible.cfg, there is no ansible.cfg on whole / path I searched full filesystem

OS / ENVIRONMENT

CentOS

SUMMARY

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

STEPS TO REPRODUCE

Not yet written any playbook. Just installed ansible first time

EXPECTED RESULTS

to get the .cfg file to start with

ACTUAL RESULTS


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:

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'

>All comments

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'
Was this page helpful?
0 / 5 - 0 ratings

Related issues

RaymiiOrg picture RaymiiOrg  ·  3Comments

iven picture iven  ·  3Comments

renaudguerin picture renaudguerin  ·  3Comments

jiwong picture jiwong  ·  3Comments

rchady picture rchady  ·  3Comments