Since the fetch task uses non-root privileges, we need to make sure that this is also the same for handling the tempfile. Otherwise, if this role is invoked with become: true then the non-privileged user won't be able to fetch into the tempfile, since it would be created by root.
Since the
fetch
task uses non-root privileges, we need to make sure that this is also the same for handling the tempfile. Otherwise, if this role is invoked withbecome: true
then the non-privileged user won't be able tofetch
into the tempfile, since it would be created by root.Fixes https://github.com/ansible-community/ansible-consul/issues/554