Skip to content

Commit

Permalink
prevent /etc/issue and /etc/issue.net to be overwritten on package up…
Browse files Browse the repository at this point in the history
…grade

Signed-off-by: David Lesaffre <[email protected]>
  • Loading branch information
dlesaffre committed Feb 19, 2024
1 parent b87edb7 commit c135fa4
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions tasks/section_1/cis_1.7.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,15 @@
- motd

- name: "1.7.2 | PATCH | Ensure local login warning banner is configured properly"
ansible.builtin.template:
src: etc/issue.j2
dest: /etc/issue
block:
- name: "1.7.2 | PATCH | Ensure local login warning banner is configured properly | issue"
ansible.builtin.template:
src: etc/issue.j2
dest: /etc/issue

- name: "1.7.2 | PATCH | Ensure local login warning banner is kept on package upgrade | issue"
community.general.dpkg_divert:
path: /etc/issue
when:
- ubtu22cis_rule_1_7_2
tags:
Expand All @@ -43,9 +49,15 @@
- banner

- name: "1.7.3 | PATCH | Ensure remote login warning banner is configured properly"
ansible.builtin.template:
src: etc/issue.net.j2
dest: /etc/issue.net
block:
- name: "1.7.3 | PATCH | Ensure remote login warning banner is configured properly | issue.net"
ansible.builtin.template:
src: etc/issue.net.j2
dest: /etc/issue.net

- name: "1.7.3 | PATCH | Ensure remote login warning banner is kept on package upgrade | issue.net"
community.general.dpkg_divert:
path: /etc/issue.net
when:
- ubtu22cis_rule_1_7_3
tags:
Expand Down

0 comments on commit c135fa4

Please sign in to comment.