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'] }}"
# Store the result on disk
- copy:
content: "{{ hostvars[item]['sar_data'] }}"
dest: "{{ sar_tmp_dir }}/{{ hostvars[item]['sar_output_file'] }}"
loop: "{{ groups['sar'] }}"
content: "{{ sar_data }}"
dest: "{{ hostvars['localhost']['sar_tmp_dir'] }}/{{ sar_output_file }}"
delegate_to: localhost
delegate_facts: true
delegate_facts: false
# Remove the variable from memory
- command: "/usr/bin/true"
register: sar_data