ceph-ansible/site-docker.yml.sample

135 lines
2.9 KiB
Plaintext
Raw Normal View History

---
# 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
pre_tasks:
- name: gather and delegate facts
setup:
delegate_to: "{{ item }}"
delegate_facts: True
with_items: "{{ groups['all'] }}"
- name: check if it is atomic host
stat:
path: /run/ostree-booted
register: stat_ostree
tags:
- always
- name: set_fact is_atomic
set_fact:
atomic: '{{ stat_ostree.stat.exists }}'
tags:
- always
roles:
- { role: ceph-defaults,
tags: [with_pkg, fetch_container_image],
when: "(containerized_deployment | bool) and not (atomic | bool)" }
- { role: ceph-docker-common,
tags: [with_pkg, fetch_container_image],
when: "(containerized_deployment | bool) and not (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:
- atomic
- (ceph_docker_dev_image is undefined or not ceph_docker_dev_image)
- hosts: mons
become: True
gather_facts: false
roles:
- ceph-defaults
- ceph-docker-common
- ceph-config
- ceph-mon
serial: 1 # MUST be '1' WHEN DEPLOYING MONITORS ON DOCKER CONTAINERS
- hosts: mgrs
become: True
gather_facts: false
roles:
- ceph-defaults
- ceph-docker-common
- { role: ceph-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:
- ceph-defaults
- ceph-docker-common
- ceph-config
- ceph-osd
- hosts: mdss
become: True
gather_facts: false
roles:
- ceph-defaults
- ceph-docker-common
- ceph-config
- ceph-mds
- hosts: rgws
become: True
gather_facts: false
roles:
- ceph-defaults
- ceph-docker-common
- ceph-config
- ceph-rgw
- hosts: nfss
become: True
gather_facts: false
roles:
- ceph-defaults
- ceph-docker-common
- { role: ceph-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:
- ceph-defaults
- ceph-docker-common
- ceph-config
- ceph-rbd-mirror
- hosts: restapis
become: True
gather_facts: false
roles:
- ceph-defaults
- ceph-docker-common
- ceph-config
- ceph-restapi
- hosts: clients
become: True
gather_facts: false
roles:
- ceph-defaults
- ceph-docker-common
- ceph-config
- ceph-client