Fix var locations

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2018-05-18 10:08:36 +00:00
parent 7c2d7e1612
commit bba28c10eb

View file

@ -30,11 +30,10 @@
sar_data: "{{ sar_data['stdout'] }}" sar_data: "{{ sar_data['stdout'] }}"
# Store the result on disk # Store the result on disk
- copy: - copy:
content: "{{ hostvars[item]['sar_data'] }}" content: "{{ sar_data }}"
dest: "{{ sar_tmp_dir }}/{{ hostvars[item]['sar_output_file'] }}" dest: "{{ hostvars['localhost']['sar_tmp_dir'] }}/{{ sar_output_file }}"
loop: "{{ groups['sar'] }}"
delegate_to: localhost delegate_to: localhost
delegate_facts: true delegate_facts: false
# Remove the variable from memory # Remove the variable from memory
- command: "/usr/bin/true" - command: "/usr/bin/true"
register: sar_data register: sar_data