Become root when fixing bridge logging
We are writing to /var/log/ansible which needs root perms. This was not done and the writes failed. Fix that. Change-Id: Ibe93519f2f549e85f0e238a210999c6281f42ce6
This commit is contained in:
parent
d708919903
commit
dd2ba436f9
@ -53,6 +53,7 @@
|
||||
# bridge directly.
|
||||
- name: Rename playbook log on bridge
|
||||
when: not infra_prod_playbook_collect_log
|
||||
become: yes
|
||||
copy:
|
||||
remote_src: yes
|
||||
src: "/var/log/ansible/{{ playbook_name }}.log"
|
||||
@ -60,6 +61,7 @@
|
||||
|
||||
- name: Cleanup old playbook logs on bridge
|
||||
when: not infra_prod_playbook_collect_log
|
||||
become: yes
|
||||
shell: |
|
||||
find /var/log/ansible -name '{{ playbook_name }}.log.*' -type f -mtime 30 -delete
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user