15
2
I’m on Mac OS X and new to Ansible. I forget how I installed it. I think via pip
:
$ pip freeze
altgraph==0.12
ansible==1.9.2
At any rate, from what I'm reading there should be a config file in /etc/ansible/
, but the content of that directory is just:
$ ls -a /etc/ansible/
. .. .hosts.swp hosts roles
It doesn’t look like there’s an environment variable defined either:
$ echo $ANSIBLE_CONFIG
# blank line
Ansible works as far as I can tell (without a local ansible.cfg
, and there’s nothing in the ansible
folder in the user dir), but I’m confounded.
Can someone please explain what I’m not getting here?
not in either place. and i'm the only user. i guess i could just copy it from the git repo and place it in one of those directories. – MikeiLL – 2015-09-19T17:29:53.050
Good call. It wasn't installed via homebrew, but it was version 1.9.2. reinstalling via pip at the moment... – MikeiLL – 2015-09-19T17:36:12.560
now at 1.9.3 but still can't find a config directory in either of the above locations. There's
~/.ansible/cp
, and/etc/ansible/
with same contents. – MikeiLL – 2015-09-19T17:40:40.280Thanks. Makes sense. I just wasn't sure if stock configuration was normally stored in one of the referenced
ansible.cfg
files. – MikeiLL – 2015-09-19T17:42:43.1671@MikeiLL Nah, don’t worry about it. My last edit was when I finally understood your concerns. I honestly can’t think of a well known piece of software that doesn’t operate by the logic of “I’ll have core defaults, but if I find a user config file that will override the defaults.” The big security/stability risk you get when your whole system is reliant on an external config file is if that file is gone, the whole system collapses? Not a good plan. Happy you now understand that if the config file missing, nothing bad happens. – JakeGould – 2015-09-19T17:45:28.983
Me too : ) Now back to the ansible docs... – MikeiLL – 2015-09-19T17:48:29.187