]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-common: update_cache whenever a new deb repo is added
authorAlfredo Deza <adeza@redhat.com>
Thu, 1 Nov 2018 18:48:06 +0000 (14:48 -0400)
committerSébastien Han <seb@redhat.com>
Mon, 5 Nov 2018 12:31:54 +0000 (13:31 +0100)
The use of a handler meant that the cache would be updated at the very
end of the play, which doesn't work when adding a development repo and
trying to install right after it. This mostly reverts
53cdddf88699263763b36643565e5f846d9d13a8 without an actual `git revert`
because that caused other conflicts.

Signed-off-by: Alfredo Deza <adeza@redhat.com>
roles/ceph-common/handlers/main.yml [deleted file]
roles/ceph-common/tasks/installs/debian_community_repository.yml
roles/ceph-common/tasks/installs/debian_dev_repository.yml
roles/ceph-common/tasks/installs/prerequisite_rhcs_cdn_install_debian.yml
roles/ceph-common/tasks/installs/prerequisite_rhcs_iso_install_debian.yml

diff --git a/roles/ceph-common/handlers/main.yml b/roles/ceph-common/handlers/main.yml
deleted file mode 100644 (file)
index 9bcab1b..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
----
-- name: update apt cache if a repo was added
-  apt:
-    update_cache: yes
-  register: update_apt_cache
-  retries: 5
-  delay: 2
-  until: update_apt_cache | success
\ No newline at end of file
index 3471f0184e4a284d1fb32a6d66c52d08bedac82c..202ead939435f12d7956625c64c835218f93fb57 100644 (file)
@@ -8,5 +8,4 @@
   apt_repository:
     repo: "deb {{ ceph_stable_repo }} {{ ceph_stable_distro_source | default(ansible_lsb.codename) }} main"
     state: present
-    update_cache: no
-  notify: update apt cache if a repo was added
+    update_cache: yes
index e0d3195cb79dd76f187f8c3693866fb198a93e43..758334434f50af81e62ec2f1d3c841076b43f4ef 100644 (file)
@@ -9,5 +9,4 @@
   apt_repository:
     repo: "{{ ceph_dev_deb_repo.content }}"
     state: present
-    update_cache: no
-  notify: update apt cache if a repo was added
+    update_cache: yes
index 5a43e92a080c5b2a9e8e7144db18098fc96265d8..96e07d0b6e98c613a8153c40def1cde5d97ac57e 100644 (file)
@@ -8,10 +8,9 @@
   apt_repository:
     repo: "deb {{ ceph_rhcs_cdn_debian_repo }}{{ ceph_rhcs_cdn_debian_repo_version }}/{{ item.repo }} {{ ceph_stable_distro_source | default(ansible_lsb.codename) }} main"
     state: present
-    update_cache: no
+    update_cache: yes
   with_items:
     - { repo: "MON", configure: (mon_group_name in group_names or mgr_group_name in group_names) }
     - { repo: "OSD", configure: (osd_group_name in group_names) }
     - { repo: "Tools", configure: (rgw_group_name in group_names or mds_group_name in group_names or nfs_group_name in group_names or iscsi_gw_group_name in group_names or client_group_name in group_names) }
   when: item.configure
-  notify: update apt cache if a repo was added
index 7671e09f61a062e582aad6ca5cf9d13523170071..8b6c703275a81cbf12cc096fabb476ce97910589 100644 (file)
@@ -52,9 +52,8 @@
   apt_repository:
     repo: "deb file://{{ ceph_rhcs_repository_path }}/{{ item }} {{ ansible_lsb.codename }} main"
     state: present
-    update_cache: no
+    update_cache: yes
   with_items:
     - MON
     - OSD
     - Tools
-  notify: update apt cache if a repo was added