2018-10-05 21:42:52 +08:00
|
|
|
---
|
2019-06-13 16:06:00 +08:00
|
|
|
- name: update cache for Debian based OSs
|
|
|
|
apt:
|
|
|
|
update_cache: yes
|
|
|
|
when: ansible_os_family == "Debian"
|
|
|
|
register: result
|
|
|
|
until: result is succeeded
|
|
|
|
|
2018-10-10 01:38:51 +08:00
|
|
|
- name: include_tasks configure_firewall.yml
|
|
|
|
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
|
2018-10-05 21:42:52 +08:00
|
|
|
- ansible_os_family in ['RedHat', 'Suse']
|
2018-10-10 02:02:04 +08:00
|
|
|
tags: configure_firewall
|
2018-10-05 21:42:52 +08:00
|
|
|
|
2018-12-12 19:15:00 +08:00
|
|
|
- name: include_tasks setup_ntp.yml
|
|
|
|
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
|
|
|
|
|
|
|
- name: ensure logrotate is installed
|
|
|
|
package:
|
|
|
|
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
|
|
|
|
inventory_hostname in groups.get(rbdmirror_group_name, [])
|
2020-08-05 07:47:04 +08:00
|
|
|
|
|
|
|
- name: add logrotate configuration
|
|
|
|
template:
|
|
|
|
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
|
|
|
|
inventory_hostname in groups.get(rbdmirror_group_name, [])
|