New config file, please help test!

I've taught ansible to read from ~/.ansible.cfg or /etc/ansible/ansible.cfg, whichever it finds first. If it doesn't find either, old environment variable overrides should still work for
now, but I may decide to smite these. This is very lightly tested, so please test (and patch) away as you like.

All code changes are in constants.py (which is due for a rename, but I'm not changing it just yet) and there is an example config file in the "examples/" directory if you would like to switch to this. These basically all set default values so the various command line switches are still present.

A really trivial use of the file would be if you really didn't like that "-u" now defaults to the current user, not root, you can just put in there:

[defaults]
remote_user=root

I will also now accept patches for configuring all sorts of other weird esoteric behaviors, depending on sanity and code impact of each. Various things should not be CLI options and I don't want to add more CLI options wherever possible, but it is ok if various things become config settings.

--Micahel

Would it be worthwhile to have it include ENV variable setting
replacements also? I am thinking specifically of ANSIBLE_REMOTE_TMP
personally, but others might be interested in different ones. I use
that one a fair bit, and would prefer to keep the config for ansible
stuff within it's filespace, rather than setting variables in bashrc
or the like.

I'd be happy to work on that at least for the listed if it's something
you can see accepting a PR for. If not, that's fine, setting in
bashrc works :stuck_out_tongue:

Great feature. Is it possible to also make the current directory (or the directory of the playbook) be in the search path?

Would it be worthwhile to have it include ENV variable setting
replacements also? I am thinking specifically of ANSIBLE_REMOTE_TMP
personally, but others might be interested in different ones. I use
that one a fair bit, and would prefer to keep the config for ansible
stuff within it's filespace, rather than setting variables in bashrc
or the like.

It was already done that way, in fact, though I haven't tested it.
You can see the remote temp pattern in the config file and can edit it
there.

(We do need to verify that this setting is ignored for the root
account, becuase it may not have a homedir, just occurred to me that
it might not ATM)

I'm seriously thinking of getting rid of the environment variable
lookups as it's a bit of an unusual idiom (worked very very well at
the time!) and currently the configuration
file has higher priority. Since the RPM will lay down the
configuration file, they would never be checked for many users.

Cool, I hadn't looked at the code since I put in the
ANSIBLE_REMOTE_TMP entry.
Wasn't paying attention I think. sorry :slight_smile: