mirror of https://github.com/ceph/ceph-ansible.git
ceph-common: use a handler
We need a handler because the task changed, the old implementation was basically mimicing a handler. Signed-off-by: Sébastien Han <seb@redhat.com>pull/3285/head
parent
53972ee672
commit
53cdddf886
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
- 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
|
|
@ -9,4 +9,4 @@
|
|||
repo: "deb {{ ceph_stable_repo }} {{ ceph_stable_distro_source | default(ansible_lsb.codename) }} main"
|
||||
state: present
|
||||
update_cache: no
|
||||
register: add_debian_apt_repo
|
||||
notify: update apt cache if a repo was added
|
||||
|
|
|
@ -4,4 +4,5 @@
|
|||
repo: "deb {{ ceph_custom_repo }} {{ ansible_lsb.codename }} main"
|
||||
state: present
|
||||
update_cache: no
|
||||
register: add_debian_apt_repo
|
||||
notify: update apt cache if a repo was added
|
||||
|
||||
|
|
|
@ -10,4 +10,4 @@
|
|||
repo: "{{ ceph_dev_deb_repo.content }}"
|
||||
state: present
|
||||
update_cache: no
|
||||
register: add_debian_apt_repo
|
||||
notify: update apt cache if a repo was added
|
||||
|
|
|
@ -8,4 +8,5 @@
|
|||
repo: "deb {{ ceph_stable_repo_uca }} {{ ceph_stable_release_uca }} main"
|
||||
state: present
|
||||
update_cache: no
|
||||
register: add_debian_apt_repo
|
||||
notify: update apt cache if a repo was added
|
||||
|
||||
|
|
|
@ -4,17 +4,6 @@
|
|||
when:
|
||||
- ceph_origin == 'repository'
|
||||
|
||||
- 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
|
||||
when:
|
||||
- add_debian_apt_repo is defined
|
||||
- add_debian_apt_repo.changed | default(false)
|
||||
|
||||
- name: update apt cache if cache_valid_time has expired
|
||||
apt:
|
||||
update_cache: yes
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
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
|
||||
register: add_debian_apt_repo
|
||||
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
|
||||
|
|
|
@ -53,8 +53,8 @@
|
|||
repo: "deb file://{{ ceph_rhcs_repository_path }}/{{ item }} {{ ansible_lsb.codename }} main"
|
||||
state: present
|
||||
update_cache: no
|
||||
register: add_debian_apt_repo
|
||||
with_items:
|
||||
- MON
|
||||
- OSD
|
||||
- Tools
|
||||
notify: update apt cache if a repo was added
|
||||
|
|
Loading…
Reference in New Issue