Open matthazinski opened 8 years ago
Which version of Ansible are you using?
Using the latest from Brew.
$ brew info ansible
ansible: stable 2.1.0.0 (bottled), HEAD
Automate deployment, configuration, and upgrading
https://www.ansible.com/
/usr/local/Cellar/ansible/2.1.0.0 (8,896 files, 94.2M) *
Poured from bottle on 2016-07-26 at 14:20:56
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/ansible.rb
==> Dependencies
Build: pkg-config ✔
Required: libyaml ✔, openssl ✔
==> Caveats
Homebrew writes wrapper scripts that set PYTHONPATH in ansible's
execution environment, which is inherited by Python scripts invoked
by ansible. If this causes problems, you can modify your playbooks
to invoke python with -E, which causes python to ignore PYTHONPATH.
Hm, in 2.0+
ansible_user
should always be present from what I can find though it may be null.
I'm away most weekend not able to test, but I just added a new filter to finally fall back to remote_user
if neither exist.
Alternatively just override makepkg_nonroot_user
and you'll be gravy.
I use the same username on most of my machines so I normally don't bother to define per-host user parameters. I encountered this error:
If I add a host var of
ansible_user
to my playbook, it works as expected.