browbeat/ansible/gather/roles/common/handlers/main.yml
jkilpatr 8d1f8e4eda Cleanup temporary files from the gather script
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
2017-08-02 07:34:51 -04:00

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