ceph-ansible/roles/ceph-infra/tasks/main.yml

54 lines
1.7 KiB
YAML
Raw Normal View History

---
- name: Update cache for Debian based OSs
ansible.builtin.apt:
update_cache: true
when: ansible_facts['os_family'] == "Debian"
register: result
until: result is succeeded
tags: package-install
- name: Include_tasks configure_firewall.yml
ansible.builtin.include_tasks: configure_firewall.yml
when:
- configure_firewall | bool
- ansible_facts['os_family'] in ['RedHat', 'Suse']
tags: configure_firewall
- name: Include_tasks setup_ntp.yml
ansible.builtin.include_tasks: setup_ntp.yml
when: ntp_service_enabled | bool
tags: configure_ntp
- name: Ensure logrotate is installed
ansible.builtin.package:
name: logrotate
state: present
register: result
until: result is succeeded
tags: with_pkg
when:
- not is_atomic | bool
- containerized_deployment | bool
- inventory_hostname in groups.get(mon_group_name, []) or
inventory_hostname in groups.get(osd_group_name, []) or
inventory_hostname in groups.get(mds_group_name, []) or
inventory_hostname in groups.get(rgw_group_name, []) or
inventory_hostname in groups.get(mgr_group_name, []) or
inventory_hostname in groups.get(rbdmirror_group_name, [])
- name: Add logrotate configuration
ansible.builtin.template:
src: logrotate.conf.j2
dest: /etc/logrotate.d/ceph
mode: "0644"
owner: root
group: root
when:
- containerized_deployment | bool
- inventory_hostname in groups.get(mon_group_name, []) or
inventory_hostname in groups.get(osd_group_name, []) or
inventory_hostname in groups.get(mds_group_name, []) or
inventory_hostname in groups.get(rgw_group_name, []) or
inventory_hostname in groups.get(mgr_group_name, []) or
inventory_hostname in groups.get(rbdmirror_group_name, [])