]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Used list style ands for better readibility and fixed legacy debian checks
authorJames Saint-Rossy <james_saintrossy@cable.comcast.com>
Mon, 26 Sep 2016 13:19:15 +0000 (09:19 -0400)
committerJames Saint-Rossy <james_saintrossy@cable.comcast.com>
Mon, 26 Sep 2016 13:19:15 +0000 (09:19 -0400)
roles/ceph-common/tasks/release.yml
roles/ceph-mon/tasks/start_monitor.yml
roles/ceph-rgw/tasks/main.yml

index ec190d363702f01c2a14e6117b8a19da86d5f192..3bb54e038a6c1257a1de4ca7c5111b9de2b40217 100644 (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 }}"
index c308481c0c6be1adb5e78101296dc79f67090c64..0999673fa23b83f8890fa031d8b79c8db507bf0d 100644 (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
     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)
index ab1d53ae59aa93b871169640be6e371e24e14adc..5fb5699cd218b13becf0b1e76017f0dc55500a46 100644 (file)
 
 - 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