2019-06-28 22:39:38 +08:00
|
|
|
---
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Deploy node_exporter
|
|
|
|
hosts:
|
2020-09-11 23:25:57 +08:00
|
|
|
- "{{ mon_group_name|default('mons') }}"
|
|
|
|
- "{{ osd_group_name|default('osds') }}"
|
|
|
|
- "{{ mds_group_name|default('mdss') }}"
|
|
|
|
- "{{ rgw_group_name|default('rgws') }}"
|
|
|
|
- "{{ mgr_group_name|default('mgrs') }}"
|
|
|
|
- "{{ rbdmirror_group_name|default('rbdmirrors') }}"
|
|
|
|
- "{{ nfs_group_name|default('nfss') }}"
|
2021-02-04 01:59:14 +08:00
|
|
|
- "{{ monitoring_group_name|default('monitoring') }}"
|
2019-10-10 01:34:50 +08:00
|
|
|
gather_facts: false
|
2019-06-28 22:39:38 +08:00
|
|
|
become: true
|
|
|
|
pre_tasks:
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Import ceph-defaults role
|
|
|
|
ansible.builtin.import_role:
|
2023-06-02 17:34:15 +08:00
|
|
|
name: ceph-defaults
|
|
|
|
tags: ['ceph_update_config']
|
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Set ceph node exporter install 'In Progress'
|
2019-06-28 22:39:38 +08:00
|
|
|
run_once: true
|
2024-02-14 18:14:02 +08:00
|
|
|
ansible.builtin.set_stats:
|
2019-06-28 22:39:38 +08:00
|
|
|
data:
|
|
|
|
installer_phase_ceph_node_exporter:
|
|
|
|
status: "In Progress"
|
|
|
|
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
|
|
|
|
|
|
|
tasks:
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Import ceph-facts role
|
|
|
|
ansible.builtin.import_role:
|
2019-10-03 02:58:42 +08:00
|
|
|
name: ceph-facts
|
|
|
|
tags: ['ceph_update_config']
|
2024-02-14 18:14:02 +08:00
|
|
|
|
|
|
|
- name: Import ceph-container-engine
|
|
|
|
ansible.builtin.import_role:
|
2019-10-03 02:58:42 +08:00
|
|
|
name: ceph-container-engine
|
2024-02-14 18:14:02 +08:00
|
|
|
|
|
|
|
- name: Import ceph-container-common role
|
|
|
|
ansible.builtin.import_role:
|
2019-10-23 01:58:50 +08:00
|
|
|
name: ceph-container-common
|
|
|
|
tasks_from: registry
|
|
|
|
when:
|
|
|
|
- not containerized_deployment | bool
|
|
|
|
- ceph_docker_registry_auth | bool
|
2024-02-14 18:14:02 +08:00
|
|
|
|
|
|
|
- name: Import ceph-node-exporter role
|
|
|
|
ansible.builtin.import_role:
|
2019-10-03 02:58:42 +08:00
|
|
|
name: ceph-node-exporter
|
2019-06-28 22:39:38 +08:00
|
|
|
|
|
|
|
post_tasks:
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Set ceph node exporter install 'Complete'
|
2019-06-28 22:39:38 +08:00
|
|
|
run_once: true
|
2024-02-14 18:14:02 +08:00
|
|
|
ansible.builtin.set_stats:
|
2019-06-28 22:39:38 +08:00
|
|
|
data:
|
|
|
|
installer_phase_ceph_node_exporter:
|
|
|
|
status: "Complete"
|
|
|
|
end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Deploy grafana and prometheus
|
|
|
|
hosts: "{{ monitoring_group_name | default('monitoring') }}"
|
2019-10-10 01:34:50 +08:00
|
|
|
gather_facts: false
|
2019-06-28 22:39:38 +08:00
|
|
|
become: true
|
|
|
|
pre_tasks:
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Import ceph-defaults role
|
|
|
|
ansible.builtin.import_role:
|
2023-06-02 17:34:15 +08:00
|
|
|
name: ceph-defaults
|
|
|
|
tags: ['ceph_update_config']
|
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Set ceph grafana install 'In Progress'
|
2019-06-28 22:39:38 +08:00
|
|
|
run_once: true
|
2024-02-14 18:14:02 +08:00
|
|
|
ansible.builtin.set_stats:
|
2019-06-28 22:39:38 +08:00
|
|
|
data:
|
|
|
|
installer_phase_ceph_grafana:
|
|
|
|
status: "In Progress"
|
|
|
|
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
|
|
|
|
|
|
|
tasks:
|
2024-02-14 18:14:02 +08:00
|
|
|
# - ansible.builtin.import_role:
|
|
|
|
# name: ceph-facts
|
|
|
|
# tags: ['ceph_update_config']
|
|
|
|
|
|
|
|
- name: Import ceph-facts role
|
|
|
|
ansible.builtin.import_role:
|
2020-01-13 23:24:52 +08:00
|
|
|
name: ceph-facts
|
|
|
|
tasks_from: grafana
|
|
|
|
tags: ['ceph_update_config']
|
2024-02-14 18:14:02 +08:00
|
|
|
|
|
|
|
- name: Import ceph-prometheus role
|
|
|
|
ansible.builtin.import_role:
|
2019-10-03 02:58:42 +08:00
|
|
|
name: ceph-prometheus
|
2024-02-14 18:14:02 +08:00
|
|
|
|
|
|
|
- name: Import ceph-grafana role
|
|
|
|
ansible.builtin.import_role:
|
2019-10-03 02:58:42 +08:00
|
|
|
name: ceph-grafana
|
2019-06-28 22:39:38 +08:00
|
|
|
|
|
|
|
post_tasks:
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Set ceph grafana install 'Complete'
|
2019-06-28 22:39:38 +08:00
|
|
|
run_once: true
|
2024-02-14 18:14:02 +08:00
|
|
|
ansible.builtin.set_stats:
|
2019-06-28 22:39:38 +08:00
|
|
|
data:
|
|
|
|
installer_phase_ceph_grafana:
|
|
|
|
status: "Complete"
|
|
|
|
end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
|
|
|
|
2019-10-09 20:46:43 +08:00
|
|
|
# using groups[] here otherwise it can't fallback to the mon if there's no mgr group.
|
|
|
|
# adding an additional | default(omit) in case where no monitors are present (external ceph cluster)
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Deploy dashboard
|
|
|
|
hosts: "{{ groups['mgrs'] | default(groups['mons']) | default(omit) }}"
|
2019-10-10 01:34:50 +08:00
|
|
|
gather_facts: false
|
2019-06-28 22:39:38 +08:00
|
|
|
become: true
|
|
|
|
pre_tasks:
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Import ceph-defaults role
|
|
|
|
ansible.builtin.import_role:
|
2023-06-02 17:34:15 +08:00
|
|
|
name: ceph-defaults
|
|
|
|
tags: ['ceph_update_config']
|
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Set ceph dashboard install 'In Progress'
|
2019-06-28 22:39:38 +08:00
|
|
|
run_once: true
|
2024-02-14 18:14:02 +08:00
|
|
|
ansible.builtin.set_stats:
|
2019-06-28 22:39:38 +08:00
|
|
|
data:
|
|
|
|
installer_phase_ceph_dashboard:
|
|
|
|
status: "In Progress"
|
|
|
|
start: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|
|
|
|
|
|
|
|
tasks:
|
2024-02-14 18:14:02 +08:00
|
|
|
# - name: Import ceph-facts role
|
|
|
|
# ansible.builtin.import_role:
|
|
|
|
# name: ceph-facts
|
|
|
|
# tags: ['ceph_update_config']
|
|
|
|
|
|
|
|
- name: Import ceph-facts role
|
|
|
|
ansible.builtin.import_role:
|
2020-01-13 23:24:52 +08:00
|
|
|
name: ceph-facts
|
|
|
|
tasks_from: grafana
|
|
|
|
tags: ['ceph_update_config']
|
2024-02-14 18:14:02 +08:00
|
|
|
|
|
|
|
- name: Import ceph-dashboard role
|
|
|
|
ansible.builtin.import_role:
|
2019-10-03 02:58:42 +08:00
|
|
|
name: ceph-dashboard
|
2019-06-28 22:39:38 +08:00
|
|
|
|
|
|
|
post_tasks:
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Set ceph dashboard install 'Complete'
|
2019-06-28 22:39:38 +08:00
|
|
|
run_once: true
|
2024-02-14 18:14:02 +08:00
|
|
|
ansible.builtin.set_stats:
|
2019-06-28 22:39:38 +08:00
|
|
|
data:
|
|
|
|
installer_phase_ceph_dashboard:
|
|
|
|
status: "Complete"
|
|
|
|
end: "{{ lookup('pipe', 'date +%Y%m%d%H%M%SZ') }}"
|