8d1f8e4eda
The permissions rules for /tmp say that only the process that created a file can delete it, this creates issues rerunning our gather script because we need to overwrite the temporary files as a different process. I'm at a loss as to why we didn't see this before though, maybe the permissions on /tmp in the images we ship have changed recently. Regardless instead of needlessly slapping become: true on every task this patch adds a handler to the common role to go and clean up files before the ansible process exits. Change-Id: I9e8c1a8b030da8319941dea6eb129fa59e6c2d48
16 lines
264 B
YAML
16 lines
264 B
YAML
---
|
|
# Cleanup for gather common
|
|
# Required to prevent perms issues
|
|
|
|
- name: cleanup script
|
|
file:
|
|
path: /tmp/openstack-config-parser.py
|
|
state: absent
|
|
become: true
|
|
|
|
- name: cleanup varsfile
|
|
file:
|
|
path: /tmp/out.yml
|
|
state: absent
|
|
become: true
|