]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
site: make it more readable
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 10 Apr 2018 13:30:16 +0000 (15:30 +0200)
committerSébastien Han <seb@redhat.com>
Fri, 13 Apr 2018 22:37:41 +0000 (00:37 +0200)
These conditions introduced by d981c6bd2 were insane.
This should be a bit easier to read.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
site-docker.yml.sample
site.yml.sample

index f69397fb98203c40d5251669b0fd9ff43daa6234..3ea16be3d8060f013d93d0fbac4f6f606bc20e34 100644 (file)
         - always
 
   roles:
-    - { role: ceph-defaults,
-        tags: [with_pkg, fetch_container_image],
-        when: "(((containerized_deployment | bool) and not (is_atomic | bool) and not (inventory_hostname in groups.get('clients', []))) or ((inventory_hostname == groups.get('clients', [''])|first) and (containerized_deployment | bool) and not (is_atomic | bool)))" }
-    - { role: ceph-docker-common,
-        tags: [with_pkg, fetch_container_image],
-        when: "(((containerized_deployment | bool) and not (is_atomic | bool) and not (inventory_hostname in groups.get('clients', []))) or ((inventory_hostname == groups.get('clients', [''])|first) and (containerized_deployment | bool) and not (is_atomic | bool)))" }
+    - role: ceph-defaults
+      tags: [with_pkg, fetch_container_image]
+      when:
+        - containerized_deployment | bool
+        - not (is_atomic | bool)
+        - (not (inventory_hostname in groups.get('clients', [])) or (inventory_hostname == groups.get('clients', [''])|first))
+    - role: ceph-docker-common
+      tags: [with_pkg, fetch_container_image]
+      when:
+        - containerized_deployment | bool
+        - not (is_atomic | bool)
+        - (not (inventory_hostname in groups.get('clients', [])) or (inventory_hostname == groups.get('clients', [''])|first))
 
   post_tasks:
     - name: "pull {{ ceph_docker_image }} image"
       command: "docker pull {{ ceph_docker_registry}}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
       changed_when: false
-      when: "((is_atomic and (ceph_docker_dev_image is undefined or not ceph_docker_dev_image) and not (inventory_hostname in groups.get('clients', []))) or (is_atomic and ((ceph_docker_dev_image is undefined) or not (ceph_docker_dev_image)) and (inventory_hostname == groups.get('clients', [''])|first)))"
+      when:
+        - is_atomic
+        - (ceph_docker_dev_image is undefined or not ceph_docker_dev_image)
+        - (not (inventory_hostname in groups.get('clients', [])) or (inventory_hostname == groups.get('clients', [''])|first))
 
 - hosts: mons
   tasks:
   become: True
   gather_facts: false
   roles:
-    - { role: ceph-defaults, tags: ['ceph_update_config'] }
-    - ceph-docker-common
-    - { role: ceph-config, tags: ['ceph_update_config'] }
-    - ceph-mon
+    - role: ceph-defaults
+      tags: ['ceph_update_config']
+    - role: ceph-docker-common
+    - role: ceph-config
+      tags: ['ceph_update_config']
+    - role: ceph-mon
   serial: 1 # MUST be '1' WHEN DEPLOYING MONITORS ON DOCKER CONTAINERS
 
 - hosts: mons
             status: "In Progress"
             start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
   roles:
