I’d like these results when querying a remote machine, but am having problems finding the correct user vars to pass
‘sometypeofuser’: Alice,
become: true
Result: /home/alice
‘sometypeofuser’: Alice,
become: false
Result: /home/alice
‘sometypeofuser’: root
become: true or false
Result: /root/
Got myself in a muddle here so an example would be much appreciated please,
It’s also possible that I’ve made a mistake in my inventory that I can’t find at the moment.
I’ve been trying
command: echo ~
This isn’t ideal as is affected by become and also registers a ‘changed’ in the results
ansible_env.HOME but am always getting the account running the play
Also, I may be mistaken here but seems that if you run the play on the control machine is doesn’t ssh out and then in and that changes the ansible.env results (?)
Thank you in advance