Just to note, that if it 'worked', become_user: "{{ansible_user}}"
would be a noop as the become system would ignore this by default as
you are already THAT user.
Also, debug does not get many of these things set as it has no
connection, it always executes 'locally' and ignores connection
Hello,
I thought that when ansible-playbook was used with the "-u" option, then
ansible_user was always defined as the "-u" user.
when running the following playbook,
- hosts: mybox
gather_facts: no
tasks:
- name: Echo ansible_user
debug:
msg: "hello {{ ansible_user }}"