]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
testnode: always update the apt cache
authorAndrew Schoen <aschoen@redhat.com>
Tue, 8 Sep 2015 14:47:30 +0000 (09:47 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 8 Sep 2015 16:16:01 +0000 (11:16 -0500)
Updating the apt cache is an idempotent task so I see no problem with
always doing this. Also, debian jessie and ubuntu vivid aren't using the
local apt repos, but still need the apt cache updated.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
roles/testnode/tasks/apt/repos.yml
roles/testnode/tasks/apt_systems.yml

index f8a9ce424dd28fd0aec78b85a27bab34abbaa188..01f75e7fdbd2f315c8af1528f46e66234c49daff 100644 (file)
     mode: 0644
   with_items: apt_repos|list + common_apt_repos|list
   register: local_apt_repos
-
-- name: Update apt cache.
-  apt:
-    update_cache: yes
-  when: sources|changed or
-        local_apt_repos|changed or
-        apt_prefs|changed
-  # Register and retry to work around transient http issues
-  register: apt_cache_update
-  until: apt_cache_update|success
-  # try for 2 minutes before failing
-  retries: 24
-  delay: 5
index b32bbceceb1a3eaff3129fec93ce814009675fca..36c101e7e37f9899b5d2c79f823d973f410a3f4d 100644 (file)
 - name: Update apt cache.
   apt:
     update_cache: yes
-  when: ansible_distribution_major_version|int >= 15 and
-        ansible_distribution == "Ubuntu"
+  # try for 2 minutes before failing
+  retries: 24
+  delay: 5
   tags:
     - repos
+    - packages
 
 - name: Perform package related tasks.
   include: apt/packages.yml