* Explicitly define `mode` in relevant tasks. * Explicitly define the `nginx` `apt_repository` filename in Debian based distros. * Building OpenSSL from source should now work properly in CentOS 8.
36 lines
913 B
YAML
36 lines
913 B
YAML
---
|
|
- name: "(Config: Alpine) Install Logrotate"
|
|
apk:
|
|
name: logrotate
|
|
when: ansible_os_family == "Alpine"
|
|
|
|
- name: "(Config: Ubuntu/Debian) Install Logrotate"
|
|
apt:
|
|
name: logrotate
|
|
state: present
|
|
when: ansible_os_family == "Debian"
|
|
|
|
- name: "(Config: CentOS/RedHat) Install Logrotate"
|
|
yum:
|
|
name: logrotate
|
|
state: present
|
|
when: ansible_os_family == "RedHat"
|
|
|
|
- name: "(Config: SUSE) Add Logrotate Repo"
|
|
zypper_repository:
|
|
repo: https://download.opensuse.org/repositories/openSUSE:Leap:42.1/standard/openSUSE:Leap:42.1.repo
|
|
when: ansible_os_family == "Suse"
|
|
|
|
- name: "(Config: SUSE) Install Logrotate"
|
|
zypper:
|
|
name: logrotate
|
|
state: present
|
|
when: ansible_os_family == "Suse"
|
|
|
|
- name: "(Config: All OSs) Create Logrotate Config"
|
|
template:
|
|
src: "logrotate/nginx.j2"
|
|
dest: "/etc/logrotate.d/nginx"
|
|
mode: 0644
|
|
notify: "(Config: All OSs) Run Logrotate"
|