248007c43a
This commit adds .gz extension to the compressed log directory. Change-Id: Ic972eac9720c1e96e114c92bbf2e53611b710350
19 lines
483 B
YAML
19 lines
483 B
YAML
---
|
|
- name: Tar the logs directory
|
|
archive:
|
|
path: /home/{{host_remote_user}}/{{ansible_hostname}}
|
|
dest: /home/{{host_remote_user}}/{{ansible_hostname}}.gz
|
|
|
|
- name: Remove logs directory
|
|
file:
|
|
path: /home/{{host_remote_user}}/{{ansible_hostname}}
|
|
state: absent
|
|
|
|
- name: Fetch logs
|
|
fetch:
|
|
src: /home/{{host_remote_user}}/{{ansible_hostname}}.gz
|
|
dest:
|
|
/home/{{browbeat_user}}/logs/{{inventory_hostname}}-{{ansible_date_time.epoch}}.gz
|
|
flat: yes
|
|
|