From 84deda7bee5fec7472be556ce2b6028499f0103e Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Tue, 5 Oct 2021 15:34:35 +0200 Subject: various: remove update_cache to reduce IO --- roles/apache/tasks/main.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'roles/apache') diff --git a/roles/apache/tasks/main.yml b/roles/apache/tasks/main.yml index 9e7e904..e60ed65 100644 --- a/roles/apache/tasks/main.yml +++ b/roles/apache/tasks/main.yml @@ -10,11 +10,17 @@ dest: /etc/apt/sources.list.d/sury.list content: 'deb https://packages.sury.org/php/ {{ ansible_facts.distribution_release }} main' become: yes + register: install_repo + +- name: Update APT Cache + apt: + update_cache: yes + become: yes + when: install_repo.changed - name: Install general packages apt: name: '{{ ["apache2", "libapache2-mpm-itk"] + php_versions }}' - update_cache: yes become: yes - name: Install extensions -- cgit v1.2.3