ansible_remote_tmp is a shell option so it isn't affected by delegate_to as
you have seen it will use what was set before. To get around this you can
set ansible_remote_tmp on the task itself to a temp dir that exists on the
local host like so;
- name: Calculate md5sum from local file
stat:
path: "{{ src_dir }}/{{ qcow_file_name }}"
get_checksum: yes
checksum_algorithm: md5
register: file_stats
run_once: True
delegate_to: localhost
vars:
ansible_remote_tmp: ~/.ansible/tmp
Thanks
Jordan
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/c1f883eb-29ee-467a-afa2-2816ed06a7a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.