SOLVED:
This problem appears to have been caused by the introduction of dynamic
inventory. I pull a list of hosts from libvirt (virsh list --name), and on
the broken system, one VM has a name with a typo. It does not match the
host's name in DNS, and the name given in the delegate_to setting
If I set "strategy: debug" for the play and "p vars" there are a number of
settings in the broken system which aren't set to any value on the system
that works.
'vars': {...
'ansible_delegated_vars': {u'ds-20170921.private.example.net':
{...
ansible.cfg does contain:
[defaults]
remote_user=root
but that file has the same contents on the test system, where the same
playbook works, and ansible connects as the user named in the task's
"remote_user" setting.
--
You received this message because you are subscribed to the Google
Setting "remote_user" statically does not change the outcome. With
"remote_user: gordon", ansible still connects as "root".
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it,
I have a task defined that sets "remote_user" which has mysteriously
started connecting as "root" instead of my own user account. I've been
using this task for some time, and haven't made any changes that appear
relevant, recently. I'm also using it in a test environment where it is
working
Yes, those appear to be regex back-references. The documentation is here:
http://docs.ansible.com/ansible/latest/replace_module.html
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails