Add a cleanup task to touch a file upon completion of site.yml
This playbook *should* assure that we have a file we can use for checking when the last full play was. It being in a playbook at the tail end of site.yml is paramount, since site.yml dying will cause alarms to be set off.
This commit is contained in:
parent
e8a69aaaa1
commit
5b12eb5af2
12
playbooks/cleanup.yml
Executable file
12
playbooks/cleanup.yml
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env ansible-playbook
|
||||||
|
# vim:ft=ansible:
|
||||||
|
---
|
||||||
|
# Preambulatory system configuration
|
||||||
|
- hosts: all
|
||||||
|
tasks:
|
||||||
|
- name: collect service facts
|
||||||
|
service_facts:
|
||||||
|
tags: [ always ]
|
||||||
|
- name: touch ansible timestamp file
|
||||||
|
file: path=/var/lib/ansible-last-run state=touch mode='0644'
|
||||||
|
changed_when: no
|
2
site.yml
2
site.yml
@ -34,3 +34,5 @@
|
|||||||
# Housekeeping tags for one-off tasks
|
# Housekeeping tags for one-off tasks
|
||||||
- import_playbook: playbooks/tags_docker-prune.yml
|
- import_playbook: playbooks/tags_docker-prune.yml
|
||||||
- import_playbook: playbooks/tags_autoreboot.yml
|
- import_playbook: playbooks/tags_autoreboot.yml
|
||||||
|
# Last little bit of cleanup
|
||||||
|
- import_playbook: playbooks/cleanup.yml
|
||||||
|
Loading…
Reference in New Issue
Block a user