2018-10-05 21:42:52 +08:00
|
|
|
---
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Update cache for Debian based OSs
|
|
|
|
ansible.builtin.apt:
|
|
|
|
update_cache: true
|
2021-03-03 22:43:50 +08:00
|
|
|
when: ansible_facts['os_family'] == "Debian"
|
2019-06-13 16:06:00 +08:00
|
|
|
register: result
|
|
|
|
until: result is succeeded
|
2022-03-30 21:48:02 +08:00
|
|
|
tags: package-install
|
2019-06-13 16:06:00 +08:00
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Include_tasks configure_firewall.yml
|
|
|
|
ansible.builtin.include_tasks: configure_firewall.yml
|
2018-10-05 21:42:52 +08:00
|
|
|
when:
|
2019-05-22 16:02:42 +08:00
|
|
|
- configure_firewall | bool
|
2021-03-03 22:43:50 +08:00
|
|
|
- ansible_facts['os_family'] in ['RedHat', 'Suse']
|
2018-10-10 02:02:04 +08:00
|
|
|
tags: configure_firewall
|
2018-10-05 21:42:52 +08:00
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Include_tasks setup_ntp.yml
|
|
|
|
ansible.builtin.include_tasks: setup_ntp.yml
|
2019-05-22 16:02:42 +08:00
|
|
|
when: ntp_service_enabled | bool
|
2018-10-10 02:02:04 +08:00
|
|
|
tags: configure_ntp
|
2020-08-05 07:47:04 +08:00
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Ensure logrotate is installed
|
|
|
|
ansible.builtin.package:
|
2020-08-05 07:47:04 +08:00
|
|
|
name: logrotate
|
|
|
|
state: present
|
|
|
|
register: result
|
|
|
|
until: result is succeeded
|
2020-08-13 21:29:28 +08:00
|
|
|
tags: with_pkg
|
2020-08-14 02:37:11 +08:00
|
|
|
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
|
2024-02-16 08:16:55 +08:00
|
|
|
inventory_hostname in groups.get(rbdmirror_group_name, [])
|
2020-08-05 07:47:04 +08:00
|
|
|
|
2024-02-14 18:14:02 +08:00
|
|
|
- name: Add logrotate configuration
|
|
|
|
ansible.builtin.template:
|
2020-08-05 07:47:04 +08:00
|
|
|
src: logrotate.conf.j2
|
|
|
|
dest: /etc/logrotate.d/ceph
|
|
|
|
mode: "0644"
|
|
|
|
owner: root
|
|
|
|
group: root
|
2020-08-13 21:29:28 +08:00
|
|
|
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
|
2024-02-16 08:16:55 +08:00
|
|
|
inventory_hostname in groups.get(rbdmirror_group_name, [])
|