mirror of https://github.com/ceph/ceph-ansible.git
common: fix installation condition
Problem: we could end up in situation where we would install a package on a machine that does not have the right repo enabled. Because the condition was set to OR we weren't pinning a particular host but just a condition. Let's say someone sets 'ceph_origin == "distro"', this would try to install OSD packages on Monitors. Solution: use a AND condition to first pin to the group_name (which identifies a set of hosts) AND then after this one of the installation condition. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1453119 Co-Authored-By: https://github.com/zhsj Signed-off-by: Sébastien Han <seb@redhat.com>pull/1557/head
parent
e605445da3
commit
f7e9585a2c
|
@ -74,8 +74,6 @@
|
||||||
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
||||||
when:
|
when:
|
||||||
- mon_group_name in group_names
|
- mon_group_name in group_names
|
||||||
or ceph_origin == "distro"
|
|
||||||
or ceph_custom
|
|
||||||
|
|
||||||
- name: install distro or red hat storage ceph osd
|
- name: install distro or red hat storage ceph osd
|
||||||
package:
|
package:
|
||||||
|
@ -83,8 +81,6 @@
|
||||||
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
||||||
when:
|
when:
|
||||||
- osd_group_name in group_names
|
- osd_group_name in group_names
|
||||||
or ceph_origin == "distro"
|
|
||||||
or ceph_custom
|
|
||||||
|
|
||||||
- name: install distro or red hat storage ceph mds
|
- name: install distro or red hat storage ceph mds
|
||||||
package:
|
package:
|
||||||
|
@ -92,8 +88,6 @@
|
||||||
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
||||||
when:
|
when:
|
||||||
- mds_group_name in group_names
|
- mds_group_name in group_names
|
||||||
or ceph_origin == "distro"
|
|
||||||
or ceph_custom
|
|
||||||
|
|
||||||
- name: install distro or red hat storage ceph-fuse
|
- name: install distro or red hat storage ceph-fuse
|
||||||
package:
|
package:
|
||||||
|
@ -101,9 +95,6 @@
|
||||||
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
||||||
when:
|
when:
|
||||||
- client_group_name in group_names
|
- client_group_name in group_names
|
||||||
or ceph_origin == "distro"
|
|
||||||
or ceph_dev
|
|
||||||
or ceph_custom
|
|
||||||
|
|
||||||
- name: install distro or red hat storage ceph base
|
- name: install distro or red hat storage ceph base
|
||||||
package:
|
package:
|
||||||
|
@ -111,8 +102,6 @@
|
||||||
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
|
||||||
when:
|
when:
|
||||||
- client_group_name in group_names
|
- client_group_name in group_names
|
||||||
or ceph_origin == "distro"
|
|
||||||
or ceph_custom
|
|
||||||
|
|
||||||
- name: install ceph-test
|
- name: install ceph-test
|
||||||
package:
|
package:
|
||||||
|
|
Loading…
Reference in New Issue