From 53ac5ad659fd700cd61ba7b084764bbc3907aeaa Mon Sep 17 00:00:00 2001 From: Salt Date: Wed, 22 Sep 2021 07:43:28 -0500 Subject: [PATCH] Create dedicated ansible-pull playbook with basic maintenance tasks, use it --- pull.yml | 12 ++++++++++++ roles/ansible-pull/defaults/main.yml | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100755 pull.yml diff --git a/pull.yml b/pull.yml new file mode 100755 index 0000000..fe7c8a9 --- /dev/null +++ b/pull.yml @@ -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" diff --git a/roles/ansible-pull/defaults/main.yml b/roles/ansible-pull/defaults/main.yml index 804febf..8c2f99b 100644 --- a/roles/ansible-pull/defaults/main.yml +++ b/roles/ansible-pull/defaults/main.yml @@ -2,5 +2,5 @@ ansible_pull_boot_delay: 15min ansible_pull_commit: master ansible_pull_time: "*-*-* 01:00:00" -ansible_pull_playbook: site.yml +ansible_pull_playbook: pull.yml ansible_pull_skip_tags: "skip-pull"