Commit Graph

13 Commits

Author SHA1 Message Date
Alan Orth 4abf2b10e4
ansible.cfg: smart fact gathering 2022-09-12 17:18:19 +03:00
Alan Orth f5199264f9
ansible.cfg: disable SSH host key checking 2022-09-12 17:14:39 +03:00
Alan Orth b014c09a2c
ansible.cfg: Use auto discovery of Python interpreter
Uses a built-in table of OSes and Python versions to decide which
Python interpreter to use. This is better than hard coding python3
in every single host's host_vars.

See: https://docs.ansible.com/ansible/latest/reference_appendices/interpreter_discovery.html
2021-07-07 12:22:00 +03:00
Alan Orth cb5fe90499
Move remote_user to ansible.cfg
Command line options override config files like ansible.cfg, but
not inventory data or playbook directives. This allows us to over-
ride remote_user with `-u` on the command line to log in as root
before we have set up the provisioning user.

See: https://github.com/ansible/ansible/issues/7841#issuecomment-245716271
2019-12-08 12:29:36 +02:00
Alan Orth e6d5e81d29
ansible.cfg: Adjust ansible_managed template
See: https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html
2019-01-10 12:50:33 +02:00
Alan Orth 0463c3c0b8
Revert "ansible.cfg: Temporary workaround for Ansible > 2.4.0.0 connection issue"
This reverts commit 4f357f336f.

On a hunch I recreated my Ansible virtualenv using Python 2.7 and now
connections work properly again without this. Something seems to have
happened with Python 3 in Ansible > 2.4.0.0.

For reference, Python version was 3.6.3 when it was not working, and
now it is working with Python 2.7.14.
2017-11-01 13:03:44 +02:00
Alan Orth 4f357f336f
ansible.cfg: Temporary workaround for Ansible > 2.4.0.0 connection issue
Not sure what causes it but I get timeouts when connecting to my hosts
with Ansible > 2.4.0.0 (tested 2.4.1.0 and current 2.5.0-devel). For
some reason switching to paramiko fixes it.
2017-10-30 16:21:35 +02:00
Alan Orth 0cd06a8298
ansible.cfg: Add option to always ask become pass
Saves having to remember to type -K during normal playbook runs.
2017-09-20 12:59:46 +03:00
Alan Orth 3d1022cd23
ansible.cfg: Add option to ask for vault pass
One less thing to remember to type during normal invocations.
2017-09-20 12:43:53 +03:00
Alan Orth 5867d6038c
ansible.cfg: Add inventory option
As of Ansible 2.4 the ANSIBLE_HOSTS environment variable is deprecated
so we need to specify this some other way.
2017-09-20 12:35:13 +03:00
Alan Orth 1641dd9795
ansible.cfg: Force handlers to run even if a task fails
We don't want services to be left in a broken state just because
a task fails and handlers that might have been notified fail to
run.
2017-01-28 17:36:32 +02:00
Alan Orth 2b1354ce91
ansible.cfg: Fix SSH pipelining config
The docs aren't very clear on this to be honest, but this option
needs to be under a [ssh_connection] section.

See: http://docs.ansible.com/ansible/intro_configuration.html#pipelining
See: https://review.openstack.org/#/c/331499/
2016-09-07 10:37:25 +03:00
Alan Orth e9aa4d0fdf
Add ansible.cfg
Pipelining makes ansible run tasks much faster, and as of Ansible
2.0 or 2.1 or so, it now works on older hosts that have requiretty
in their sudo config[0]. Also, disable the creation of those stupid
retry files.

[0] https://github.com/ansible/ansible/pull/13200
2016-08-22 13:04:13 +03:00