Merge "Improving logging of prod playbook jobs"
This commit is contained in:
commit
960b9d7bbd
@ -48,3 +48,18 @@
|
|||||||
url: "{{ playbook_name }}.log"
|
url: "{{ playbook_name }}.log"
|
||||||
metadata:
|
metadata:
|
||||||
type: text
|
type: text
|
||||||
|
|
||||||
|
# If we aren't publishing logs through zuul then keep a set on
|
||||||
|
# bridge directly.
|
||||||
|
- name: Rename playbook log on bridge
|
||||||
|
when: not infra_prod_playbook_collect_log
|
||||||
|
copy:
|
||||||
|
remote_src: yes
|
||||||
|
src: "/var/log/ansible/{{ playbook_name }}.log"
|
||||||
|
dest: "/var/log/ansible/{{ playbook_name }}.log.{{ ansible_date_time.iso8601 }}"
|
||||||
|
|
||||||
|
- name: Cleanup old playbook logs on bridge
|
||||||
|
when: not infra_prod_playbook_collect_log
|
||||||
|
shell: |
|
||||||
|
find /var/log/ansible -name '{{ playbook_name }}.log.*' -type f -mtime 30 -delete
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user