mirror of https://github.com/ceph/ceph-ansible.git
don't use "role" or "roles" to include roles
Since import_role and include_role are more readable, explicit (about the nature of inclusion) and flexible (allows placibf inclusion anywhere) amongst the tasks, use them instead of using roles or role keyword. Besides, these keywords also allow more arguments. Signed-off-by: Rishabh Dave <ridave@redhat.com>pull/3283/head
parent
8edbda96df
commit
3f62fc585f
|
@ -24,7 +24,8 @@
|
||||||
vars:
|
vars:
|
||||||
delegate_facts_host: True
|
delegate_facts_host: True
|
||||||
|
|
||||||
pre_tasks:
|
tasks:
|
||||||
|
# pre-tasks for following import
|
||||||
- name: gather facts
|
- name: gather facts
|
||||||
setup:
|
setup:
|
||||||
when:
|
when:
|
||||||
|
@ -41,15 +42,20 @@
|
||||||
when:
|
when:
|
||||||
- delegate_facts_host | bool
|
- delegate_facts_host | bool
|
||||||
|
|
||||||
roles:
|
- import_role:
|
||||||
- ceph-defaults
|
name: ceph-defaults
|
||||||
- ceph-validate
|
private: false
|
||||||
|
|
||||||
|
- import_role:
|
||||||
|
name: ceph-validate
|
||||||
|
private: false
|
||||||
|
|
||||||
- hosts: osds
|
- hosts: osds
|
||||||
gather_facts: False
|
gather_facts: False
|
||||||
become: True
|
become: True
|
||||||
|
|
||||||
pre_tasks:
|
tasks:
|
||||||
|
# pre-tasks for following import
|
||||||
# this task is needed so we can skip the openstack_config.yml include in roles/ceph-osd
|
# this task is needed so we can skip the openstack_config.yml include in roles/ceph-osd
|
||||||
- name: set_fact add_osd
|
- name: set_fact add_osd
|
||||||
set_fact:
|
set_fact:
|
||||||
|
@ -61,18 +67,37 @@
|
||||||
run_once: True
|
run_once: True
|
||||||
changed_when: False
|
changed_when: False
|
||||||
|
|
||||||
roles:
|
- import_role:
|
||||||
- role: ceph-defaults
|
name: ceph-defaults
|
||||||
- role: ceph-handler
|
private: false
|
||||||
- role: ceph-infra
|
|
||||||
- role: ceph-docker-common
|
|
||||||
when: containerized_deployment | bool
|
|
||||||
- role: ceph-common
|
|
||||||
when: not containerized_deployment | bool
|
|
||||||
- role: ceph-config
|
|
||||||
- role: ceph-osd
|
|
||||||
|
|
||||||
post_tasks:
|
- import_role:
|
||||||
|
name: ceph-handler
|
||||||
|
private: false
|
||||||
|
|
||||||
|
- import_role:
|
||||||
|
name: ceph-infra
|
||||||
|
private: false
|
||||||
|
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
when: containerized_deployment | bool
|
||||||
|
|
||||||
|
- import_role:
|
||||||
|
name: ceph-common
|
||||||
|
private: false
|
||||||
|
when: not containerized_deployment | bool
|
||||||
|
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
|
|
||||||
|
- import_role:
|
||||||
|
name: ceph-osd
|
||||||
|
private: false
|
||||||
|
|
||||||
|
# post-tasks for preceding import
|
||||||
- name: unset noup flag
|
- name: unset noup flag
|
||||||
command: "{{ docker_exec_cmd | default('') }} ceph --cluster {{ cluster }} osd unset noup"
|
command: "{{ docker_exec_cmd | default('') }} ceph --cluster {{ cluster }} osd unset noup"
|
||||||
delegate_to: "{{ groups['mons'][0] }}"
|
delegate_to: "{{ groups['mons'][0] }}"
|
||||||
|
|
|
@ -5,12 +5,20 @@
|
||||||
# and collect keys from a mon to bootstrap the rgw nodes
|
# and collect keys from a mon to bootstrap the rgw nodes
|
||||||
- hosts: mons
|
- hosts: mons
|
||||||
become: True
|
become: True
|
||||||
roles:
|
tasks:
|
||||||
- ceph-defaults
|
- import_role:
|
||||||
- ceph-fetch-keys
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-fetch-keys
|
||||||
|
private: false
|
||||||
|
|
||||||
- hosts: rgws
|
- hosts: rgws
|
||||||
become: True
|
become: True
|
||||||
roles:
|
tasks:
|
||||||
- ceph-defaults
|
- import_role:
|
||||||
- ceph-rgw
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-rgw
|
||||||
|
private: false
|
||||||
|
|
|
@ -79,19 +79,15 @@
|
||||||
- set_fact: rolling_update=true
|
- set_fact: rolling_update=true
|
||||||
|
|
||||||
- name: upgrade ceph mon cluster
|
- name: upgrade ceph mon cluster
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
health_mon_check_retries: 5
|
health_mon_check_retries: 5
|
||||||
health_mon_check_delay: 15
|
health_mon_check_delay: 15
|
||||||
upgrade_ceph_packages: True
|
upgrade_ceph_packages: True
|
||||||
|
|
||||||
hosts:
|
hosts:
|
||||||
- "{{ mon_group_name|default('mons') }}"
|
- "{{ mon_group_name|default('mons') }}"
|
||||||
|
|
||||||
serial: 1
|
serial: 1
|
||||||
become: True
|
become: True
|
||||||
|
tasks:
|
||||||
pre_tasks:
|
|
||||||
- name: set mon_host_count
|
- name: set mon_host_count
|
||||||
set_fact: mon_host_count={{ groups[mon_group_name] | length }}
|
set_fact: mon_host_count={{ groups[mon_group_name] | length }}
|
||||||
|
|
||||||
|
@ -123,15 +119,27 @@
|
||||||
when:
|
when:
|
||||||
- not containerized_deployment
|
- not containerized_deployment
|
||||||
|
|
||||||
roles:
|
- import_role:
|
||||||
- ceph-defaults
|
name: ceph-defaults
|
||||||
- ceph-handler
|
private: false
|
||||||
- { role: ceph-common, when: not containerized_deployment }
|
- import_role:
|
||||||
- { role: ceph-docker-common, when: containerized_deployment }
|
name: ceph-handler
|
||||||
- ceph-config
|
private: false
|
||||||
- ceph-mon
|
- import_role:
|
||||||
|
name: ceph-common
|
||||||
|
private: false
|
||||||
|
when: not containerized_deployment
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
when: containerized_deployment
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-mon
|
||||||
|
private: false
|
||||||
|
|
||||||
post_tasks:
|
|
||||||
- name: start ceph mon
|
- name: start ceph mon
|
||||||
systemd:
|
systemd:
|
||||||
name: ceph-mon@{{ monitor_name }}
|
name: ceph-mon@{{ monitor_name }}
|
||||||
|
@ -208,18 +216,14 @@
|
||||||
|
|
||||||
|
|
||||||
- name: upgrade ceph mgr node
|
- name: upgrade ceph mgr node
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
upgrade_ceph_packages: True
|
upgrade_ceph_packages: True
|
||||||
ceph_release: "{{ ceph_stable_release }}"
|
ceph_release: "{{ ceph_stable_release }}"
|
||||||
|
|
||||||
hosts:
|
hosts:
|
||||||
- "{{ mgr_group_name|default('mgrs') }}"
|
- "{{ mgr_group_name|default('mgrs') }}"
|
||||||
|
|
||||||
serial: 1
|
serial: 1
|
||||||
become: True
|
become: True
|
||||||
|
tasks:
|
||||||
pre_tasks:
|
|
||||||
- name: non container - get current fsid
|
- name: non container - get current fsid
|
||||||
command: "ceph --cluster {{ cluster }} fsid"
|
command: "ceph --cluster {{ cluster }} fsid"
|
||||||
register: cluster_uuid_non_container
|
register: cluster_uuid_non_container
|
||||||
|
@ -294,15 +298,27 @@
|
||||||
when:
|
when:
|
||||||
- not containerized_deployment
|
- not containerized_deployment
|
||||||
|
|
||||||
roles:
|
- import_role:
|
||||||
- ceph-defaults
|
name: ceph-defaults
|
||||||
- ceph-handler
|
private: false
|
||||||
- { role: ceph-common, when: not containerized_deployment }
|
- import_role:
|
||||||
- { role: ceph-docker-common, when: containerized_deployment }
|
name: ceph-handler
|
||||||
- ceph-config
|
private: false
|
||||||
- ceph-mgr
|
- import_role:
|
||||||
|
name: ceph-common
|
||||||
|
private: false
|
||||||
|
when: not containerized_deployment
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
when: containerized_deployment
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-mgr
|
||||||
|
private: false
|
||||||
|
|
||||||
post_tasks:
|
|
||||||
- name: start ceph mgr
|
- name: start ceph mgr
|
||||||
systemd:
|
systemd:
|
||||||
name: ceph-mgr@{{ ansible_hostname }}
|
name: ceph-mgr@{{ ansible_hostname }}
|
||||||
|
@ -322,7 +338,6 @@
|
||||||
|
|
||||||
|
|
||||||
- name: upgrade ceph osds cluster
|
- name: upgrade ceph osds cluster
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
health_osd_check_retries: 40
|
health_osd_check_retries: 40
|
||||||
health_osd_check_delay: 30
|
health_osd_check_delay: 30
|
||||||
|
@ -330,11 +345,9 @@
|
||||||
|
|
||||||
hosts:
|
hosts:
|
||||||
- "{{ osd_group_name|default('osds') }}"
|
- "{{ osd_group_name|default('osds') }}"
|
||||||
|
|
||||||
serial: 1
|
serial: 1
|
||||||
become: True
|
become: True
|
||||||
|
tasks:
|
||||||
pre_tasks:
|
|
||||||
- name: get osd numbers - non container
|
- name: get osd numbers - non container
|
||||||
shell: "if [ -d /var/lib/ceph/osd ] ; then ls /var/lib/ceph/osd | sed 's/.*-//' ; fi"
|
shell: "if [ -d /var/lib/ceph/osd ] ; then ls /var/lib/ceph/osd | sed 's/.*-//' ; fi"
|
||||||
register: osd_ids
|
register: osd_ids
|
||||||
|
@ -356,15 +369,27 @@
|
||||||
when:
|
when:
|
||||||
- not containerized_deployment
|
- not containerized_deployment
|
||||||
|
|
||||||
roles:
|
- import_role:
|
||||||
- ceph-defaults
|
name: ceph-defaults
|
||||||
- ceph-handler
|
private: false
|
||||||
- { role: ceph-common, when: not containerized_deployment }
|
- import_role:
|
||||||
- { role: ceph-docker-common, when: containerized_deployment }
|
name: ceph-handler
|
||||||
- ceph-config
|
private: false
|
||||||
- ceph-osd
|
- import_role:
|
||||||
|
name: ceph-common
|
||||||
|
private: false
|
||||||
|
when: not containerized_deployment
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
when: containerized_deployment
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-osd
|
||||||
|
private: false
|
||||||
|
|
||||||
post_tasks:
|
|
||||||
- name: get osd numbers
|
- name: get osd numbers
|
||||||
shell: "if [ -d /var/lib/ceph/osd ] ; then ls /var/lib/ceph/osd | sed 's/.*-//' ; fi"
|
shell: "if [ -d /var/lib/ceph/osd ] ; then ls /var/lib/ceph/osd | sed 's/.*-//' ; fi"
|
||||||
register: osd_ids
|
register: osd_ids
|
||||||
|
@ -441,10 +466,11 @@
|
||||||
|
|
||||||
become: True
|
become: True
|
||||||
|
|
||||||
roles:
|
|
||||||
- ceph-defaults
|
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
- import_role:
|
||||||
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
|
|
||||||
- name: set_fact docker_exec_cmd_osd
|
- name: set_fact docker_exec_cmd_osd
|
||||||
set_fact:
|
set_fact:
|
||||||
docker_exec_cmd_update_osd: "docker exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }}"
|
docker_exec_cmd_update_osd: "docker exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }}"
|
||||||
|
@ -478,17 +504,13 @@
|
||||||
- ceph_versions_osd | string is search("ceph version 12")
|
- ceph_versions_osd | string is search("ceph version 12")
|
||||||
|
|
||||||
- name: upgrade ceph mdss cluster
|
- name: upgrade ceph mdss cluster
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
upgrade_ceph_packages: True
|
upgrade_ceph_packages: True
|
||||||
|
|
||||||
hosts:
|
hosts:
|
||||||
- "{{ mds_group_name|default('mdss') }}"
|
- "{{ mds_group_name|default('mdss') }}"
|
||||||
|
|
||||||
serial: 1
|
serial: 1
|
||||||
become: True
|
become: True
|
||||||
|
tasks:
|
||||||
pre_tasks:
|
|
||||||
- name: stop ceph mds
|
- name: stop ceph mds
|
||||||
systemd:
|
systemd:
|
||||||
name: ceph-mds@{{ ansible_hostname }}
|
name: ceph-mds@{{ ansible_hostname }}
|
||||||
|
@ -497,15 +519,27 @@
|
||||||
when:
|
when:
|
||||||
- not containerized_deployment
|
- not containerized_deployment
|
||||||
|
|
||||||
roles:
|
- import_role:
|
||||||
- ceph-defaults
|
name: ceph-defaults
|
||||||
- ceph-handler
|
private: false
|
||||||
- { role: ceph-common, when: not containerized_deployment }
|
- import_role:
|
||||||
- { role: ceph-docker-common, when: containerized_deployment }
|
name: ceph-handler
|
||||||
- ceph-config
|
private: false
|
||||||
- ceph-mds
|
- import_role:
|
||||||
|
name: ceph-common
|
||||||
|
private: false
|
||||||
|
when: not containerized_deployment
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
when: containerized_deployment
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-mds
|
||||||
|
private: false
|
||||||
|
|
||||||
post_tasks:
|
|
||||||
- name: start ceph mds
|
- name: start ceph mds
|
||||||
systemd:
|
systemd:
|
||||||
name: ceph-mds@{{ ansible_hostname }}
|
name: ceph-mds@{{ ansible_hostname }}
|
||||||
|
@ -525,17 +559,13 @@
|
||||||
|
|
||||||
|
|
||||||
- name: upgrade ceph rgws cluster
|
- name: upgrade ceph rgws cluster
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
upgrade_ceph_packages: True
|
upgrade_ceph_packages: True
|
||||||
|
|
||||||
hosts:
|
hosts:
|
||||||
- "{{ rgw_group_name|default('rgws') }}"
|
- "{{ rgw_group_name|default('rgws') }}"
|
||||||
|
|
||||||
serial: 1
|
serial: 1
|
||||||
become: True
|
become: True
|
||||||
|
tasks:
|
||||||
pre_tasks:
|
|
||||||
- name: stop ceph rgw
|
- name: stop ceph rgw
|
||||||
systemd:
|
systemd:
|
||||||
name: ceph-radosgw@rgw.{{ ansible_hostname }}
|
name: ceph-radosgw@rgw.{{ ansible_hostname }}
|
||||||
|
@ -544,15 +574,27 @@
|
||||||
when:
|
when:
|
||||||
- not containerized_deployment
|
- not containerized_deployment
|
||||||
|
|
||||||
roles:
|
- import_role:
|
||||||
- ceph-defaults
|
name: ceph-defaults
|
||||||
- ceph-handler
|
private: false
|
||||||
- { role: ceph-common, when: not containerized_deployment }
|
- import_role:
|
||||||
- { role: ceph-docker-common, when: containerized_deployment }
|
name: ceph-handler
|
||||||
- ceph-config
|
private: false
|
||||||
- ceph-rgw
|
- import_role:
|
||||||
|
name: ceph-common
|
||||||
|
private: false
|
||||||
|
when: not containerized_deployment
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
when: containerized_deployment
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-rgw
|
||||||
|
private: false
|
||||||
|
|
||||||
post_tasks:
|
|
||||||
- name: start ceph rgw
|
- name: start ceph rgw
|
||||||
systemd:
|
systemd:
|
||||||
name: ceph-radosgw@rgw.{{ ansible_hostname }}
|
name: ceph-radosgw@rgw.{{ ansible_hostname }}
|
||||||
|
@ -572,17 +614,13 @@
|
||||||
|
|
||||||
|
|
||||||
- name: upgrade ceph rbd mirror node
|
- name: upgrade ceph rbd mirror node
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
upgrade_ceph_packages: True
|
upgrade_ceph_packages: True
|
||||||
|
|
||||||
hosts:
|
hosts:
|
||||||
- "{{ rbd_mirror_group_name|default('rbdmirrors') }}"
|
- "{{ rbd_mirror_group_name|default('rbdmirrors') }}"
|
||||||
|
|
||||||
serial: 1
|
serial: 1
|
||||||
become: True
|
become: True
|
||||||
|
tasks:
|
||||||
pre_tasks:
|
|
||||||
# NOTE(leseb): these tasks have a 'failed_when: false'
|
# NOTE(leseb): these tasks have a 'failed_when: false'
|
||||||
# in case we run before luminous or after
|
# in case we run before luminous or after
|
||||||
- name: stop ceph rbd mirror before luminous
|
- name: stop ceph rbd mirror before luminous
|
||||||
|
@ -599,15 +637,27 @@
|
||||||
enabled: yes
|
enabled: yes
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
|
||||||
roles:
|
- import_role:
|
||||||
- ceph-defaults
|
name: ceph-defaults
|
||||||
- ceph-handler
|
private: false
|
||||||
- { role: ceph-common, when: not containerized_deployment }
|
- import_role:
|
||||||
- { role: ceph-docker-common, when: containerized_deployment }
|
name: ceph-handler
|
||||||
- ceph-config
|
private: false
|
||||||
- ceph-rbd-mirror
|
- import_role:
|
||||||
|
name: ceph-common
|
||||||
|
private: false
|
||||||
|
when: not containerized_deployment
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
when: containerized_deployment
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-rbd-mirror
|
||||||
|
private: false
|
||||||
|
|
||||||
post_tasks:
|
|
||||||
- name: start ceph rbd mirror
|
- name: start ceph rbd mirror
|
||||||
systemd:
|
systemd:
|
||||||
name: "ceph-rbd-mirror@rbd-mirror.{{ ansible_hostname }}"
|
name: "ceph-rbd-mirror@rbd-mirror.{{ ansible_hostname }}"
|
||||||
|
@ -627,17 +677,13 @@
|
||||||
|
|
||||||
|
|
||||||
- name: upgrade ceph nfs node
|
- name: upgrade ceph nfs node
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
upgrade_ceph_packages: True
|
upgrade_ceph_packages: True
|
||||||
|
|
||||||
hosts:
|
hosts:
|
||||||
- "{{ nfs_group_name|default('nfss') }}"
|
- "{{ nfs_group_name|default('nfss') }}"
|
||||||
|
|
||||||
serial: 1
|
serial: 1
|
||||||
become: True
|
become: True
|
||||||
|
tasks:
|
||||||
pre_tasks:
|
|
||||||
# failed_when: false is here so that if we upgrade
|
# failed_when: false is here so that if we upgrade
|
||||||
# from a version of ceph that does not have nfs-ganesha
|
# from a version of ceph that does not have nfs-ganesha
|
||||||
# then this task will not fail
|
# then this task will not fail
|
||||||
|
@ -650,15 +696,27 @@
|
||||||
when:
|
when:
|
||||||
- not containerized_deployment
|
- not containerized_deployment
|
||||||
|
|
||||||
roles:
|
- import_role:
|
||||||
- ceph-defaults
|
name: ceph-defaults
|
||||||
- ceph-handler
|
private: false
|
||||||
- { role: ceph-common, when: not containerized_deployment }
|
- import_role:
|
||||||
- { role: ceph-docker-common, when: containerized_deployment }
|
name: ceph-handler
|
||||||
- ceph-config
|
private: false
|
||||||
- ceph-nfs
|
- import_role:
|
||||||
|
name: ceph-common
|
||||||
|
private: false
|
||||||
|
when: not containerized_deployment
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
when: containerized_deployment
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-nfs
|
||||||
|
private: false
|
||||||
|
|
||||||
post_tasks:
|
|
||||||
- name: start nfs gateway
|
- name: start nfs gateway
|
||||||
systemd:
|
systemd:
|
||||||
name: nfs-ganesha
|
name: nfs-ganesha
|
||||||
|
@ -680,18 +738,14 @@
|
||||||
|
|
||||||
|
|
||||||
- name: upgrade ceph iscsi gateway node
|
- name: upgrade ceph iscsi gateway node
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
upgrade_ceph_packages: True
|
upgrade_ceph_packages: True
|
||||||
|
|
||||||
hosts:
|
hosts:
|
||||||
- "{{ iscsi_gw_group_name|default('iscsigws') }}"
|
- "{{ iscsi_gw_group_name|default('iscsigws') }}"
|
||||||
- iscsi-gws # for backward compatibility only!
|
- iscsi-gws # for backward compatibility only!
|
||||||
|
|
||||||
serial: 1
|
serial: 1
|
||||||
become: True
|
become: True
|
||||||
|
tasks:
|
||||||
pre_tasks:
|
|
||||||
# failed_when: false is here so that if we upgrade
|
# failed_when: false is here so that if we upgrade
|
||||||
# from a version of ceph that does not have iscsi gws
|
# from a version of ceph that does not have iscsi gws
|
||||||
# then this task will not fail
|
# then this task will not fail
|
||||||
|
@ -704,15 +758,27 @@
|
||||||
when:
|
when:
|
||||||
- not containerized_deployment
|
- not containerized_deployment
|
||||||
|
|
||||||
roles:
|
- import_role:
|
||||||
- ceph-defaults
|
name: ceph-defaults
|
||||||
- ceph-handler
|
private: false
|
||||||
- { role: ceph-common, when: not containerized_deployment }
|
- import_role:
|
||||||
- { role: ceph-docker-common, when: containerized_deployment }
|
name: ceph-handler
|
||||||
- ceph-config
|
private: false
|
||||||
- ceph-iscsi-gw
|
- import_role:
|
||||||
|
name: ceph-common
|
||||||
|
private: false
|
||||||
|
when: not containerized_deployment
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
when: containerized_deployment
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-iscsi-gw
|
||||||
|
private: false
|
||||||
|
|
||||||
post_tasks:
|
|
||||||
- name: start rbd-target-gw
|
- name: start rbd-target-gw
|
||||||
systemd:
|
systemd:
|
||||||
name: rbd-target-gw
|
name: rbd-target-gw
|
||||||
|
@ -723,36 +789,43 @@
|
||||||
|
|
||||||
|
|
||||||
- name: upgrade ceph client node
|
- name: upgrade ceph client node
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
upgrade_ceph_packages: True
|
upgrade_ceph_packages: True
|
||||||
|
|
||||||
hosts:
|
hosts:
|
||||||
- "{{ client_group_name|default('clients') }}"
|
- "{{ client_group_name|default('clients') }}"
|
||||||
|
|
||||||
serial: 1
|
serial: 1
|
||||||
become: True
|
become: True
|
||||||
|
tasks:
|
||||||
roles:
|
- import_role:
|
||||||
- ceph-defaults
|
name: ceph-defaults
|
||||||
- ceph-handler
|
private: false
|
||||||
- { role: ceph-common, when: not containerized_deployment }
|
- import_role:
|
||||||
- { role: ceph-docker-common, when: containerized_deployment }
|
name: ceph-handler
|
||||||
- ceph-config
|
private: false
|
||||||
- ceph-client
|
- import_role:
|
||||||
|
name: ceph-common
|
||||||
|
private: false
|
||||||
|
when: not containerized_deployment
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
when: containerized_deployment
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-client
|
||||||
|
private: false
|
||||||
|
|
||||||
|
|
||||||
- name: show ceph status
|
- name: show ceph status
|
||||||
|
|
||||||
hosts:
|
hosts:
|
||||||
- "{{ mon_group_name|default('mons') }}"
|
- "{{ mon_group_name|default('mons') }}"
|
||||||
|
|
||||||
become: True
|
become: True
|
||||||
|
|
||||||
roles:
|
|
||||||
- ceph-defaults
|
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
- import_role:
|
||||||
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
- name: set_fact docker_exec_cmd_status
|
- name: set_fact docker_exec_cmd_status
|
||||||
set_fact:
|
set_fact:
|
||||||
docker_exec_cmd_status: "docker exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }}"
|
docker_exec_cmd_status: "docker exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }}"
|
||||||
|
|
|
@ -23,22 +23,19 @@
|
||||||
- debug: msg="gather facts on all Ceph hosts for following reference"
|
- debug: msg="gather facts on all Ceph hosts for following reference"
|
||||||
|
|
||||||
- name: confirm whether user really meant to remove monitor from the ceph cluster
|
- name: confirm whether user really meant to remove monitor from the ceph cluster
|
||||||
|
|
||||||
hosts:
|
hosts:
|
||||||
- localhost
|
- localhost
|
||||||
|
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
vars_prompt:
|
vars_prompt:
|
||||||
- name: ireallymeanit
|
- name: ireallymeanit
|
||||||
prompt: Are you sure you want to shrink the cluster?
|
prompt: Are you sure you want to shrink the cluster?
|
||||||
default: 'no'
|
default: 'no'
|
||||||
private: no
|
private: no
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
mon_group_name: mons
|
mon_group_name: mons
|
||||||
|
|
||||||
pre_tasks:
|
tasks:
|
||||||
|
# pre task for following import
|
||||||
- name: exit playbook, if only one monitor is present in cluster
|
- name: exit playbook, if only one monitor is present in cluster
|
||||||
fail:
|
fail:
|
||||||
msg: "You are about to shrink the only monitor present in the cluster.
|
msg: "You are about to shrink the only monitor present in the cluster.
|
||||||
|
@ -70,10 +67,11 @@
|
||||||
when:
|
when:
|
||||||
- ireallymeanit != 'yes'
|
- ireallymeanit != 'yes'
|
||||||
|
|
||||||
roles:
|
- import_role:
|
||||||
- ceph-defaults
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
|
|
||||||
post_tasks:
|
# post_tasks for preceding import
|
||||||
- name: pick a monitor different than the one we want to remove
|
- name: pick a monitor different than the one we want to remove
|
||||||
set_fact:
|
set_fact:
|
||||||
mon_host: "{{ item }}"
|
mon_host: "{{ item }}"
|
||||||
|
|
|
@ -22,23 +22,19 @@
|
||||||
- debug: msg="gather facts on all Ceph hosts for following reference"
|
- debug: msg="gather facts on all Ceph hosts for following reference"
|
||||||
|
|
||||||
- name: confirm whether user really meant to remove osd(s) from the cluster
|
- name: confirm whether user really meant to remove osd(s) from the cluster
|
||||||
|
|
||||||
hosts:
|
hosts:
|
||||||
- localhost
|
- localhost
|
||||||
|
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
vars_prompt:
|
vars_prompt:
|
||||||
- name: ireallymeanit
|
- name: ireallymeanit
|
||||||
prompt: Are you sure you want to shrink the cluster?
|
prompt: Are you sure you want to shrink the cluster?
|
||||||
default: 'no'
|
default: 'no'
|
||||||
private: no
|
private: no
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
mon_group_name: mons
|
mon_group_name: mons
|
||||||
osd_group_name: osds
|
osd_group_name: osds
|
||||||
|
tasks:
|
||||||
pre_tasks:
|
# pre-task for following import
|
||||||
- name: exit playbook, if user did not mean to shrink cluster
|
- name: exit playbook, if user did not mean to shrink cluster
|
||||||
fail:
|
fail:
|
||||||
msg: "Exiting shrink-osd playbook, no osd(s) was/were removed..
|
msg: "Exiting shrink-osd playbook, no osd(s) was/were removed..
|
||||||
|
@ -55,11 +51,11 @@
|
||||||
-e osd_to_kill=0,1,2,3 argument."
|
-e osd_to_kill=0,1,2,3 argument."
|
||||||
when: osd_to_kill is not defined
|
when: osd_to_kill is not defined
|
||||||
|
|
||||||
roles:
|
- import_role:
|
||||||
- ceph-defaults
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
post_tasks:
|
|
||||||
|
|
||||||
|
# post-task for preceding import
|
||||||
- name: set_fact docker_exec_cmd build docker exec command (containerized)
|
- name: set_fact docker_exec_cmd build docker exec command (containerized)
|
||||||
set_fact:
|
set_fact:
|
||||||
docker_exec_cmd: "docker exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }}"
|
docker_exec_cmd: "docker exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }}"
|
||||||
|
|
|
@ -47,20 +47,17 @@
|
||||||
with_items: "{{ groups['all'] }}"
|
with_items: "{{ groups['all'] }}"
|
||||||
|
|
||||||
- name: switching from non-containerized to containerized ceph mon
|
- name: switching from non-containerized to containerized ceph mon
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
health_mon_check_retries: 5
|
health_mon_check_retries: 5
|
||||||
health_mon_check_delay: 15
|
health_mon_check_delay: 15
|
||||||
containerized_deployment: true
|
containerized_deployment: true
|
||||||
mon_group_name: mons
|
mon_group_name: mons
|
||||||
|
|
||||||
hosts:
|
hosts:
|
||||||
- "{{ mon_group_name|default('mons') }}"
|
- "{{ mon_group_name|default('mons') }}"
|
||||||
|
|
||||||
serial: 1
|
serial: 1
|
||||||
become: true
|
become: true
|
||||||
|
tasks:
|
||||||
pre_tasks:
|
# pre-tasks for following import -
|
||||||
- name: select a running monitor
|
- name: select a running monitor
|
||||||
set_fact: mon_host={{ item }}
|
set_fact: mon_host={{ item }}
|
||||||
with_items: "{{ groups[mon_group_name] }}"
|
with_items: "{{ groups[mon_group_name] }}"
|
||||||
|
@ -115,13 +112,20 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
|
||||||
roles:
|
- import_role:
|
||||||
- ceph-defaults
|
name: ceph-defaults
|
||||||
- ceph-handler
|
private: false
|
||||||
- ceph-docker-common
|
- import_role:
|
||||||
- ceph-mon
|
name: ceph-handler
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-mon
|
||||||
|
private: false
|
||||||
|
|
||||||
post_tasks:
|
# post-tasks for preceding import -
|
||||||
# We don't do a container test by running 'docker exec ...' since not all the monitors have switched to containers yet.
|
# We don't do a container test by running 'docker exec ...' since not all the monitors have switched to containers yet.
|
||||||
# Thus, we continue to use the 'ceph' binary from the host, there is no issue with that.
|
# Thus, we continue to use the 'ceph' binary from the host, there is no issue with that.
|
||||||
- name: non container | waiting for the monitor to join the quorum...
|
- name: non container | waiting for the monitor to join the quorum...
|
||||||
|
@ -144,8 +148,8 @@
|
||||||
|
|
||||||
serial: 1
|
serial: 1
|
||||||
become: true
|
become: true
|
||||||
|
tasks:
|
||||||
pre_tasks:
|
# pre-tasks for following import -
|
||||||
# failed_when: false is here because if we're
|
# failed_when: false is here because if we're
|
||||||
# working with a jewel cluster then ceph mgr
|
# working with a jewel cluster then ceph mgr
|
||||||
# will not exist
|
# will not exist
|
||||||
|
@ -173,11 +177,21 @@
|
||||||
- /var/lib/ceph
|
- /var/lib/ceph
|
||||||
- /etc/ceph
|
- /etc/ceph
|
||||||
|
|
||||||
roles:
|
- import_role:
|
||||||
- ceph-defaults
|
name: ceph-defaults
|
||||||
- ceph-handler
|
private: false
|
||||||
- ceph-docker-common
|
|
||||||
- ceph-mgr
|
- import_role:
|
||||||
|
name: ceph-handler
|
||||||
|
private: false
|
||||||
|
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
|
||||||
|
- import_role:
|
||||||
|
name: ceph-mgr
|
||||||
|
private: false
|
||||||
|
|
||||||
|
|
||||||
- name: switching from non-containerized to containerized ceph osd
|
- name: switching from non-containerized to containerized ceph osd
|
||||||
|
@ -193,9 +207,9 @@
|
||||||
|
|
||||||
serial: 1
|
serial: 1
|
||||||
become: true
|
become: true
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
# pre-tasks for following importing
|
||||||
pre_tasks:
|
|
||||||
- name: collect running osds and ceph-disk unit(s)
|
- name: collect running osds and ceph-disk unit(s)
|
||||||
shell: |
|
shell: |
|
||||||
systemctl list-units | grep "loaded active" | grep -Eo 'ceph-osd@[0-9]+.service|ceph-disk@dev-[a-z]{3,4}[0-9]{1}.service'
|
systemctl list-units | grep "loaded active" | grep -Eo 'ceph-osd@[0-9]+.service|ceph-disk@dev-[a-z]{3,4}[0-9]{1}.service'
|
||||||
|
@ -288,13 +302,23 @@
|
||||||
when:
|
when:
|
||||||
- item.1.get("rc", 0) != 0
|
- item.1.get("rc", 0) != 0
|
||||||
|
|
||||||
roles:
|
- import_role:
|
||||||
- ceph-defaults
|
name: ceph-defaults
|
||||||
- ceph-handler
|
private: false
|
||||||
- ceph-docker-common
|
|
||||||
- ceph-osd
|
|
||||||
|
|
||||||
post_tasks:
|
- import_role:
|
||||||
|
name: ceph-handler
|
||||||
|
private: false
|
||||||
|
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
|
||||||
|
- import_role:
|
||||||
|
name: ceph-osd
|
||||||
|
private: false
|
||||||
|
|
||||||
|
# post-task for preceding import -
|
||||||
- name: get num_pgs
|
- name: get num_pgs
|
||||||
command: docker exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }} ceph --cluster "{{ cluster }}" -s --format json
|
command: docker exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }} ceph --cluster "{{ cluster }}" -s --format json
|
||||||
register: ceph_pgs
|
register: ceph_pgs
|
||||||
|
@ -325,8 +349,9 @@
|
||||||
|
|
||||||
serial: 1
|
serial: 1
|
||||||
become: true
|
become: true
|
||||||
|
tasks:
|
||||||
|
|
||||||
pre_tasks:
|
# pre-tasks for following inmport
|
||||||
- name: stop non-containerized ceph mds(s)
|
- name: stop non-containerized ceph mds(s)
|
||||||
service:
|
service:
|
||||||
name: "ceph-mds@{{ ansible_hostname }}"
|
name: "ceph-mds@{{ ansible_hostname }}"
|
||||||
|
@ -350,11 +375,21 @@
|
||||||
- /var/lib/ceph
|
- /var/lib/ceph
|
||||||
- /etc/ceph
|
- /etc/ceph
|
||||||
|
|
||||||
roles:
|
- import_role:
|
||||||
- ceph-defaults
|
name: ceph-defaults
|
||||||
- ceph-handler
|
private: false
|
||||||
- ceph-docker-common
|
|
||||||
- ceph-mds
|
- import_role:
|
||||||
|
name: ceph-handler
|
||||||
|
private: false
|
||||||
|
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
|
||||||
|
- import_role:
|
||||||
|
name: ceph-mds
|
||||||
|
private: false
|
||||||
|
|
||||||
|
|
||||||
- name: switching from non-containerized to containerized ceph rgw
|
- name: switching from non-containerized to containerized ceph rgw
|
||||||
|
@ -368,8 +403,9 @@
|
||||||
|
|
||||||
serial: 1
|
serial: 1
|
||||||
become: true
|
become: true
|
||||||
|
tasks:
|
||||||
|
|
||||||
pre_tasks:
|
# pre-tasks for following import -
|
||||||
- name: stop non-containerized ceph rgw(s)
|
- name: stop non-containerized ceph rgw(s)
|
||||||
service:
|
service:
|
||||||
name: "ceph-radosgw@rgw.{{ ansible_hostname }}"
|
name: "ceph-radosgw@rgw.{{ ansible_hostname }}"
|
||||||
|
@ -393,11 +429,21 @@
|
||||||
- /var/lib/ceph
|
- /var/lib/ceph
|
||||||
- /etc/ceph
|
- /etc/ceph
|
||||||
|
|
||||||
roles:
|
- import_role:
|
||||||
- ceph-defaults
|
name: ceph-defaults
|
||||||
- ceph-handler
|
private: false
|
||||||
- ceph-docker-common
|
|
||||||
- ceph-rgw
|
- import_role:
|
||||||
|
name: ceph-handler
|
||||||
|
private: false
|
||||||
|
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
|
||||||
|
- import_role:
|
||||||
|
name: ceph-rgw
|
||||||
|
private: false
|
||||||
|
|
||||||
|
|
||||||
- name: switching from non-containerized to containerized ceph rbd-mirror
|
- name: switching from non-containerized to containerized ceph rbd-mirror
|
||||||
|
@ -411,8 +457,8 @@
|
||||||
|
|
||||||
serial: 1
|
serial: 1
|
||||||
become: true
|
become: true
|
||||||
|
tasks:
|
||||||
pre_tasks:
|
# pre-tasks for following import -
|
||||||
- name: stop non-containerized ceph rbd mirror(s)
|
- name: stop non-containerized ceph rbd mirror(s)
|
||||||
service:
|
service:
|
||||||
name: "ceph-rbd-mirror@rbd-mirror.{{ ansible_hostname }}"
|
name: "ceph-rbd-mirror@rbd-mirror.{{ ansible_hostname }}"
|
||||||
|
@ -436,11 +482,21 @@
|
||||||
- /var/lib/ceph
|
- /var/lib/ceph
|
||||||
- /etc/ceph
|
- /etc/ceph
|
||||||
|
|
||||||
roles:
|
- import_role:
|
||||||
- ceph-defaults
|
name: ceph-defaults
|
||||||
- ceph-handler
|
private: false
|
||||||
- ceph-docker-common
|
|
||||||
- ceph-rbd-mirror
|
- import_role:
|
||||||
|
name: ceph-handler
|
||||||
|
private: false
|
||||||
|
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
|
||||||
|
- import_role:
|
||||||
|
name: ceph-rbd-mirror
|
||||||
|
private: false
|
||||||
|
|
||||||
|
|
||||||
- name: switching from non-containerized to containerized ceph nfs
|
- name: switching from non-containerized to containerized ceph nfs
|
||||||
|
@ -454,8 +510,9 @@
|
||||||
|
|
||||||
serial: 1
|
serial: 1
|
||||||
become: true
|
become: true
|
||||||
|
tasks:
|
||||||
|
|
||||||
pre_tasks:
|
# pre-tasks for following import -
|
||||||
# failed_when: false is here because if we're
|
# failed_when: false is here because if we're
|
||||||
# working with a jewel cluster then ceph nfs
|
# working with a jewel cluster then ceph nfs
|
||||||
# will not exist
|
# will not exist
|
||||||
|
@ -483,8 +540,18 @@
|
||||||
- /var/lib/ceph
|
- /var/lib/ceph
|
||||||
- /etc/ceph
|
- /etc/ceph
|
||||||
|
|
||||||
roles:
|
- import_role:
|
||||||
- ceph-defaults
|
name: ceph-defaults
|
||||||
- ceph-handler
|
private: false
|
||||||
- ceph-docker-common
|
|
||||||
- ceph-nfs
|
- import_role:
|
||||||
|
name: ceph-handler
|
||||||
|
private: false
|
||||||
|
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
|
||||||
|
- import_role:
|
||||||
|
name: ceph-nfs
|
||||||
|
private: false
|
||||||
|
|
|
@ -13,9 +13,13 @@
|
||||||
|
|
||||||
- hosts: mons
|
- hosts: mons
|
||||||
become: True
|
become: True
|
||||||
roles:
|
tasks:
|
||||||
- ceph-defaults
|
- import_role:
|
||||||
- ceph-fetch-keys
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-fetch-keys
|
||||||
|
private: false
|
||||||
|
|
||||||
- hosts:
|
- hosts:
|
||||||
- mons
|
- mons
|
||||||
|
@ -29,11 +33,12 @@
|
||||||
- mgrs
|
- mgrs
|
||||||
- iscsi-gw
|
- iscsi-gw
|
||||||
become: true
|
become: true
|
||||||
|
tasks:
|
||||||
|
- import_role:
|
||||||
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
|
|
||||||
roles:
|
# post-tasks for preceding import -
|
||||||
- ceph-defaults
|
|
||||||
|
|
||||||
post_tasks:
|
|
||||||
- name: get the name of the existing ceph cluster
|
- name: get the name of the existing ceph cluster
|
||||||
shell: |
|
shell: |
|
||||||
basename $(grep --exclude '*.bak' -R fsid /etc/ceph/ | egrep -o '^[^.]*' | head -n 1)
|
basename $(grep --exclude '*.bak' -R fsid /etc/ceph/ | egrep -o '^[^.]*' | head -n 1)
|
||||||
|
@ -65,4 +70,3 @@
|
||||||
mode: "{{ ceph_conf_stat.stat.mode }}"
|
mode: "{{ ceph_conf_stat.stat.mode }}"
|
||||||
config_overrides: "{{ ceph_conf_overrides }}"
|
config_overrides: "{{ ceph_conf_overrides }}"
|
||||||
config_type: ini
|
config_type: ini
|
||||||
|
|
||||||
|
|
|
@ -26,23 +26,19 @@
|
||||||
- debug: msg="gather facts on all Ceph hosts for following reference"
|
- debug: msg="gather facts on all Ceph hosts for following reference"
|
||||||
|
|
||||||
- name: confirm whether user really meant to replace osd(s)
|
- name: confirm whether user really meant to replace osd(s)
|
||||||
|
|
||||||
hosts:
|
hosts:
|
||||||
- localhost
|
- localhost
|
||||||
|
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
vars_prompt:
|
vars_prompt:
|
||||||
- name: ireallymeanit
|
- name: ireallymeanit
|
||||||
prompt: Are you sure you want to replace the osd(s)?
|
prompt: Are you sure you want to replace the osd(s)?
|
||||||
default: 'no'
|
default: 'no'
|
||||||
private: no
|
private: no
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
mon_group_name: mons
|
mon_group_name: mons
|
||||||
osd_group_name: osds
|
osd_group_name: osds
|
||||||
|
tasks:
|
||||||
pre_tasks:
|
# pre-tasks for following import -
|
||||||
- name: exit playbook, if user did not mean to replace the osd(s)
|
- name: exit playbook, if user did not mean to replace the osd(s)
|
||||||
fail:
|
fail:
|
||||||
msg: "Exiting replace-osd playbook, no osd(s) was/were replaced..
|
msg: "Exiting replace-osd playbook, no osd(s) was/were replaced..
|
||||||
|
@ -59,11 +55,11 @@
|
||||||
-e osd_to_replace=0,1,2,3 argument."
|
-e osd_to_replace=0,1,2,3 argument."
|
||||||
when: osd_to_replace is not defined
|
when: osd_to_replace is not defined
|
||||||
|
|
||||||
roles:
|
- import_role:
|
||||||
- ceph-defaults
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
post_tasks:
|
|
||||||
|
|
||||||
|
# post-tasks for preceding import -
|
||||||
- name: set_fact docker_exec_cmd build docker exec command (containerized)
|
- name: set_fact docker_exec_cmd build docker exec command (containerized)
|
||||||
set_fact:
|
set_fact:
|
||||||
docker_exec_cmd: "docker exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }}"
|
docker_exec_cmd: "docker exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }}"
|
||||||
|
|
|
@ -21,7 +21,8 @@
|
||||||
vars:
|
vars:
|
||||||
delegate_facts_host: True
|
delegate_facts_host: True
|
||||||
|
|
||||||
pre_tasks:
|
tasks:
|
||||||
|
# pre-tasks for following import -
|
||||||
- name: gather facts
|
- name: gather facts
|
||||||
setup:
|
setup:
|
||||||
when:
|
when:
|
||||||
|
@ -49,19 +50,29 @@
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
roles:
|
- import_role:
|
||||||
- role: ceph-defaults
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
tags: [with_pkg, fetch_container_image]
|
tags: [with_pkg, fetch_container_image]
|
||||||
- role: ceph-validate
|
- import_role:
|
||||||
- role: ceph-infra
|
name: ceph-validate
|
||||||
- role: ceph-handler
|
private: false
|
||||||
- role: ceph-docker-common
|
- import_role:
|
||||||
|
name: ceph-infra
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-handler
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
tags: [with_pkg, fetch_container_image]
|
tags: [with_pkg, fetch_container_image]
|
||||||
when:
|
when:
|
||||||
- not (is_atomic | bool)
|
- not (is_atomic | bool)
|
||||||
- (not (inventory_hostname in groups.get('clients', [])) or (inventory_hostname == groups.get('clients', [''])|first))
|
- (not (inventory_hostname in groups.get('clients', [])) or (inventory_hostname == groups.get('clients', [''])|first))
|
||||||
|
|
||||||
post_tasks:
|
|
||||||
|
# post-tasks for upcoming import -
|
||||||
- name: "pull {{ ceph_docker_image }} image"
|
- name: "pull {{ ceph_docker_image }} image"
|
||||||
command: "docker pull {{ ceph_docker_registry}}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
command: "docker pull {{ ceph_docker_registry}}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
@ -83,14 +94,24 @@
|
||||||
- hosts: mons
|
- hosts: mons
|
||||||
become: True
|
become: True
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
roles:
|
tasks:
|
||||||
- role: ceph-defaults
|
- import_role:
|
||||||
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-handler
|
- import_role:
|
||||||
- role: ceph-docker-common
|
name: ceph-handler
|
||||||
- role: ceph-config
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-mon
|
- import_role:
|
||||||
|
name: ceph-mon
|
||||||
|
private: false
|
||||||
serial: 1 # MUST be '1' WHEN DEPLOYING MONITORS ON DOCKER CONTAINERS
|
serial: 1 # MUST be '1' WHEN DEPLOYING MONITORS ON DOCKER CONTAINERS
|
||||||
|
|
||||||
- hosts: mons
|
- hosts: mons
|
||||||
|
@ -106,7 +127,8 @@
|
||||||
- hosts: mgrs
|
- hosts: mgrs
|
||||||
become: True
|
become: True
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
pre_tasks:
|
tasks:
|
||||||
|
# pre-tasks for following imports -
|
||||||
- name: set ceph manager install 'In Progress'
|
- name: set ceph manager install 'In Progress'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -114,15 +136,26 @@
|
||||||
installer_phase_ceph_mgr:
|
installer_phase_ceph_mgr:
|
||||||
status: "In Progress"
|
status: "In Progress"
|
||||||
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||||
roles:
|
|
||||||
- role: ceph-defaults
|
- import_role:
|
||||||
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-handler
|
- import_role:
|
||||||
- role: ceph-docker-common
|
name: ceph-handler
|
||||||
- role: ceph-config
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: fals
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-mgr
|
- import_role:
|
||||||
post_tasks:
|
name: ceph-mgr
|
||||||
|
private: false
|
||||||
|
|
||||||
|
# post-tasks for upcoming imports -
|
||||||
- name: set ceph manager install 'Complete'
|
- name: set ceph manager install 'Complete'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -134,7 +167,8 @@
|
||||||
- hosts: osds
|
- hosts: osds
|
||||||
become: True
|
become: True
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
pre_tasks:
|
tasks:
|
||||||
|
# pre-tasks for upcoming imports -
|
||||||
- name: set ceph osd install 'In Progress'
|
- name: set ceph osd install 'In Progress'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -142,15 +176,26 @@
|
||||||
installer_phase_ceph_osd:
|
installer_phase_ceph_osd:
|
||||||
status: "In Progress"
|
status: "In Progress"
|
||||||
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||||
roles:
|
|
||||||
- role: ceph-defaults
|
- import_role:
|
||||||
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-handler
|
- import_role:
|
||||||
- role: ceph-docker-common
|
name: ceph-handler
|
||||||
- role: ceph-config
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-osd
|
- import_role:
|
||||||
post_tasks:
|
name: ceph-osd
|
||||||
|
private: false
|
||||||
|
|
||||||
|
# post-tasks for preceding imports -
|
||||||
- name: set ceph osd install 'Complete'
|
- name: set ceph osd install 'Complete'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -162,7 +207,8 @@
|
||||||
- hosts: mdss
|
- hosts: mdss
|
||||||
become: True
|
become: True
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
pre_tasks:
|
tasks:
|
||||||
|
# pre-tasks for following imports -
|
||||||
- name: set ceph mds install 'In Progress'
|
- name: set ceph mds install 'In Progress'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -170,15 +216,26 @@
|
||||||
installer_phase_ceph_mds:
|
installer_phase_ceph_mds:
|
||||||
status: "In Progress"
|
status: "In Progress"
|
||||||
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||||
roles:
|
|
||||||
- role: ceph-defaults
|
- import_role:
|
||||||
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-handler
|
- import_role:
|
||||||
- role: ceph-docker-common
|
name: ceph-handler
|
||||||
- role: ceph-config
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- ceph-mds
|
- import_role:
|
||||||
post_tasks:
|
name: ceph-mds
|
||||||
|
private: false
|
||||||
|
|
||||||
|
# post-tasks for preceding imports -
|
||||||
- name: set ceph mds install 'Complete'
|
- name: set ceph mds install 'Complete'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -190,7 +247,8 @@
|
||||||
- hosts: rgws
|
- hosts: rgws
|
||||||
become: True
|
become: True
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
pre_tasks:
|
tasks:
|
||||||
|
# pre-tasks for following imports -
|
||||||
- name: set ceph rgw install 'In Progress'
|
- name: set ceph rgw install 'In Progress'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -198,15 +256,26 @@
|
||||||
installer_phase_ceph_rgw:
|
installer_phase_ceph_rgw:
|
||||||
status: "In Progress"
|
status: "In Progress"
|
||||||
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||||
roles:
|
|
||||||
- role: ceph-defaults
|
- import_role:
|
||||||
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-handler
|
- import_role:
|
||||||
- role: ceph-docker-common
|
name: ceph-handler
|
||||||
- role: ceph-config
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-rgw
|
- import_role:
|
||||||
post_tasks:
|
name: ceph-rgw
|
||||||
|
private: false
|
||||||
|
|
||||||
|
# post-tasks for preceding imports -
|
||||||
- name: set ceph rgw install 'Complete'
|
- name: set ceph rgw install 'Complete'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -218,7 +287,8 @@
|
||||||
- hosts: nfss
|
- hosts: nfss
|
||||||
become: True
|
become: True
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
pre_tasks:
|
tasks:
|
||||||
|
# pre-tasks for following imports -
|
||||||
- name: set ceph nfs install 'In Progress'
|
- name: set ceph nfs install 'In Progress'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -226,15 +296,26 @@
|
||||||
installer_phase_ceph_nfs:
|
installer_phase_ceph_nfs:
|
||||||
status: "In Progress"
|
status: "In Progress"
|
||||||
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||||
roles:
|
|
||||||
- role: ceph-defaults
|
- import_role:
|
||||||
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-handler
|
- import_role:
|
||||||
- role: ceph-docker-common
|
name: ceph-handler
|
||||||
- role: ceph-config
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-nfs
|
- import_role:
|
||||||
post_tasks:
|
name: ceph-nfs
|
||||||
|
private: false
|
||||||
|
|
||||||
|
# post-tasks for following imports -
|
||||||
- name: set ceph nfs install 'Complete'
|
- name: set ceph nfs install 'Complete'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -246,7 +327,8 @@
|
||||||
- hosts: rbdmirrors
|
- hosts: rbdmirrors
|
||||||
become: True
|
become: True
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
pre_tasks:
|
tasks:
|
||||||
|
# pre-tasks for following imports -
|
||||||
- name: set ceph rbd mirror install 'In Progress'
|
- name: set ceph rbd mirror install 'In Progress'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -254,15 +336,26 @@
|
||||||
installer_phase_ceph_rbdmirror:
|
installer_phase_ceph_rbdmirror:
|
||||||
status: "In Progress"
|
status: "In Progress"
|
||||||
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||||
roles:
|
|
||||||
- role: ceph-defaults
|
- import_role:
|
||||||
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-handler
|
- import_role:
|
||||||
- role: ceph-docker-common
|
name: ceph-handler
|
||||||
- role: ceph-config
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-rbd-mirror
|
- import_role:
|
||||||
post_tasks:
|
name: ceph-rbd-mirror
|
||||||
|
private: false
|
||||||
|
|
||||||
|
# post-tasks for preceding imports -
|
||||||
- name: set ceph rbd mirror install 'Complete'
|
- name: set ceph rbd mirror install 'Complete'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -274,7 +367,8 @@
|
||||||
- hosts: clients
|
- hosts: clients
|
||||||
become: True
|
become: True
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
pre_tasks:
|
tasks:
|
||||||
|
# pre-tasks for following imports -
|
||||||
- name: set ceph client install 'In Progress'
|
- name: set ceph client install 'In Progress'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -282,17 +376,28 @@
|
||||||
installer_phase_ceph_client:
|
installer_phase_ceph_client:
|
||||||
status: "In Progress"
|
status: "In Progress"
|
||||||
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||||
roles:
|
|
||||||
- role: ceph-defaults
|
- import_role:
|
||||||
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-handler
|
- import_role:
|
||||||
- role: ceph-docker-common
|
name: ceph-handler
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
when:
|
when:
|
||||||
- inventory_hostname == groups.get('clients', ['']) | first
|
- inventory_hostname == groups.get('clients', ['']) | first
|
||||||
- role: ceph-config
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-client
|
- import_role:
|
||||||
post_tasks:
|
name: ceph-client
|
||||||
|
private: false
|
||||||
|
|
||||||
|
# post-tasks for preceding imports -
|
||||||
- name: set ceph client install 'Complete'
|
- name: set ceph client install 'Complete'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -306,7 +411,8 @@
|
||||||
- iscsi-gws # for backward compatibility only!
|
- iscsi-gws # for backward compatibility only!
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
become: True
|
become: True
|
||||||
pre_tasks:
|
tasks:
|
||||||
|
# pre-tasks for following imports -
|
||||||
- name: set ceph iscsi gateway install 'In Progress'
|
- name: set ceph iscsi gateway install 'In Progress'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -314,13 +420,26 @@
|
||||||
installer_phase_ceph_iscsi_gw:
|
installer_phase_ceph_iscsi_gw:
|
||||||
status: "In Progress"
|
status: "In Progress"
|
||||||
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||||
roles:
|
|
||||||
- { role: ceph-defaults, tags: ['ceph_update_config'] }
|
- import_role:
|
||||||
- role: ceph-handler
|
name: ceph-defaults
|
||||||
- ceph-docker-common
|
private: false
|
||||||
- { role: ceph-config, tags: ['ceph_update_config'] }
|
tags: ['ceph_update_config']
|
||||||
- ceph-iscsi-gw
|
- import_role:
|
||||||
post_tasks:
|
name: ceph-handler
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-docker-common
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
|
tags: ['ceph_update_config']
|
||||||
|
- import_role:
|
||||||
|
name: ceph-iscsi-gw
|
||||||
|
private: false
|
||||||
|
|
||||||
|
# post-tasks for preceding imports -
|
||||||
- name: set ceph iscsi gw install 'Complete'
|
- name: set ceph iscsi gw install 'Complete'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
|
299
site.yml.sample
299
site.yml.sample
|
@ -24,7 +24,8 @@
|
||||||
vars:
|
vars:
|
||||||
delegate_facts_host: True
|
delegate_facts_host: True
|
||||||
|
|
||||||
pre_tasks:
|
tasks:
|
||||||
|
# pre-tasks for following imports -
|
||||||
# If we can't get python2 installed before any module is used we will fail
|
# If we can't get python2 installed before any module is used we will fail
|
||||||
# so just try what we can to get it installed
|
# so just try what we can to get it installed
|
||||||
- name: check for python2
|
- name: check for python2
|
||||||
|
@ -71,16 +72,21 @@
|
||||||
- ansible_distribution == 'Fedora'
|
- ansible_distribution == 'Fedora'
|
||||||
- ansible_distribution_major_version|int >= 23
|
- ansible_distribution_major_version|int >= 23
|
||||||
|
|
||||||
roles:
|
- import_role:
|
||||||
- ceph-defaults
|
name: ceph-defaults
|
||||||
- ceph-validate
|
private: false
|
||||||
- ceph-infra
|
- import_role:
|
||||||
|
name: ceph-validate
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-infra
|
||||||
|
private: false
|
||||||
|
|
||||||
- hosts: mons
|
- hosts: mons
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
become: True
|
become: True
|
||||||
pre_tasks:
|
tasks:
|
||||||
|
# pre-tasks for following imports -
|
||||||
- name: set ceph monitor install 'In Progress'
|
- name: set ceph monitor install 'In Progress'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -88,15 +94,26 @@
|
||||||
installer_phase_ceph_mon:
|
installer_phase_ceph_mon:
|
||||||
status: "In Progress"
|
status: "In Progress"
|
||||||
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||||
roles:
|
|
||||||
- role: ceph-defaults
|
- import_role:
|
||||||
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-handler
|
- import_role:
|
||||||
- role: ceph-common
|
name: ceph-handler
|
||||||
- role: ceph-config
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-common
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-mon
|
- import_role:
|
||||||
post_tasks:
|
name: ceph-mon
|
||||||
|
private: false
|
||||||
|
|
||||||
|
# post-tasks for preceding imports -
|
||||||
- name: set ceph monitor install 'Complete'
|
- name: set ceph monitor install 'Complete'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -108,7 +125,8 @@
|
||||||
- hosts: mgrs
|
- hosts: mgrs
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
become: True
|
become: True
|
||||||
pre_tasks:
|
tasks:
|
||||||
|
# pre-tasks for following imports -
|
||||||
- name: set ceph manager install 'In Progress'
|
- name: set ceph manager install 'In Progress'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -116,15 +134,26 @@
|
||||||
installer_phase_ceph_mgr:
|
installer_phase_ceph_mgr:
|
||||||
status: "In Progress"
|
status: "In Progress"
|
||||||
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||||
roles:
|
|
||||||
- role: ceph-defaults
|
- import_role:
|
||||||
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-handler
|
- import_role:
|
||||||
- role: ceph-common
|
name: ceph-handler
|
||||||
- role: ceph-config
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-common
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-mgr
|
- import_role:
|
||||||
post_tasks:
|
name: ceph-mgr
|
||||||
|
private: false
|
||||||
|
|
||||||
|
# post-tasks for following imports -
|
||||||
- name: set ceph manager install 'Complete'
|
- name: set ceph manager install 'Complete'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -136,7 +165,8 @@
|
||||||
- hosts: agents
|
- hosts: agents
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
become: True
|
become: True
|
||||||
pre_tasks:
|
tasks:
|
||||||
|
# pre-tasks for following imports -
|
||||||
- name: set ceph agent install 'In Progress'
|
- name: set ceph agent install 'In Progress'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -144,15 +174,26 @@
|
||||||
installer_phase_ceph_agent:
|
installer_phase_ceph_agent:
|
||||||
status: "In Progress"
|
status: "In Progress"
|
||||||
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||||
roles:
|
|
||||||
- role: ceph-defaults
|
- import_role:
|
||||||
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-handler
|
- import_role:
|
||||||
- role: ceph-common
|
name: ceph-handler
|
||||||
- role: ceph-config
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-common
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-agent
|
- import_role:
|
||||||
post_tasks:
|
name: ceph-agent
|
||||||
|
private: false
|
||||||
|
|
||||||
|
# post-tasks for following imports -
|
||||||
- name: set ceph agent install 'Complete'
|
- name: set ceph agent install 'Complete'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -164,7 +205,8 @@
|
||||||
- hosts: osds
|
- hosts: osds
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
become: True
|
become: True
|
||||||
pre_tasks:
|
tasks:
|
||||||
|
# pre-tasks for following imports -
|
||||||
- name: set ceph osd install 'In Progress'
|
- name: set ceph osd install 'In Progress'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -172,15 +214,26 @@
|
||||||
installer_phase_ceph_osd:
|
installer_phase_ceph_osd:
|
||||||
status: "In Progress"
|
status: "In Progress"
|
||||||
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||||
roles:
|
|
||||||
- role: ceph-defaults
|
- import_role:
|
||||||
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-handler
|
- import_role:
|
||||||
- role: ceph-common
|
name: ceph-handler
|
||||||
- role: ceph-config
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-common
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-osd
|
- import_role:
|
||||||
post_tasks:
|
name: ceph-osd
|
||||||
|
private: false
|
||||||
|
|
||||||
|
# post-tasks for following imports -
|
||||||
- name: set ceph osd install 'Complete'
|
- name: set ceph osd install 'Complete'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -192,7 +245,8 @@
|
||||||
- hosts: mdss
|
- hosts: mdss
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
become: True
|
become: True
|
||||||
pre_tasks:
|
tasks:
|
||||||
|
# pre-tasks for following imports -
|
||||||
- name: set ceph mds install 'In Progress'
|
- name: set ceph mds install 'In Progress'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -200,15 +254,26 @@
|
||||||
installer_phase_ceph_mds:
|
installer_phase_ceph_mds:
|
||||||
status: "In Progress"
|
status: "In Progress"
|
||||||
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||||
roles:
|
|
||||||
- role: ceph-defaults
|
- import_role:
|
||||||
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-handler
|
- import_role:
|
||||||
- role: ceph-common
|
name: ceph-handler
|
||||||
- role: ceph-config
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-common
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-mds
|
- import_role:
|
||||||
post_tasks:
|
name: ceph-mds
|
||||||
|
private: false
|
||||||
|
|
||||||
|
# post-tasks for following imports -
|
||||||
- name: set ceph mds install 'Complete'
|
- name: set ceph mds install 'Complete'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -220,7 +285,8 @@
|
||||||
- hosts: rgws
|
- hosts: rgws
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
become: True
|
become: True
|
||||||
pre_tasks:
|
tasks:
|
||||||
|
# pre-tasks for following imports -
|
||||||
- name: set ceph rgw install 'In Progress'
|
- name: set ceph rgw install 'In Progress'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -228,15 +294,26 @@
|
||||||
installer_phase_ceph_rgw:
|
installer_phase_ceph_rgw:
|
||||||
status: "In Progress"
|
status: "In Progress"
|
||||||
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||||
roles:
|
|
||||||
- role: ceph-defaults
|
- import_role:
|
||||||
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-handler
|
- import_role:
|
||||||
- role: ceph-common
|
name: ceph-handler
|
||||||
- role: ceph-config
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-common
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-rgw
|
- import_role:
|
||||||
post_tasks:
|
name: ceph-rgw
|
||||||
|
private: false
|
||||||
|
|
||||||
|
# post-tasks for following imports -
|
||||||
- name: set ceph rgw install 'Complete'
|
- name: set ceph rgw install 'Complete'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -248,7 +325,8 @@
|
||||||
- hosts: nfss
|
- hosts: nfss
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
become: True
|
become: True
|
||||||
pre_tasks:
|
tasks:
|
||||||
|
# pre-tasks for following imports -
|
||||||
- name: set ceph nfs install 'In Progress'
|
- name: set ceph nfs install 'In Progress'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -256,15 +334,26 @@
|
||||||
installer_phase_ceph_nfs:
|
installer_phase_ceph_nfs:
|
||||||
status: "In Progress"
|
status: "In Progress"
|
||||||
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||||
roles:
|
|
||||||
- role: ceph-defaults
|
- import_role:
|
||||||
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-handler
|
- import_role:
|
||||||
- role: ceph-common
|
name: ceph-handler
|
||||||
- role: ceph-config
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-common
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-nfs
|
- import_role:
|
||||||
post_tasks:
|
name: ceph-nfs
|
||||||
|
private: false
|
||||||
|
|
||||||
|
# post-tasks for following imports -
|
||||||
- name: set ceph nfs install 'Complete'
|
- name: set ceph nfs install 'Complete'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -276,7 +365,8 @@
|
||||||
- hosts: rbdmirrors
|
- hosts: rbdmirrors
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
become: True
|
become: True
|
||||||
pre_tasks:
|
tasks:
|
||||||
|
# pre-tasks for following imports -
|
||||||
- name: set ceph rbd mirror install 'In Progress'
|
- name: set ceph rbd mirror install 'In Progress'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -284,15 +374,26 @@
|
||||||
installer_phase_ceph_rbdmirror:
|
installer_phase_ceph_rbdmirror:
|
||||||
status: "In Progress"
|
status: "In Progress"
|
||||||
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||||
roles:
|
|
||||||
- role: ceph-defaults
|
- import_role:
|
||||||
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-handler
|
- import_role:
|
||||||
- role: ceph-common
|
name: ceph-handler
|
||||||
- role: ceph-config
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-common
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-rbd-mirror
|
- import_role:
|
||||||
post_tasks:
|
name: ceph-rbd-mirror
|
||||||
|
private: false
|
||||||
|
|
||||||
|
# post-tasks for following imports -
|
||||||
- name: set ceph rbd mirror install 'Complete'
|
- name: set ceph rbd mirror install 'Complete'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -304,7 +405,8 @@
|
||||||
- hosts: clients
|
- hosts: clients
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
become: True
|
become: True
|
||||||
pre_tasks:
|
tasks:
|
||||||
|
# pre-tasks for following imports -
|
||||||
- name: set ceph client install 'In Progress'
|
- name: set ceph client install 'In Progress'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -312,15 +414,26 @@
|
||||||
installer_phase_ceph_client:
|
installer_phase_ceph_client:
|
||||||
status: "In Progress"
|
status: "In Progress"
|
||||||
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||||
roles:
|
|
||||||
- role: ceph-defaults
|
- import_role:
|
||||||
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-handler
|
- import_role:
|
||||||
- role: ceph-common
|
name: ceph-handler
|
||||||
- role: ceph-config
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-common
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-client
|
- import_role:
|
||||||
post_tasks:
|
name: ceph-client
|
||||||
|
private: false
|
||||||
|
|
||||||
|
# post-tasks for following imports -
|
||||||
- name: set ceph client install 'Complete'
|
- name: set ceph client install 'Complete'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -334,7 +447,8 @@
|
||||||
- iscsi-gws # for backward compatibility only!
|
- iscsi-gws # for backward compatibility only!
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
become: True
|
become: True
|
||||||
pre_tasks:
|
tasks:
|
||||||
|
# pre-tasks for following imports -
|
||||||
- name: set ceph iscsi gateway install 'In Progress'
|
- name: set ceph iscsi gateway install 'In Progress'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
@ -342,15 +456,28 @@
|
||||||
installer_phase_ceph_iscsi_gw:
|
installer_phase_ceph_iscsi_gw:
|
||||||
status: "In Progress"
|
status: "In Progress"
|
||||||
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
||||||
roles:
|
|
||||||
- role: ceph-defaults
|
- import_role:
|
||||||
|
name: ceph-defaults
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-handler
|
- import_role:
|
||||||
- role: ceph-common
|
name: ceph-handler
|
||||||
- role: ceph-config
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-common
|
||||||
|
private: false
|
||||||
|
when:
|
||||||
|
- ceph_release_num[ceph_release] >= ceph_release_num.luminous
|
||||||
|
- import_role:
|
||||||
|
name: ceph-config
|
||||||
|
private: false
|
||||||
tags: ['ceph_update_config']
|
tags: ['ceph_update_config']
|
||||||
- role: ceph-iscsi-gw
|
- import_role:
|
||||||
post_tasks:
|
name: ceph-iscsi-gw
|
||||||
|
private: false
|
||||||
|
|
||||||
|
# post-tasks for following imports -
|
||||||
- name: set ceph iscsi gw install 'Complete'
|
- name: set ceph iscsi gw install 'Complete'
|
||||||
run_once: true
|
run_once: true
|
||||||
set_stats:
|
set_stats:
|
||||||
|
|
26
test.yml
26
test.yml
|
@ -1,10 +1,22 @@
|
||||||
---
|
---
|
||||||
- hosts: localhost
|
- hosts: localhost
|
||||||
become: true
|
become: true
|
||||||
roles:
|
tasks:
|
||||||
- ceph.ceph-common
|
- import_role:
|
||||||
- ceph-mon
|
name: ceph.ceph-common
|
||||||
- ceph-osd
|
private: false
|
||||||
- ceph-mds
|
- import_role:
|
||||||
- ceph-rgw
|
name: ceph-mon
|
||||||
- ceph-fetch-keys
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-osd
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-mds
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-rgw
|
||||||
|
private: false
|
||||||
|
- import_role:
|
||||||
|
name: ceph-fetch-keys
|
||||||
|
private: false
|
||||||
|
|
Loading…
Reference in New Issue