--- # Defines deployment design and assigns role to server groups - hosts: - mons - agents - osds - mdss - rgws - nfss - restapis - rbdmirrors - clients - iscsigws - mgrs 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'] }}" when: - delegate_facts_host | bool - name: check if it is atomic host stat: path: /run/ostree-booted register: stat_ostree tags: - always - name: set_fact is_atomic set_fact: is_atomic: '{{ stat_ostree.stat.exists }}' tags: - always roles: - { role: ceph-defaults, tags: [with_pkg, fetch_container_image], when: "(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)" } 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 - (ceph_docker_dev_image is undefined or not ceph_docker_dev_image) - hosts: mons 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 serial: 1 # MUST be '1' WHEN DEPLOYING MONITORS ON DOCKER CONTAINERS - hosts: mgrs become: True gather_facts: false 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" } - hosts: osds become: True gather_facts: false roles: - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-docker-common - { role: ceph-config, tags: ['ceph_update_config'] } - ceph-osd - hosts: mdss become: True gather_facts: false roles: - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-docker-common - { role: ceph-config, tags: ['ceph_update_config'] } - ceph-mds - hosts: rgws become: True gather_facts: false roles: - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-docker-common - { role: ceph-config, tags: ['ceph_update_config'] } - ceph-rgw - hosts: nfss become: True gather_facts: false 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" } - hosts: rbdmirrors become: True gather_facts: false roles: - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-docker-common - { role: ceph-config, tags: ['ceph_update_config'] } - ceph-rbd-mirror - hosts: restapis become: True gather_facts: false roles: - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-docker-common - { role: ceph-config, tags: ['ceph_update_config'] } - ceph-restapi - hosts: clients become: True gather_facts: false roles: - { role: ceph-defaults, tags: ['ceph_update_config'] } - ceph-docker-common - { role: ceph-config, tags: ['ceph_update_config'] } - ceph-client