Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevent /etc/issue and /etc/issue.net to be overwritten on package upgrade #211

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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