- "{{ mon_group_name|default('mons') }}"
serial: 1
become: true
- tasks:
- # pre-tasks for following import -
+ pre_tasks:
- name: select a running monitor
set_fact: mon_host={{ item }}
with_items: "{{ groups[mon_group_name] }}"
changed_when: false
failed_when: false
+ tasks:
- import_role:
name: ceph-defaults
- import_role:
- import_role:
name: ceph-mon
- # post-tasks for preceding import -
post_tasks:
# 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.
serial: 1
become: true
- tasks:
- # pre-tasks for following import -
+ pre_tasks:
# failed_when: false is here because if we're
# working with a jewel cluster then ceph mgr
# will not exist
- /var/lib/ceph
- /etc/ceph
+ tasks:
- import_role:
name: ceph-defaults
serial: 1
become: true
- tasks:
+ pre_tasks:
- import_role:
name: ceph-defaults
- # pre-tasks for following importing
- name: collect running osds and ceph-disk unit(s)
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|ceph-volume|ceph\.target'
when:
- osd_running.rc != 0
+ tasks:
- import_role:
name: ceph-defaults
- import_role:
name: ceph-osd
- # post-task for preceding import -
+ post_tasks:
- name: get num_pgs
command: >
{{ container_binary }} exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }} ceph --cluster {{ cluster }} -s --format json
serial: 1
become: true
- tasks:
+ pre_tasks:
- # pre-tasks for following inmport
- name: stop non-containerized ceph mds(s)
service:
name: "ceph-mds@{{ ansible_hostname }}"
- /var/lib/ceph
- /etc/ceph
+ tasks:
- import_role:
name: ceph-defaults
serial: 1
become: true
- tasks:
+ pre_tasks:
- # pre-tasks for following import -
- name: stop non-containerized ceph rgw(s)
service:
name: "ceph-radosgw@rgw.{{ ansible_hostname }}"
- /var/lib/ceph
- /etc/ceph
+ tasks:
- import_role:
name: ceph-defaults
serial: 1
become: true
- tasks:
- # pre-tasks for following import -
+ pre_tasks:
- name: stop non-containerized ceph rbd mirror(s)
service:
name: "ceph-rbd-mirror@rbd-mirror.{{ ansible_hostname }}"
- /var/lib/ceph
- /etc/ceph
+ tasks:
- import_role:
name: ceph-defaults
serial: 1
become: true
- tasks:
+ pre_tasks:
- # pre-tasks for following import -
# failed_when: false is here because if we're
# working with a jewel cluster then ceph nfs
# will not exist
- /var/lib/ceph
- /etc/ceph
+ tasks:
- import_role:
name: ceph-defaults
vars:
delegate_facts_host: True
- tasks:
- # pre-tasks for following imports -
+ pre_tasks:
# 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
- name: check for python2
- ansible_distribution == 'Fedora'
- ansible_distribution_major_version|int >= 23
+ tasks:
- import_role:
name: ceph-defaults
- import_role:
gather_facts: false
become: True
any_errors_fatal: true
- tasks:
- # pre-tasks for following imports -
+ pre_tasks:
- name: set ceph monitor install 'In Progress'
run_once: true
set_stats:
status: "In Progress"
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
+ tasks:
- import_role:
name: ceph-defaults
tags: ['ceph_update_config']
- import_role:
name: ceph-mgr
- # post-tasks for preceding imports -
+ post_tasks:
- name: set ceph monitor install 'Complete'
run_once: true
set_stats:
gather_facts: false
become: True
any_errors_fatal: true
- tasks:
- # pre-tasks for following imports -
+ pre_tasks:
- name: set ceph manager install 'In Progress'
run_once: true
set_stats:
status: "In Progress"
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
+ tasks:
- import_role:
name: ceph-defaults
tags: ['ceph_update_config']
- import_role:
name: ceph-mgr
- # post-tasks for following imports -
+ post_tasks:
- name: set ceph manager install 'Complete'
run_once: true
set_stats:
gather_facts: false
become: True
any_errors_fatal: true
- tasks:
- # pre-tasks for following imports -
+ pre_tasks:
- name: set ceph agent install 'In Progress'
run_once: true
set_stats:
status: "In Progress"
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
+ tasks:
- import_role:
name: ceph-defaults
tags: ['ceph_update_config']
- import_role:
name: ceph-agent
- # post-tasks for following imports -
+ post_tasks:
- name: set ceph agent install 'Complete'
run_once: true
set_stats:
gather_facts: false
become: True
any_errors_fatal: true
- tasks:
- # pre-tasks for following imports -
+ pre_tasks:
- name: set ceph osd install 'In Progress'
run_once: true
set_stats:
status: "In Progress"
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
+ tasks:
- import_role:
name: ceph-defaults
tags: ['ceph_update_config']
- import_role:
name: ceph-osd
- # post-tasks for following imports -
+ post_tasks:
- name: set ceph osd install 'Complete'
run_once: true
set_stats:
gather_facts: false
become: True
any_errors_fatal: true
- tasks:
- # pre-tasks for following imports -
+ pre_tasks:
- name: set ceph mds install 'In Progress'
run_once: true
set_stats:
status: "In Progress"
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
+ tasks:
- import_role:
name: ceph-defaults
tags: ['ceph_update_config']
- import_role:
name: ceph-mds
- # post-tasks for following imports -
+ post_tasks:
- name: set ceph mds install 'Complete'
run_once: true
set_stats:
gather_facts: false
become: True
any_errors_fatal: true
- tasks:
- # pre-tasks for following imports -
+ pre_tasks:
- name: set ceph rgw install 'In Progress'
run_once: true
set_stats:
status: "In Progress"
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
+ tasks:
- import_role:
name: ceph-defaults
tags: ['ceph_update_config']
- import_role:
name: ceph-rgw
- # post-tasks for following imports -
+ post_tasks:
- name: set ceph rgw install 'Complete'
run_once: true
set_stats:
gather_facts: false
become: True
any_errors_fatal: true
- tasks:
- # pre-tasks for following imports -
+ pre_tasks:
- name: set ceph nfs install 'In Progress'
run_once: true
set_stats:
status: "In Progress"
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
+ tasks:
- import_role:
name: ceph-defaults
tags: ['ceph_update_config']
- import_role:
name: ceph-nfs
- # post-tasks for following imports -
+ post_tasks:
- name: set ceph nfs install 'Complete'
run_once: true
set_stats:
gather_facts: false
become: True
any_errors_fatal: true
- tasks:
- # pre-tasks for following imports -
+ pre_tasks:
- name: set ceph rbd mirror install 'In Progress'
run_once: true
set_stats:
status: "In Progress"
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
+ tasks:
- import_role:
name: ceph-defaults
tags: ['ceph_update_config']
- import_role:
name: ceph-rbd-mirror
- # post-tasks for following imports -
+ post_tasks:
- name: set ceph rbd mirror install 'Complete'
run_once: true
set_stats:
gather_facts: false
become: True
any_errors_fatal: true
- tasks:
- # pre-tasks for following imports -
+ pre_tasks:
- name: set ceph client install 'In Progress'
run_once: true
set_stats:
status: "In Progress"
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
+ tasks:
- import_role:
name: ceph-defaults
tags: ['ceph_update_config']
- import_role:
name: ceph-client
- # post-tasks for following imports -
+ post_tasks:
- name: set ceph client install 'Complete'
run_once: true
set_stats:
gather_facts: false
become: True
any_errors_fatal: true
- tasks:
- # pre-tasks for following imports -
+ pre_tasks:
- name: set ceph iscsi gateway install 'In Progress'
run_once: true
set_stats:
status: "In Progress"
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
+ tasks:
- import_role:
name: ceph-defaults
tags: ['ceph_update_config']
- import_role:
name: ceph-iscsi-gw
- # post-tasks for following imports -
+ post_tasks:
- name: set ceph iscsi gw install 'Complete'
run_once: true
set_stats: