Skip to content

Commit

Permalink
Can't test negative.
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-de-bock committed Apr 26, 2024
1 parent 1c08c71 commit f69ccba
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ This example is taken from [`molecule/default/converge.yml`](https://github.com/
dateyesterday: true
- name: example-absent
state: absent
- name: example-negative
path: "/var/log/example-keep-negative/*.log"
keep: -1
# Negative numbers work on some distributions: `error: example-negative:10 bad rotation count '-1'\`
# - name: example-negative
# path: "/var/log/example-keep-negative/*.log"
# keep: -1

roles:
- role: robertdebock.logrotate
Expand Down Expand Up @@ -123,7 +124,6 @@ The machine needs to be prepared. In CI this is done using [`molecule/default/pr
- /var/log/example-script
- /var/log/example-sharedscripts
- /var/log/example-dateyesterday
- /var/log/example-keep-negative
- name: Create log file
ansible.builtin.copy:
Expand All @@ -141,7 +141,6 @@ The machine needs to be prepared. In CI this is done using [`molecule/default/pr
- /var/log/example-script/app.log
- /var/log/example-sharedscripts/app.log
- /var/log/example-dateyesterday/app.log
- /var/log/example-keep-negative/app.log
- /var/log/btmp
- /var/log/wtmp
- /var/log/hawkey.log
Expand Down
7 changes: 4 additions & 3 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@
dateyesterday: true
- name: example-absent
state: absent
- name: example-negative
path: "/var/log/example-keep-negative/*.log"
keep: -1
# Negative numbers work on some distributions: `error: example-negative:10 bad rotation count '-1'\`
# - name: example-negative
# path: "/var/log/example-keep-negative/*.log"
# keep: -1

roles:
- role: ansible-role-logrotate
2 changes: 0 additions & 2 deletions molecule/default/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
- /var/log/example-script
- /var/log/example-sharedscripts
- /var/log/example-dateyesterday
- /var/log/example-keep-negative

- name: Create log file
ansible.builtin.copy:
Expand All @@ -43,7 +42,6 @@
- /var/log/example-script/app.log
- /var/log/example-sharedscripts/app.log
- /var/log/example-dateyesterday/app.log
- /var/log/example-keep-negative/app.log
- /var/log/btmp
- /var/log/wtmp
- /var/log/hawkey.log

0 comments on commit f69ccba

Please sign in to comment.