Ansible gotcha: Playbook sudo vs task sudo
Published on 2015-11-11 14:33
Categories: ansible
TL;DR;
When running a playbook with sudo: yes
, it also runs the facts module
with sudo, so ansible_user_dir
will have the value of the root user, rather
than the expected home directory of the ansible_ssh_user
.