]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
add-osd: refact the playbook
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 7 Apr 2020 13:35:38 +0000 (15:35 +0200)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Tue, 7 Apr 2020 15:19:53 +0000 (11:19 -0400)
There's no need to have two plays anymore since we now set/unset osd
flags in `ceph-osd` role.

Also, this commit makes the role `ceph-facts` to be called after
`ceph-defaults`

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
infrastructure-playbooks/add-osd.yml

index 4aa7bf6a127904f87cc352c08675af878adc3cb9..472190e15efb00badb61c5be4639c130f83c3e53 100644 (file)
 # you want to play the playbook on. So you need to comment already deployed OSD
 # and let uncommented the new OSDs.
 #
-- hosts:
-  - mons
-  - osds
-
-  gather_facts: False
-  become: true
-
-  vars:
-    delegate_facts_host: True
-
-  pre_tasks:
-    - name: gather facts
-      setup:
-      when:
-        - not delegate_facts_host | bool
-
-    - name: gather and delegate facts
-      setup:
-      delegate_to: "{{ item }}"
-      delegate_facts: True
-      with_items: "{{ groups['all'] | difference(groups.get('clients', [])) }}"
-      run_once: True
-      when:
-        - delegate_facts_host | bool
-
-  roles:
-    - ceph-defaults
-    - ceph-facts
-    - ceph-validate
-
 - hosts: osds
   gather_facts: False
   become: True
 
   roles:
     - role: ceph-defaults
+    - role: ceph-facts
+    - role: ceph-validate
     - role: ceph-handler
     - role: ceph-infra
     - role: ceph-docker-common
       when: containerized_deployment | bool
-    - role: ceph-facts
     - role: ceph-common
       when: not containerized_deployment | bool
     - role: ceph-config