I tried to install Ansible on both Mac OS X 10.9 and ubuntu-12.04.
It seems my installation on OS X is not quite complete.
I followed the instructions on this page below: http://www.ansibleworks.com/docs/intro_installation.html
If I installed Ansible by using this script below on ubuntu-12.04:
There are configuration files (‘ansible.cfg’, ‘hosts’) found under the directory ‘/etc/ansible/’.
If I installed Ansible by using this script below on OS X 10.9:
$ git clone git://github.com/ansible/ansible.git
$ cd ./ansible
$ source ./hacking/env-setup #or run:
$ sudo python setup.py install # Ansible 1.5 is installed.
There is no configuration file found under directory ‘/etc/ansible/’.
I also tried to install Ansible by using brew: brew install ansible. There is still no cfg file under ‘/etc/ansible/’.
Thus, I am wondering what should be the appropriate way to install Ansible on OS X 10.9? Or, on OS X 10.9, I always need to manually add configuration files into specific directories like ‘/etc/ansible/’?
The current development branch head is labelled 1.5 and is not yet released.
If you run the “I want to run it from checkout” script it’s not going to install any files, but you can find an example configuration file in the examples/ dir of the checkout.
You can also install using pip or homebrew.
In either case, ‘hacking/env-setup’ is not installation, it’s just running from source.
I do not see the same behavior as you on ubuntu 12.04 … root@ubuntu-test-1:~# apt-get install ansible Reading package lists… Done Building dependency tree Reading state information… Done The following extra packages will be installed: libyaml-0-2 python-jinja2 python-markupsafe python-paramiko python-yaml Suggested packages: python-jinja2-doc The following NEW packages will be installed: ansible libyaml-0-2 python-jinja2 python-markupsafe python-paramiko python-yaml 0 upgraded, 6 newly installed, 0 to remove and 1 not upgraded. Need to get 1,393 kB of archives. After this operation, 10.2 MB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 precise/main libyaml-0-2 amd64 0.1.4-2 [56.9 kB] Get:2 precise/main python-yaml amd64 3.10-2 [122 kB] Get:3 precise-updates/main python-paramiko all 1.7.7.1-2ubuntu1 [797 kB] Get:4 precise/main python-markupsafe amd64 0.15-1 [13.6 kB] Get:5 precise/main python-jinja2 amd64 2.6-1 [158 kB] Get:6 precise-backports/universe ansible all 1.1+dfsg-1~ubuntu12.04.1 [245 kB] Fetched 1,393 kB in 8s (161 kB/s) Selecting previously unselected package libyaml-0-2. (Reading database … 53810 files and directories currently installed.) Unpacking libyaml-0-2 (from …/libyaml-0-2_0.1.4-2_amd64.deb) … Selecting previously unselected package python-yaml. Unpacking python-yaml (from …/python-yaml_3.10-2_amd64.deb) … Selecting previously unselected package python-paramiko. Unpacking python-paramiko (from …/python-paramiko_1.7.7.1-2ubuntu1_all.deb) … Selecting previously unselected package python-markupsafe. Unpacking python-markupsafe (from …/python-markupsafe_0.15-1_amd64.deb) … Selecting previously unselected package python-jinja2. Unpacking python-jinja2 (from …/python-jinja2_2.6-1_amd64.deb) … Selecting previously unselected package ansible. Unpacking ansible (from …/ansible_1.1+dfsg-1~ubuntu12.04.1_all.deb) … Processing triggers for man-db … Setting up libyaml-0-2 (0.1.4-2) … Setting up python-yaml (3.10-2) … Setting up python-paramiko (1.7.7.1-2ubuntu1) … Setting up python-markupsafe (0.15-1) … Setting up python-jinja2 (2.6-1) … Setting up ansible (1.1+dfsg-1~ubuntu12.04.1) … Processing triggers for libc-bin … ldconfig deferred processing now taking place root@ubuntu-test-1:~# dpkg-query -L ansible | fgrep ‘/etc/’ /etc/ansible /etc/ansible/ansible.cfg /etc/ansible/hosts The files in etc are a packaging feature that is caused by a definition in packaging/debian/ansible.install from a source checkout. I would verify that your ubuntu machine installed the package correctly from the right source and if dkpg-query lists any files in /etc As for osx with setup.py, the script does not copy anything examples to /etc as this is a job for the packaging spec. Homebrew calls setup.py, so that’s why you see the same result. However, you do not need the example files in /etc to use ansible. All of the content in ansible.cfg from the example are already set as default configuration options and ansible can run without the file. If you want to override an option, then you could create /etc/ansible/ansible.cfg per The default /etc/ansible/hosts file is just an commented file, so it won’t really provide anything other than a syntax reference. It would be up to you to create or fill out this file with all your various hostnames and groups.