Create dedicated ansible-pull playbook with basic maintenance tasks, use it

This commit is contained in:
Salt 2021-09-22 07:43:28 -05:00
parent fdeb143a56
commit 53ac5ad659
2 changed files with 13 additions and 1 deletions

12
pull.yml Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
---
- hosts: all
tasks:
- name: manage apt packages
block:
- name: update apt packages
apt: upgrade=yes update_cache=yes cache_valid_time=86400
- name: autoremove
apt: autoremove=yes
when: ansible_os_family == "Debian"

View File

@ -2,5 +2,5 @@
ansible_pull_boot_delay: 15min ansible_pull_boot_delay: 15min
ansible_pull_commit: master ansible_pull_commit: master
ansible_pull_time: "*-*-* 01:00:00" ansible_pull_time: "*-*-* 01:00:00"
ansible_pull_playbook: site.yml ansible_pull_playbook: pull.yml
ansible_pull_skip_tags: "skip-pull" ansible_pull_skip_tags: "skip-pull"