Skip to content

Commit

Permalink
convert rsyslog validation to handler, Ubuntu 24.04 permission issue
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Sjögren <[email protected]>
  • Loading branch information
konstruktoid committed Jan 10, 2024
1 parent 3c9e9b7 commit 2466196
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,8 @@
cmd: grub2-mkconfig
register: update_grub2
changed_when: update_grub2.rc == 0

- name: Validate rsyslogd

Check failure on line 163 in handlers/main.yml

View workflow job for this annotation

GitHub Actions / build

no-changed-when

Commands should not change things if nothing needs doing.
become: true
ansible.builtin.command:
cmd: rsyslogd -N3 -f /etc/rsyslog.conf
6 changes: 4 additions & 2 deletions tasks/journalconf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@
mode: "0640"
state: present
create: false
validate: rsyslogd -N3 -f %s
when: rsyslogconf.stat.exists
notify:
- Validate rsyslogd
tags:
- rsyslog
- CIS-UBUNTU2004-4.2.1.4
Expand All @@ -82,7 +83,8 @@
mode: "0644"
state: present
create: true
validate: rsyslogd -N3 -f %s
when: rsyslogd.stat.isdir
notify:
- Validate rsyslogd
tags:
- rsyslog

0 comments on commit 2466196

Please sign in to comment.