Compare commits
4 Commits
f5b1d66dd8
...
master
Author | SHA1 | Date | |
---|---|---|---|
0c15c19e1a
|
|||
bc3ffbcc22
|
|||
18c15c9244
|
|||
59cd41be51
|
@@ -11,7 +11,7 @@
|
|||||||
- ensure_log_rotation is defined
|
- ensure_log_rotation is defined
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: 'yes'
|
daemon_reload: 'yes'
|
||||||
- name: 'ensure_log_rotation.services'
|
- name: 'ensure_log_rotation.service_restart'
|
||||||
when:
|
when:
|
||||||
- ansible_system == 'Linux'
|
- ansible_system == 'Linux'
|
||||||
- ensure_log_rotation is defined
|
- ensure_log_rotation is defined
|
||||||
@@ -25,3 +25,5 @@
|
|||||||
loop: '{{ ensure_log_rotation.service_list }}'
|
loop: '{{ ensure_log_rotation.service_list }}'
|
||||||
loop_control:
|
loop_control:
|
||||||
label: '{{ item.name }} will be restarted'
|
label: '{{ item.name }} will be restarted'
|
||||||
|
...
|
||||||
|
|
||||||
|
@@ -68,6 +68,11 @@
|
|||||||
loop: '{{ ensure_log_rotation.template_list }}'
|
loop: '{{ ensure_log_rotation.template_list }}'
|
||||||
loop_control:
|
loop_control:
|
||||||
label: '{{ item.dest }}'
|
label: '{{ item.dest }}'
|
||||||
|
notify:
|
||||||
|
- 'ensure_log_rotation.package_facts'
|
||||||
|
- 'ensure_log_rotation.service_facts'
|
||||||
|
- 'ensure_log_rotation.service_reload'
|
||||||
|
- 'ensure_log_rotation.service_restart'
|
||||||
- name: 'ensure services'
|
- name: 'ensure services'
|
||||||
when:
|
when:
|
||||||
- ansible_system == 'Linux'
|
- ansible_system == 'Linux'
|
||||||
|
20
templates/AlmaLinux/8/etc/logrotate.conf
Normal file
20
templates/AlmaLinux/8/etc/logrotate.conf
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# see "man logrotate" for details
|
||||||
|
# rotate log files weekly
|
||||||
|
daily
|
||||||
|
|
||||||
|
# keep 4 weeks worth of backlogs
|
||||||
|
rotate {{ log_retention_days }}
|
||||||
|
|
||||||
|
# create new (empty) log files after rotating old ones
|
||||||
|
create
|
||||||
|
|
||||||
|
# use date as a suffix of the rotated file
|
||||||
|
dateext
|
||||||
|
|
||||||
|
# uncomment this if you want your log files compressed
|
||||||
|
compress
|
||||||
|
|
||||||
|
# packages drop log rotation information into this directory
|
||||||
|
include /etc/logrotate.d
|
||||||
|
|
||||||
|
# system-specific logs may be also be configured here.
|
7
templates/AlmaLinux/8/etc/logrotate.d/btmp
Normal file
7
templates/AlmaLinux/8/etc/logrotate.d/btmp
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# no packages own btmp -- we'll rotate it here
|
||||||
|
/var/log/btmp {
|
||||||
|
missingok
|
||||||
|
monthly
|
||||||
|
create 0660 root utmp
|
||||||
|
rotate 1
|
||||||
|
}
|
8
templates/AlmaLinux/8/etc/logrotate.d/wtmp
Normal file
8
templates/AlmaLinux/8/etc/logrotate.d/wtmp
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# no packages own wtmp -- we'll rotate it here
|
||||||
|
/var/log/wtmp {
|
||||||
|
missingok
|
||||||
|
monthly
|
||||||
|
create 0664 root utmp
|
||||||
|
minsize 1M
|
||||||
|
rotate 1
|
||||||
|
}
|
20
templates/AlmaLinux/9/etc/logrotate.conf
Normal file
20
templates/AlmaLinux/9/etc/logrotate.conf
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# see "man logrotate" for details
|
||||||
|
# rotate log files weekly
|
||||||
|
daily
|
||||||
|
|
||||||
|
# keep 4 weeks worth of backlogs
|
||||||
|
rotate {{ log_retention_days }}
|
||||||
|
|
||||||
|
# create new (empty) log files after rotating old ones
|
||||||
|
create
|
||||||
|
|
||||||
|
# use date as a suffix of the rotated file
|
||||||
|
dateext
|
||||||
|
|
||||||
|
# uncomment this if you want your log files compressed
|
||||||
|
compress
|
||||||
|
|
||||||
|
# packages drop log rotation information into this directory
|
||||||
|
include /etc/logrotate.d
|
||||||
|
|
||||||
|
# system-specific logs may be also be configured here.
|
7
templates/AlmaLinux/9/etc/logrotate.d/btmp
Normal file
7
templates/AlmaLinux/9/etc/logrotate.d/btmp
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# no packages own btmp -- we'll rotate it here
|
||||||
|
/var/log/btmp {
|
||||||
|
missingok
|
||||||
|
monthly
|
||||||
|
create 0660 root utmp
|
||||||
|
rotate 1
|
||||||
|
}
|
8
templates/AlmaLinux/9/etc/logrotate.d/wtmp
Normal file
8
templates/AlmaLinux/9/etc/logrotate.d/wtmp
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# no packages own wtmp -- we'll rotate it here
|
||||||
|
/var/log/wtmp {
|
||||||
|
missingok
|
||||||
|
monthly
|
||||||
|
create 0664 root utmp
|
||||||
|
minsize 1M
|
||||||
|
rotate 1
|
||||||
|
}
|
23
templates/Fedora/41/etc/logrotate.conf
Normal file
23
templates/Fedora/41/etc/logrotate.conf
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# see "man logrotate" for details
|
||||||
|
|
||||||
|
# global options do not affect preceding include directives
|
||||||
|
|
||||||
|
# rotate log files weekly
|
||||||
|
daily
|
||||||
|
|
||||||
|
# keep 4 weeks worth of backlogs
|
||||||
|
rotate 90
|
||||||
|
|
||||||
|
# create new (empty) log files after rotating old ones
|
||||||
|
create
|
||||||
|
|
||||||
|
# use date as a suffix of the rotated file
|
||||||
|
dateext
|
||||||
|
|
||||||
|
# uncomment this if you want your log files compressed
|
||||||
|
compress
|
||||||
|
|
||||||
|
# packages drop log rotation information into this directory
|
||||||
|
include /etc/logrotate.d
|
||||||
|
|
||||||
|
# system-specific logs may also be configured here.
|
7
templates/Fedora/41/etc/logrotate.d/btmp
Normal file
7
templates/Fedora/41/etc/logrotate.d/btmp
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# no packages own btmp -- we'll rotate it here
|
||||||
|
/var/log/btmp {
|
||||||
|
missingok
|
||||||
|
monthly
|
||||||
|
create 0660 root utmp
|
||||||
|
rotate 1
|
||||||
|
}
|
8
templates/Fedora/41/etc/logrotate.d/wtmp
Normal file
8
templates/Fedora/41/etc/logrotate.d/wtmp
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# no packages own wtmp -- we'll rotate it here
|
||||||
|
/var/log/wtmp {
|
||||||
|
missingok
|
||||||
|
monthly
|
||||||
|
create 0664 root utmp
|
||||||
|
minsize 1M
|
||||||
|
rotate 1
|
||||||
|
}
|
23
templates/Fedora/42/etc/logrotate.conf
Normal file
23
templates/Fedora/42/etc/logrotate.conf
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# see "man logrotate" for details
|
||||||
|
|
||||||
|
# global options do not affect preceding include directives
|
||||||
|
|
||||||
|
# rotate log files weekly
|
||||||
|
daily
|
||||||
|
|
||||||
|
# keep 4 weeks worth of backlogs
|
||||||
|
rotate 90
|
||||||
|
|
||||||
|
# create new (empty) log files after rotating old ones
|
||||||
|
create
|
||||||
|
|
||||||
|
# use date as a suffix of the rotated file
|
||||||
|
dateext
|
||||||
|
|
||||||
|
# uncomment this if you want your log files compressed
|
||||||
|
compress
|
||||||
|
|
||||||
|
# packages drop log rotation information into this directory
|
||||||
|
include /etc/logrotate.d
|
||||||
|
|
||||||
|
# system-specific logs may also be configured here.
|
7
templates/Fedora/42/etc/logrotate.d/btmp
Normal file
7
templates/Fedora/42/etc/logrotate.d/btmp
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# no packages own btmp -- we'll rotate it here
|
||||||
|
/var/log/btmp {
|
||||||
|
missingok
|
||||||
|
monthly
|
||||||
|
create 0660 root utmp
|
||||||
|
rotate 1
|
||||||
|
}
|
8
templates/Fedora/42/etc/logrotate.d/wtmp
Normal file
8
templates/Fedora/42/etc/logrotate.d/wtmp
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# no packages own wtmp -- we'll rotate it here
|
||||||
|
/var/log/wtmp {
|
||||||
|
missingok
|
||||||
|
monthly
|
||||||
|
create 0664 root utmp
|
||||||
|
minsize 1M
|
||||||
|
rotate 1
|
||||||
|
}
|
20
templates/OracleLinux/8/etc/logrotate.conf
Normal file
20
templates/OracleLinux/8/etc/logrotate.conf
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# see "man logrotate" for details
|
||||||
|
# rotate log files weekly
|
||||||
|
daily
|
||||||
|
|
||||||
|
# keep 4 weeks worth of backlogs
|
||||||
|
rotate {{ log_retention_days }}
|
||||||
|
|
||||||
|
# create new (empty) log files after rotating old ones
|
||||||
|
create
|
||||||
|
|
||||||
|
# use date as a suffix of the rotated file
|
||||||
|
dateext
|
||||||
|
|
||||||
|
# uncomment this if you want your log files compressed
|
||||||
|
compress
|
||||||
|
|
||||||
|
# packages drop log rotation information into this directory
|
||||||
|
include /etc/logrotate.d
|
||||||
|
|
||||||
|
# system-specific logs may be also be configured here.
|
7
templates/OracleLinux/8/etc/logrotate.d/btmp
Normal file
7
templates/OracleLinux/8/etc/logrotate.d/btmp
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# no packages own btmp -- we'll rotate it here
|
||||||
|
/var/log/btmp {
|
||||||
|
missingok
|
||||||
|
monthly
|
||||||
|
create 0660 root utmp
|
||||||
|
rotate 1
|
||||||
|
}
|
8
templates/OracleLinux/8/etc/logrotate.d/wtmp
Normal file
8
templates/OracleLinux/8/etc/logrotate.d/wtmp
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# no packages own wtmp -- we'll rotate it here
|
||||||
|
/var/log/wtmp {
|
||||||
|
missingok
|
||||||
|
monthly
|
||||||
|
create 0664 root utmp
|
||||||
|
minsize 1M
|
||||||
|
rotate 1
|
||||||
|
}
|
20
templates/OracleLinux/9/etc/logrotate.conf
Normal file
20
templates/OracleLinux/9/etc/logrotate.conf
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# see "man logrotate" for details
|
||||||
|
# rotate log files weekly
|
||||||
|
daily
|
||||||
|
|
||||||
|
# keep 4 weeks worth of backlogs
|
||||||
|
rotate {{ log_retention_days }}
|
||||||
|
|
||||||
|
# create new (empty) log files after rotating old ones
|
||||||
|
create
|
||||||
|
|
||||||
|
# use date as a suffix of the rotated file
|
||||||
|
dateext
|
||||||
|
|
||||||
|
# uncomment this if you want your log files compressed
|
||||||
|
compress
|
||||||
|
|
||||||
|
# packages drop log rotation information into this directory
|
||||||
|
include /etc/logrotate.d
|
||||||
|
|
||||||
|
# system-specific logs may be also be configured here.
|
7
templates/OracleLinux/9/etc/logrotate.d/btmp
Normal file
7
templates/OracleLinux/9/etc/logrotate.d/btmp
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# no packages own btmp -- we'll rotate it here
|
||||||
|
/var/log/btmp {
|
||||||
|
missingok
|
||||||
|
monthly
|
||||||
|
create 0660 root utmp
|
||||||
|
rotate 1
|
||||||
|
}
|
8
templates/OracleLinux/9/etc/logrotate.d/wtmp
Normal file
8
templates/OracleLinux/9/etc/logrotate.d/wtmp
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# no packages own wtmp -- we'll rotate it here
|
||||||
|
/var/log/wtmp {
|
||||||
|
missingok
|
||||||
|
monthly
|
||||||
|
create 0664 root utmp
|
||||||
|
minsize 1M
|
||||||
|
rotate 1
|
||||||
|
}
|
20
templates/Rocky/8/etc/logrotate.conf
Normal file
20
templates/Rocky/8/etc/logrotate.conf
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# see "man logrotate" for details
|
||||||
|
# rotate log files weekly
|
||||||
|
daily
|
||||||
|
|
||||||
|
# keep 4 weeks worth of backlogs
|
||||||
|
rotate {{ log_retention_days }}
|
||||||
|
|
||||||
|
# create new (empty) log files after rotating old ones
|
||||||
|
create
|
||||||
|
|
||||||
|
# use date as a suffix of the rotated file
|
||||||
|
dateext
|
||||||
|
|
||||||
|
# uncomment this if you want your log files compressed
|
||||||
|
compress
|
||||||
|
|
||||||
|
# packages drop log rotation information into this directory
|
||||||
|
include /etc/logrotate.d
|
||||||
|
|
||||||
|
# system-specific logs may be also be configured here.
|
7
templates/Rocky/8/etc/logrotate.d/btmp
Normal file
7
templates/Rocky/8/etc/logrotate.d/btmp
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# no packages own btmp -- we'll rotate it here
|
||||||
|
/var/log/btmp {
|
||||||
|
missingok
|
||||||
|
monthly
|
||||||
|
create 0660 root utmp
|
||||||
|
rotate 1
|
||||||
|
}
|
8
templates/Rocky/8/etc/logrotate.d/wtmp
Normal file
8
templates/Rocky/8/etc/logrotate.d/wtmp
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# no packages own wtmp -- we'll rotate it here
|
||||||
|
/var/log/wtmp {
|
||||||
|
missingok
|
||||||
|
monthly
|
||||||
|
create 0664 root utmp
|
||||||
|
minsize 1M
|
||||||
|
rotate 1
|
||||||
|
}
|
20
templates/Rocky/9/etc/logrotate.conf
Normal file
20
templates/Rocky/9/etc/logrotate.conf
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# see "man logrotate" for details
|
||||||
|
# rotate log files weekly
|
||||||
|
daily
|
||||||
|
|
||||||
|
# keep 4 weeks worth of backlogs
|
||||||
|
rotate {{ log_retention_days }}
|
||||||
|
|
||||||
|
# create new (empty) log files after rotating old ones
|
||||||
|
create
|
||||||
|
|
||||||
|
# use date as a suffix of the rotated file
|
||||||
|
dateext
|
||||||
|
|
||||||
|
# uncomment this if you want your log files compressed
|
||||||
|
compress
|
||||||
|
|
||||||
|
# packages drop log rotation information into this directory
|
||||||
|
include /etc/logrotate.d
|
||||||
|
|
||||||
|
# system-specific logs may be also be configured here.
|
7
templates/Rocky/9/etc/logrotate.d/btmp
Normal file
7
templates/Rocky/9/etc/logrotate.d/btmp
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# no packages own btmp -- we'll rotate it here
|
||||||
|
/var/log/btmp {
|
||||||
|
missingok
|
||||||
|
monthly
|
||||||
|
create 0660 root utmp
|
||||||
|
rotate 1
|
||||||
|
}
|
8
templates/Rocky/9/etc/logrotate.d/wtmp
Normal file
8
templates/Rocky/9/etc/logrotate.d/wtmp
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# no packages own wtmp -- we'll rotate it here
|
||||||
|
/var/log/wtmp {
|
||||||
|
missingok
|
||||||
|
monthly
|
||||||
|
create 0664 root utmp
|
||||||
|
minsize 1M
|
||||||
|
rotate 1
|
||||||
|
}
|
25
vars/AlmaLinux-8-default.yml
Normal file
25
vars/AlmaLinux-8-default.yml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
# vars file for ensure_log_rotation
|
||||||
|
package_list:
|
||||||
|
- name: 'logrotate'
|
||||||
|
state: 'present'
|
||||||
|
template_list:
|
||||||
|
- dest: '/etc/logrotate.conf'
|
||||||
|
force: 'yes'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/logrotate.conf'
|
||||||
|
- dest: '/etc/logrotate.d/btmp'
|
||||||
|
force: 'yes'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/logrotate.d/btmp'
|
||||||
|
- dest: '/etc/logrotate.d/wtmp'
|
||||||
|
force: 'yes'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/logrotate.d/wtmp'
|
||||||
|
|
25
vars/AlmaLinux-9-default.yml
Normal file
25
vars/AlmaLinux-9-default.yml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
# vars file for ensure_log_rotation
|
||||||
|
package_list:
|
||||||
|
- name: 'logrotate'
|
||||||
|
state: 'present'
|
||||||
|
template_list:
|
||||||
|
- dest: '/etc/logrotate.conf'
|
||||||
|
force: 'yes'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/logrotate.conf'
|
||||||
|
- dest: '/etc/logrotate.d/btmp'
|
||||||
|
force: 'yes'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/logrotate.d/btmp'
|
||||||
|
- dest: '/etc/logrotate.d/wtmp'
|
||||||
|
force: 'yes'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/logrotate.d/wtmp'
|
||||||
|
|
29
vars/Fedora-41-default.yml
Normal file
29
vars/Fedora-41-default.yml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
---
|
||||||
|
# vars file for ensure_log_rotation
|
||||||
|
package_list:
|
||||||
|
- name: 'logrotate'
|
||||||
|
state: 'present'
|
||||||
|
service_list:
|
||||||
|
- name: 'logrotate.timer'
|
||||||
|
state: 'started'
|
||||||
|
enabled: 'yes'
|
||||||
|
template_list:
|
||||||
|
- dest: '/etc/logrotate.conf'
|
||||||
|
force: 'yes'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/logrotate.conf'
|
||||||
|
- dest: '/etc/logrotate.d/btmp'
|
||||||
|
force: 'yes'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/logrotate.d/btmp'
|
||||||
|
- dest: '/etc/logrotate.d/wtmp'
|
||||||
|
force: 'yes'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/logrotate.d/wtmp'
|
||||||
|
|
29
vars/Fedora-42-default.yml
Normal file
29
vars/Fedora-42-default.yml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
---
|
||||||
|
# vars file for ensure_log_rotation
|
||||||
|
package_list:
|
||||||
|
- name: 'logrotate'
|
||||||
|
state: 'present'
|
||||||
|
service_list:
|
||||||
|
- name: 'logrotate.timer'
|
||||||
|
state: 'started'
|
||||||
|
enabled: 'yes'
|
||||||
|
template_list:
|
||||||
|
- dest: '/etc/logrotate.conf'
|
||||||
|
force: 'yes'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/logrotate.conf'
|
||||||
|
- dest: '/etc/logrotate.d/btmp'
|
||||||
|
force: 'yes'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/logrotate.d/btmp'
|
||||||
|
- dest: '/etc/logrotate.d/wtmp'
|
||||||
|
force: 'yes'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/logrotate.d/wtmp'
|
||||||
|
|
25
vars/OracleLinux-8-default.yml
Normal file
25
vars/OracleLinux-8-default.yml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
# vars file for ensure_log_rotation
|
||||||
|
package_list:
|
||||||
|
- name: 'logrotate'
|
||||||
|
state: 'present'
|
||||||
|
template_list:
|
||||||
|
- dest: '/etc/logrotate.conf'
|
||||||
|
force: 'yes'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/logrotate.conf'
|
||||||
|
- dest: '/etc/logrotate.d/btmp'
|
||||||
|
force: 'yes'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/logrotate.d/btmp'
|
||||||
|
- dest: '/etc/logrotate.d/wtmp'
|
||||||
|
force: 'yes'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/logrotate.d/wtmp'
|
||||||
|
|
25
vars/OracleLinux-9-default.yml
Normal file
25
vars/OracleLinux-9-default.yml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
# vars file for ensure_log_rotation
|
||||||
|
package_list:
|
||||||
|
- name: 'logrotate'
|
||||||
|
state: 'present'
|
||||||
|
template_list:
|
||||||
|
- dest: '/etc/logrotate.conf'
|
||||||
|
force: 'yes'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/logrotate.conf'
|
||||||
|
- dest: '/etc/logrotate.d/btmp'
|
||||||
|
force: 'yes'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/logrotate.d/btmp'
|
||||||
|
- dest: '/etc/logrotate.d/wtmp'
|
||||||
|
force: 'yes'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/logrotate.d/wtmp'
|
||||||
|
|
25
vars/Rocky-8-default.yml
Normal file
25
vars/Rocky-8-default.yml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
# vars file for ensure_log_rotation
|
||||||
|
package_list:
|
||||||
|
- name: 'logrotate'
|
||||||
|
state: 'present'
|
||||||
|
template_list:
|
||||||
|
- dest: '/etc/logrotate.conf'
|
||||||
|
force: 'yes'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/logrotate.conf'
|
||||||
|
- dest: '/etc/logrotate.d/btmp'
|
||||||
|
force: 'yes'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/logrotate.d/btmp'
|
||||||
|
- dest: '/etc/logrotate.d/wtmp'
|
||||||
|
force: 'yes'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/logrotate.d/wtmp'
|
||||||
|
|
25
vars/Rocky-9-default.yml
Normal file
25
vars/Rocky-9-default.yml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
# vars file for ensure_log_rotation
|
||||||
|
package_list:
|
||||||
|
- name: 'logrotate'
|
||||||
|
state: 'present'
|
||||||
|
template_list:
|
||||||
|
- dest: '/etc/logrotate.conf'
|
||||||
|
force: 'yes'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/logrotate.conf'
|
||||||
|
- dest: '/etc/logrotate.d/btmp'
|
||||||
|
force: 'yes'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/logrotate.d/btmp'
|
||||||
|
- dest: '/etc/logrotate.d/wtmp'
|
||||||
|
force: 'yes'
|
||||||
|
group: 'root'
|
||||||
|
mode: '0644'
|
||||||
|
owner: 'root'
|
||||||
|
src: '{{ ansible_distribution }}/{{ ansible_distribution_major_version }}/etc/logrotate.d/wtmp'
|
||||||
|
|
Reference in New Issue
Block a user