-    - { role: ceph-defaults, tags: ['ceph_update_config'] }
-    - ceph-docker-common
-    - { role: ceph-config, tags: ['ceph_update_config'], when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" }
-    - { role: ceph-mgr, when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" }
+    - role: ceph-defaults
+      tags: ['ceph_update_config'] 
+    - role: ceph-docker-common
+    - role: ceph-config
+      tags: ['ceph_update_config']
+      when:
+        - ceph_release_num[ceph_release] >= ceph_release_num.luminous
+    - role: ceph-mgr
+      when:
+        - ceph_release_num[ceph_release] >= ceph_release_num.luminous
   post_tasks:
     - name: set ceph manager install 'Complete'
       run_once: true
             status: "In Progress"
             start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
   roles:
-    - { role: ceph-defaults, tags: ['ceph_update_config'] }
-    - ceph-docker-common
-    - { role: ceph-config, tags: ['ceph_update_config'] }
-    - ceph-osd
+    - role: ceph-defaults
+      tags: ['ceph_update_config']
+    - role: ceph-docker-common
+    - role: ceph-config
+      tags: ['ceph_update_config']
+    - role: ceph-osd
   post_tasks:
     - name: set ceph osd install 'Complete'
       run_once: true
             status: "In Progress"
             start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
   roles:
-    - { role: ceph-defaults, tags: ['ceph_update_config'] }
-    - ceph-docker-common
-    - { role: ceph-config, tags: ['ceph_update_config'] }
+    - role: ceph-defaults
+      tags: ['ceph_update_config']
+    - role: ceph-docker-common
+    - role: ceph-config
+      tags: ['ceph_update_config']
     - ceph-mds
   post_tasks:
     - name: set ceph mds install 'Complete'
             status: "In Progress"
             start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
   roles:
-    - { role: ceph-defaults, tags: ['ceph_update_config'] }
-    - ceph-docker-common
-    - { role: ceph-config, tags: ['ceph_update_config'] }
-    - ceph-rgw
+    - role: ceph-defaults
+      tags: ['ceph_update_config']
+    - role: ceph-docker-common
+    - role: ceph-config
+      tags: ['ceph_update_config']
+    - role: ceph-rgw
   post_tasks:
     - name: set ceph rgw install 'Complete'
       run_once: true
             status: "In Progress"
             start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
   roles:
-    - { role: ceph-defaults, tags: ['ceph_update_config'] }
-    - ceph-docker-common
-    - { role: ceph-config, tags: ['ceph_update_config'], when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" }
-    - { role: ceph-nfs, when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" }
+    - role: ceph-defaults
+      tags: ['ceph_update_config']
+    - role: ceph-docker-common
+    - role: ceph-config
+      tags: ['ceph_update_config']
+      when:
+        - ceph_release_num[ceph_release] >= ceph_release_num.luminous
+    - role: ceph-nfs
+      when:
+        - ceph_release_num[ceph_release] >= ceph_release_num.luminous
   post_tasks:
     - name: set ceph nfs install 'Complete'
       run_once: true
             status: "In Progress"
             start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
   roles:
-    - { role: ceph-defaults, tags: ['ceph_update_config'] }
-    - ceph-docker-common
-    - { role: ceph-config, tags: ['ceph_update_config'] }
-    - ceph-rbd-mirror
+    - role: ceph-defaults
+      tags: ['ceph_update_config']
+    - role: ceph-docker-common
+    - role: ceph-config
+      tags: ['ceph_update_config']
+    - role: ceph-rbd-mirror
   post_tasks:
     - name: set ceph rbd mirror install 'Complete'
       run_once: true
             status: "In Progress"
             start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
   roles:
-    - { role: ceph-defaults, tags: ['ceph_update_config'] }
-    - ceph-docker-common
-    - { role: ceph-config, tags: ['ceph_update_config'] }
-    - ceph-restapi
+    - role: ceph-defaults
+      tags: ['ceph_update_config']
+    - role: ceph-docker-common
+    - role: ceph-config
+      tags: ['ceph_update_config']
+    - role: ceph-restapi
   post_tasks:
     - name: set ceph rest api install 'Complete'
       run_once: true
             status: "In Progress"
             start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
   roles:
-    - { role: ceph-defaults, tags: ['ceph_update_config'] }
-    - { role: ceph-docker-common, when: "inventory_hostname == groups.get('clients', ['']) | first" }
-    - { role: ceph-config, tags: ['ceph_update_config'] }
-    - ceph-client
+    - role: ceph-defaults
+      tags: ['ceph_update_config']
+    - role: ceph-docker-common
+      when:
+        - inventory_hostname == groups.get('clients', ['']) | first
+    - role: ceph-config
+      tags: ['ceph_update_config']
+    - role: ceph-client
   post_tasks:
     - name: set ceph client install 'Complete'
       run_once: true
index 5684a502eaeb51593c44fdb8d6aa4e0b4d24902f..3a56a30b490fce4fd5c08034e14702ac04e13063 100644 (file)
             status: "In Progress"
             start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
   roles:
-    - { role: ceph-defaults, tags: ['ceph_update_config'] }
-    - ceph-common
-    - { role: ceph-config, tags: ['ceph_update_config'] }
-    - ceph-mon
+    - role: ceph-defaults
+      tags: ['ceph_update_config']
+    - role: ceph-common
+    - role: ceph-config
+      tags: ['ceph_update_config']
+    - role: ceph-mon
   post_tasks:
     - name: set ceph monitor install 'Complete'
       run_once: true
             status: "In Progress"
             start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
   roles:
-    - { role: ceph-defaults, tags: ['ceph_update_config'] }
-    - ceph-common
-    - { role: ceph-config, tags: ['ceph_update_config'], when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" }
-    - { role: ceph-mgr, when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" }
+    - role: ceph-defaults
+      tags: ['ceph_update_config']
+    - role: ceph-common
+    - role: ceph-config
+      tags: ['ceph_update_config']
+      when:
+        - ceph_release_num[ceph_release] >= ceph_release_num.luminous
+    - role: ceph-mgr
+      when:
+        - ceph_release_num[ceph_release] >= ceph_release_num.luminous
   post_tasks:
     - name: set ceph manager install 'Complete'
       run_once: true
             status: "In Progress"
             start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
   roles:
-    - { role: ceph-defaults, tags: ['ceph_update_config'] }
-    - ceph-common
-    - { role: ceph-config, tags: ['ceph_update_config'] }
-    - ceph-agent
+    - role: ceph-defaults
+      tags: ['ceph_update_config']
+    - role: ceph-common
+    - role: ceph-config
+      tags: ['ceph_update_config']
+    - role: ceph-agent
   post_tasks:
     - name: set ceph agent install 'Complete'
       run_once: true
             status: "In Progress"
             start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
   roles:
-    - { role: ceph-defaults, tags: ['ceph_update_config'] }
-    - ceph-common
-    - { role: ceph-config, tags: ['ceph_update_config'] }
-    - ceph-osd
+    - role: ceph-defaults
+      tags: ['ceph_update_config']
+    - role: ceph-common
+    - role: ceph-config
+      tags: ['ceph_update_config']
+    - role: ceph-osd
   post_tasks:
     - name: set ceph osd install 'Complete'
       run_once: true
             status: "In Progress"
             start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
   roles:
-    - { role: ceph-defaults, tags: ['ceph_update_config'] }
-    - ceph-common
-    - { role: ceph-config, tags: ['ceph_update_config'] }
-    - ceph-mds
+    - role: ceph-defaults
+      tags: ['ceph_update_config']
+    - role: ceph-common
+    - role: ceph-config
+      tags: ['ceph_update_config']
+    - role: ceph-mds
   post_tasks:
     - name: set ceph mds install 'Complete'
       run_once: true
             status: "In Progress"
             start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
   roles:
-    - { role: ceph-defaults, tags: ['ceph_update_config'] }
-    - ceph-common
-    - { role: ceph-config, tags: ['ceph_update_config'] }
-    - ceph-rgw
+    - role: ceph-defaults
+      tags: ['ceph_update_config']
+    - role: ceph-common
+    - role: ceph-config
+      tags: ['ceph_update_config']
+    - role: ceph-rgw
   post_tasks:
     - name: set ceph rgw install 'Complete'
       run_once: true
             status: "In Progress"
             start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
   roles:
-    - { role: ceph-defaults, tags: ['ceph_update_config'] }
-    - ceph-common
-    - { role: ceph-config, tags: ['ceph_update_config'], when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" }
-    - { role: ceph-nfs, when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" }
+    - role: ceph-defaults
+      tags: ['ceph_update_config']
+    - role: ceph-common
+    - role: ceph-config
+      tags: ['ceph_update_config']
+      when:
+        - ceph_release_num[ceph_release] >= ceph_release_num.luminous
+    - role: ceph-nfs
+      when:
+        - ceph_release_num[ceph_release] >= ceph_release_num.luminous
   post_tasks:
     - name: set ceph nfs install 'Complete'
       run_once: true
             status: "In Progress"
             start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
   roles:
-    - { role: ceph-defaults, tags: ['ceph_update_config'] }
-    - ceph-common
-    - { role: ceph-config, tags: ['ceph_update_config'] }
-    - ceph-restapi
+    - role: ceph-defaults
+      tags: ['ceph_update_config']
+    - role: ceph-common
+    - role: ceph-config
+      tags: ['ceph_update_config']
+    - role: ceph-restapi
   post_tasks:
     - name: set ceph rest api install 'Complete'
       run_once: true
             status: "In Progress"
             start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
   roles:
-    - { role: ceph-defaults, tags: ['ceph_update_config'] }
-    - ceph-common
-    - { role: ceph-config, tags: ['ceph_update_config'] }
-    - ceph-rbd-mirror
+    - role: ceph-defaults
+      tags: ['ceph_update_config']
+    - role: ceph-common
+    - role: ceph-config
+      tags: ['ceph_update_config']
+    - role: ceph-rbd-mirror
   post_tasks:
     - name: set ceph rbd mirror install 'Complete'
       run_once: true
             status: "In Progress"
             start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
   roles:
-    - { role: ceph-defaults, tags: ['ceph_update_config'] }
-    - ceph-common
-    - { role: ceph-config, tags: ['ceph_update_config'] }
-    - ceph-client
+    - role: ceph-defaults
+      tags: ['ceph_update_config']
+    - role: ceph-common
+    - role: ceph-config
+      tags: ['ceph_update_config']
+    - role: ceph-client
   post_tasks:
     - name: set ceph client install 'Complete'
       run_once: true
             status: "In Progress"
             start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
   roles:
-    - { role: ceph-defaults, tags: ['ceph_update_config'] }
-    - ceph-common
-    - { role: ceph-config, tags: ['ceph_update_config'], when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" }
-    - { role: ceph-iscsi-gw, when: "ceph_release_num[ceph_release] >= ceph_release_num.luminous" }
+    - role: ceph-defaults
+      tags: ['ceph_update_config']
+    - role: ceph-common
+    - role: ceph-config
+      tags: ['ceph_update_config']
+      when:
+        - ceph_release_num[ceph_release] >= ceph_release_num.luminous
+    - role: ceph-iscsi-gw
+      when:
+        - ceph_release_num[ceph_release] >= ceph_release_num.luminous
   post_tasks:
     - name: set ceph iscsi gw install 'Complete'
       run_once: true