Files
config-public/ansible/ansible.cfg
T
Lucas WintherandClaude Opus 5.5 fbfdb5b375 Connect as remote_user rather than ansible_user
An inventory ansible_user outranks a command-line -u, so -u was silently
ignored. A config default sits below it, which lets a bootstrap run as an
admin account.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 15:02:27 +02:00

30 lines
1.3 KiB
INI

# Ansible only discovers an ansible.cfg in the current working directory, so
# every command in this repository is run from ansible/. See "Getting started"
# in the README, and ANSIBLE_CONFIG for the CI case.
[defaults]
inventory = inventory/hosts.yml
roles_path = roles
retry_files_enabled = False
stdout_callback = default
callback_result_format = yaml
display_skipped_hosts = False
interpreter_python = auto_silent
# The account every playbook connects as. Deliberately here and not as
# ansible_user in group_vars/all.yml: an inventory variable outranks a
# command-line -u, so a `-u somebody` would be accepted and then silently
# ignored. A config default sits *below* -u, which is what lets bootstrap.yml —
# the one playbook that has to connect as somebody else — take a plain
# `-u <admin-user>`. Override it for a single host with ansible_user in
# inventory/host_vars/<host>.yml.
remote_user = deploy
# CI runners are ephemeral, so a known_hosts file never survives to be checked
# against. Turn this back on if you deploy from a durable control node or put a
# bastion in front of the hosts — it is the one setting here worth revisiting.
host_key_checking = False
[ssh_connection]
pipelining = True
ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o ServerAliveInterval=30