Ansible: Fix package cache updates
[csit.git] / resources / tools / testbed-setup / ansible / roles / ab / tasks / main.yaml
index 9153198..c422b4d 100644 (file)
@@ -1,9 +1,15 @@
 ---
 # file: roles/ab/tasks/main.yaml
 
+- Name: Update package cache (apt)
+  apt:
+    update_cache: yes
+    cache_valid_time: 3600
+  when:
+    - ansible_distribution|lower == 'ubuntu'
+
 - name: Install Apache ab tools
   package:
     name: "{{ packages | flatten(levels=1) }}"
     state: present
-    update_cache: true
   tags: install-ab