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>
+++ /dev/null
----
-- 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
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
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
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
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