Used list style ands for better readibility and fixed legacy debian checks

pull/953/head
James Saint-Rossy 2016-09-26 09:19:15 -04:00
parent 982c44d41c
commit d36a99e41b
3 changed files with 10 additions and 4 deletions

View File

@ -7,5 +7,6 @@
- set_fact:
ceph_release: "{{ item.key }}"
when:
ceph_dev and ({{ item.value }} > ceph_release_num.{{ ceph_release }})
- ceph_dev
- ({{ item.value }} > ceph_release_num.{{ ceph_release }})
with_dict: "{{ ceph_release_num }}"

View File

@ -21,6 +21,7 @@
- not use_systemd
# legacy ceph system v init scripts require a mon section in order to work
# Not Ubuntu so we can catch old debian systems that don't use systemd or upstart
- name: add mon section into ceph.conf for systemv init scripts
ini_file:
dest: /etc/ceph/{{ cluster }}.conf
@ -29,16 +30,17 @@
value: "{{ ansible_host }}"
state: present
when:
- ansible_os_family == "RedHat"
- ansible_os_family != "Ubuntu"
- ceph_release_num.{{ ceph_stable_release }} < ceph_release_num.infernalis
# NOTE (jsaintrocc): can't use service module because we need to use the
# legacy systemv init for older ceph releases. Even when the os supports systemd
# Not Ubuntu so we can catch old debian systems that don't use systemd or upstart
- name: start and add that the monitor service to the init sequence
command: service ceph start mon
changed_when: false
when:
- ansible_os_family == "RedHat"
- ansible_os_family != "Ubuntu"
- ceph_release_num.{{ ceph_stable_release }} < ceph_release_num.infernalis
- name: start and add that the monitor service to the init sequence (for or after infernalis)

View File

@ -16,7 +16,10 @@
- name: include rgw multisite playbooks
include: multisite/main.yml
when: rgw_zone is defined and rgw_multisite and ( ceph_release_num.{{ ceph_release }} >= ceph_release_num.jewel )
when:
- rgw_zone is defined
- rgw_multisite
- ( ceph_release_num.{{ ceph_release }} >= ceph_release_num.jewel )
# Hard code this so we will skip the entire file instead of individual tasks (Default isn't Consistent)
static: False