2014-03-04 02:08:51 +08:00
---
2019-05-14 20:51:32 +08:00
- name : set_fact container_exec_cmd
2017-10-04 16:39:17 +08:00
set_fact :
2021-03-03 22:43:50 +08:00
container_exec_cmd : "{{ container_binary }} exec ceph-mon-{{ ansible_facts['hostname'] }}"
2019-05-22 16:02:42 +08:00
when : containerized_deployment | bool
2017-10-04 16:39:17 +08:00
2017-09-15 06:48:53 +08:00
- name : include deploy_monitors.yml
2018-08-21 22:23:35 +08:00
include_tasks : deploy_monitors.yml
2018-11-16 17:50:38 +08:00
when :
# we test for both container and non-container
2020-09-26 02:27:33 +08:00
- (mon_socket is defined and mon_socket.get('rc') != 0) or (ceph_mon_container_stat is defined and ceph_mon_container_stat.get('stdout_lines', [])|length == 0)
2019-05-22 16:02:42 +08:00
- not switch_to_containers | default(False) | bool
2015-01-21 01:43:47 +08:00
2017-09-15 06:48:53 +08:00
- name : include start_monitor.yml
2018-12-02 21:48:19 +08:00
include_tasks : start_monitor.yml
2015-03-26 22:43:54 +08:00
2018-08-10 20:16:30 +08:00
- name : include_tasks ceph_keys.yml
include_tasks : ceph_keys.yml
2019-05-22 16:02:42 +08:00
when : not switch_to_containers | default(False) | bool
2015-01-21 01:43:47 +08:00
2017-09-15 06:48:53 +08:00
- name : include secure_cluster.yml
2018-08-21 22:23:35 +08:00
include_tasks : secure_cluster.yml
2015-06-26 06:26:03 +08:00
when :
2019-05-22 16:02:42 +08:00
- secure_cluster | bool
2019-04-09 23:38:01 +08:00
- inventory_hostname == groups[mon_group_name] | first