ceph-ansible/roles/ceph-mgr/tasks/pre_requisite.yml

41 lines
1.3 KiB
YAML
Raw Normal View History

---
- name: install ceph-mgr package on RedHat or SUSE
package:
name: ceph-mgr
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
when:
- ansible_os_family in ['RedHat', 'Suse']
- name: install ceph mgr for debian
apt:
name: ceph-mgr
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
default_release: "{{ ceph_stable_release_uca | default(omit) }}{{ ansible_distribution_release ~ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
when:
- ansible_os_family == 'Debian'
- name: ensure systemd service override directory exists
file:
state: directory
path: "/etc/systemd/system/ceph-mgr@.service.d/"
when:
- ceph_mgr_systemd_overrides is defined
- ansible_service_mgr == 'systemd'
- name: add ceph-mgr systemd service overrides
config_template:
src: "ceph-mgr.service.d-overrides.j2"
dest: "/etc/systemd/system/ceph-mgr@.service.d/ceph-mgr-systemd-overrides.conf"
config_overrides: "{{ ceph_mgr_systemd_overrides | default({}) }}"
config_type: "ini"
when:
- ceph_mgr_systemd_overrides is defined
- ansible_service_mgr == 'systemd'
- name: start and add that the mgr service to the init sequence
service:
name: "ceph-mgr@{{ ansible_hostname }}"
state: started
enabled: yes
changed_when: false