userlogrotate: create role separated from packweb-apache
gitea/ansible-roles/pipeline/head This commit looks good
Details
gitea/ansible-roles/pipeline/head This commit looks good
Details
This commit is contained in:
parent
ae5c829373
commit
2c1db6a222
|
@ -16,6 +16,7 @@ The **patch** part changes is incremented if multiple releases happen the same m
|
||||||
* nagios-nrpe: add tasks/files for a wrapper
|
* nagios-nrpe: add tasks/files for a wrapper
|
||||||
* fail2ban: add "Internal login failure" to Dovecot filter
|
* fail2ban: add "Internal login failure" to Dovecot filter
|
||||||
* php: add a way to choose which version to install using sury repository
|
* php: add a way to choose which version to install using sury repository
|
||||||
|
* userlogrotate: create role separated from packweb-apache
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
|
|
@ -65,19 +65,8 @@
|
||||||
- access.log
|
- access.log
|
||||||
- error.log
|
- error.log
|
||||||
|
|
||||||
- name: "Install userlogrotate (jessie)"
|
- include_role:
|
||||||
copy:
|
name: userlogrotate
|
||||||
src: userlogrotate_jessie
|
|
||||||
dest: /etc/cron.weekly/userlogrotate
|
|
||||||
mode: "0755"
|
|
||||||
when: ansible_distribution_release == "jessie"
|
|
||||||
|
|
||||||
- name: "Install userlogrotate (Debian 9 or later)"
|
|
||||||
copy:
|
|
||||||
src: userlogrotate
|
|
||||||
dest: /etc/cron.weekly/userlogrotate
|
|
||||||
mode: "0755"
|
|
||||||
when: ansible_distribution_major_version is version('9', '>=')
|
|
||||||
|
|
||||||
- name: Force DIR_MODE to 0750 in /etc/adduser.conf
|
- name: Force DIR_MODE to 0750 in /etc/adduser.conf
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
@ -102,3 +91,4 @@
|
||||||
|
|
||||||
- include: multiphp.yml
|
- include: multiphp.yml
|
||||||
when: packweb_multiphp_versions | length > 0
|
when: packweb_multiphp_versions | length > 0
|
||||||
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
---
|
|
||||||
|
|
||||||
- name: "Cherche l'emplacement de userlogrotate"
|
|
||||||
ansible.builtin.find:
|
|
||||||
path: /etc
|
|
||||||
patterns: userlogrotate
|
|
||||||
register: find_logrotate
|
|
||||||
|
|
||||||
- name: "Met-à-jour userlogrotate"
|
|
||||||
ansible.builtin.copy:
|
|
||||||
src: userlogrotate
|
|
||||||
dest: "{{ item }}"
|
|
||||||
mode: "0755"
|
|
||||||
loop: "{{ find_logrotate.files }}"
|
|
||||||
when: find_logrotate.files | length>0
|
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
---
|
||||||
|
- name: "Is userlogrotate present ?"
|
||||||
|
ansible.builtin.find:
|
||||||
|
paths: ["/etc/cron.weekly", "/etc/cron.daily"]
|
||||||
|
patterns: ["userlogrotate"]
|
||||||
|
register: find_logrotate
|
||||||
|
check_mode: no
|
||||||
|
|
||||||
|
- name: "Update userlogrotate"
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: userlogrotate
|
||||||
|
dest: "{{ item.path }}"
|
||||||
|
mode: "0755"
|
||||||
|
loop: "{{ find_logrotate.files }}"
|
||||||
|
when: find_logrotate.files | length>0
|
||||||
|
|
||||||
|
- name: "Install userlogrotate (jessie)"
|
||||||
|
copy:
|
||||||
|
src: userlogrotate_jessie
|
||||||
|
dest: /etc/cron.weekly/userlogrotate
|
||||||
|
mode: "0755"
|
||||||
|
when:
|
||||||
|
- ansible_distribution_release == "jessie"
|
||||||
|
- find_logrotate.files | length==0
|
||||||
|
|
||||||
|
- name: "Install userlogrotate (Debian 9 or later)"
|
||||||
|
copy:
|
||||||
|
src: userlogrotate
|
||||||
|
dest: /etc/cron.weekly/userlogrotate
|
||||||
|
mode: "0755"
|
||||||
|
when:
|
||||||
|
- ansible_distribution_major_version is version('9', '>=')
|
||||||
|
- find_logrotate.files | length==0
|
||||||
|
|
Loading…
Reference in New Issue