From 9e362f765b63334b5f48c40da7ebdd2431e79e7e Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 29 Aug 2019 20:52:31 +0300 Subject: [PATCH] Feat(apt): Add option `cache_valid_time: 3600` Avoid unnecessary updates. --- playbooks/debian/init-local-phd.yml | 1 + playbooks/debian/roles/apache/tasks/main.yml | 1 + playbooks/debian/roles/dehydrated/tasks/main.yml | 1 + playbooks/debian/roles/dev-packages/tasks/main.yml | 1 + playbooks/debian/roles/firewall/tasks/main.yml | 1 + playbooks/debian/roles/init-system/tasks/apt.yml | 1 + playbooks/debian/roles/init-system/tasks/python.yml | 1 + playbooks/debian/roles/logcheck/tasks/main.yml | 1 + playbooks/debian/roles/named/tasks/main.yml | 1 + playbooks/debian/roles/packages/tasks/main.yml | 1 + playbooks/debian/roles/remove-systemd/tasks/main.yml | 1 + playbooks/debian/roles/sudo/tasks/main.yml | 1 + playbooks/debian/update-all-apt.yml | 1 + 13 files changed, 13 insertions(+) diff --git a/playbooks/debian/init-local-phd.yml b/playbooks/debian/init-local-phd.yml index f43b7d8..1c1f89f 100644 --- a/playbooks/debian/init-local-phd.yml +++ b/playbooks/debian/init-local-phd.yml @@ -24,6 +24,7 @@ apt: autoclean: yes autoremove: yes + cache_valid_time: 3600 install_recommends: no name: ['fvwm', 'rxvt-unicode', 'xorg'] state: latest diff --git a/playbooks/debian/roles/apache/tasks/main.yml b/playbooks/debian/roles/apache/tasks/main.yml index e893ce4..0d81b0a 100644 --- a/playbooks/debian/roles/apache/tasks/main.yml +++ b/playbooks/debian/roles/apache/tasks/main.yml @@ -14,6 +14,7 @@ apt: autoclean: yes autoremove: yes + cache_valid_time: 3600 install_recommends: no name: apache2 state: latest diff --git a/playbooks/debian/roles/dehydrated/tasks/main.yml b/playbooks/debian/roles/dehydrated/tasks/main.yml index 0b7ae4d..d6d7ed8 100644 --- a/playbooks/debian/roles/dehydrated/tasks/main.yml +++ b/playbooks/debian/roles/dehydrated/tasks/main.yml @@ -12,6 +12,7 @@ module: apt autoclean: yes autoremove: yes + cache_valid_time: 3600 install_recommends: no name: git state: latest diff --git a/playbooks/debian/roles/dev-packages/tasks/main.yml b/playbooks/debian/roles/dev-packages/tasks/main.yml index 852de97..ed96abf 100644 --- a/playbooks/debian/roles/dev-packages/tasks/main.yml +++ b/playbooks/debian/roles/dev-packages/tasks/main.yml @@ -3,6 +3,7 @@ apt: autoclean: yes autoremove: yes + cache_valid_time: 3600 install_recommends: no name: ['gcc', 'g++', 'git', 'make', ] diff --git a/playbooks/debian/roles/firewall/tasks/main.yml b/playbooks/debian/roles/firewall/tasks/main.yml index ed406ee..9716dda 100644 --- a/playbooks/debian/roles/firewall/tasks/main.yml +++ b/playbooks/debian/roles/firewall/tasks/main.yml @@ -1,6 +1,7 @@ - name: Install fail2ban become: true apt: + cache_valid_time: 3600 install_recommends: no name: fail2ban state: latest diff --git a/playbooks/debian/roles/init-system/tasks/apt.yml b/playbooks/debian/roles/init-system/tasks/apt.yml index 2173229..2980427 100644 --- a/playbooks/debian/roles/init-system/tasks/apt.yml +++ b/playbooks/debian/roles/init-system/tasks/apt.yml @@ -37,6 +37,7 @@ apt: autoclean: yes autoremove: yes + cache_valid_time: 3600 install_recommends: no name: ['avahi-autoip', 'bluetooth', 'bluez', 'debian-faq', 'doc-debian', diff --git a/playbooks/debian/roles/init-system/tasks/python.yml b/playbooks/debian/roles/init-system/tasks/python.yml index e2667e1..ead9aa5 100644 --- a/playbooks/debian/roles/init-system/tasks/python.yml +++ b/playbooks/debian/roles/init-system/tasks/python.yml @@ -3,6 +3,7 @@ apt: autoclean: yes autoremove: yes + cache_valid_time: 3600 install_recommends: no name: ['python', 'python2.7', 'python3', 'python-pip', 'python3-pip', 'python-setuptools', 'python3-setuptools', diff --git a/playbooks/debian/roles/logcheck/tasks/main.yml b/playbooks/debian/roles/logcheck/tasks/main.yml index e11edf7..fa8c6d4 100644 --- a/playbooks/debian/roles/logcheck/tasks/main.yml +++ b/playbooks/debian/roles/logcheck/tasks/main.yml @@ -3,6 +3,7 @@ apt: autoclean: yes autoremove: yes + cache_valid_time: 3600 install_recommends: no name: logcheck state: latest diff --git a/playbooks/debian/roles/named/tasks/main.yml b/playbooks/debian/roles/named/tasks/main.yml index f0410a9..3a70042 100644 --- a/playbooks/debian/roles/named/tasks/main.yml +++ b/playbooks/debian/roles/named/tasks/main.yml @@ -14,6 +14,7 @@ apt: autoclean: yes autoremove: yes + cache_valid_time: 3600 install_recommends: no name: bind9 state: latest diff --git a/playbooks/debian/roles/packages/tasks/main.yml b/playbooks/debian/roles/packages/tasks/main.yml index 53f8c52..5d3aeb1 100644 --- a/playbooks/debian/roles/packages/tasks/main.yml +++ b/playbooks/debian/roles/packages/tasks/main.yml @@ -3,6 +3,7 @@ apt: autoclean: yes autoremove: yes + cache_valid_time: 3600 install_recommends: no name: ['adjtimex', 'arj', 'bsd-mailx', 'elinks', 'fetchmail', 'links2', 'lzip', 'lzma', 'lzop', 'p7zip', 'xz-utils', diff --git a/playbooks/debian/roles/remove-systemd/tasks/main.yml b/playbooks/debian/roles/remove-systemd/tasks/main.yml index 109694e..d8df259 100644 --- a/playbooks/debian/roles/remove-systemd/tasks/main.yml +++ b/playbooks/debian/roles/remove-systemd/tasks/main.yml @@ -14,6 +14,7 @@ apt: autoclean: yes autoremove: yes + cache_valid_time: 3600 install_recommends: no name: ['sysvinit-core', 'sysvinit-utils'] state: latest diff --git a/playbooks/debian/roles/sudo/tasks/main.yml b/playbooks/debian/roles/sudo/tasks/main.yml index ea0377d..97b9b2a 100644 --- a/playbooks/debian/roles/sudo/tasks/main.yml +++ b/playbooks/debian/roles/sudo/tasks/main.yml @@ -1,6 +1,7 @@ - name: Install sudo become: true apt: + cache_valid_time: 3600 install_recommends: no name: sudo state: latest diff --git a/playbooks/debian/update-all-apt.yml b/playbooks/debian/update-all-apt.yml index ac2b31e..580672c 100644 --- a/playbooks/debian/update-all-apt.yml +++ b/playbooks/debian/update-all-apt.yml @@ -7,6 +7,7 @@ apt: autoclean: yes autoremove: yes + cache_valid_time: 3600 install_recommends: no name: "*" state: latest -- 2.39.5