diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2021-10-05 15:34:35 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2021-10-05 15:34:35 +0200 |
commit | 84deda7bee5fec7472be556ce2b6028499f0103e (patch) | |
tree | b2a52034c74a1b9d77dd37b4e8799a3e27833d15 /roles/apache/tasks | |
parent | e5df302e3c17c29f16427c5cf35a0d45ffd7aac6 (diff) | |
download | ansible_collection-84deda7bee5fec7472be556ce2b6028499f0103e.tar.gz |
various: remove update_cache to reduce IO
Diffstat (limited to 'roles/apache/tasks')
-rw-r--r-- | roles/apache/tasks/main.yml | 8 |
1 files changed, 7 insertions, 1 deletions
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 |