Skip to content

Commit

Permalink
Bug 1857179 - Improved ansible fix for banner files. Replace files on…
Browse files Browse the repository at this point in the history
…ly when necessary.
  • Loading branch information
marcusburghardt committed Aug 5, 2021
1 parent 96db604 commit a9660f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@
# disruption = medium
{{{ ansible_instantiate_variables("login_banner_text") }}}

- name: "{{{ rule_title }}} - remove incorrect banner"
file:
state: absent
path: /etc/issue

- name: "{{{ rule_title }}} - add correct banner"
lineinfile:
- name: "{{{ rule_title }}} - ensure correct banner"
copy:
dest: /etc/issue
line: '{{{ ansible_deregexify_banner_etc_issue("login_banner_text") }}}'
create: yes
content: '{{{ ansible_deregexify_banner_etc_issue("login_banner_text") }}}'
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@
# disruption = medium
{{{ ansible_instantiate_variables("login_banner_text") }}}

- name: "{{{ rule_title }}} - remove incorrect banner"
file:
state: absent
path: /etc/motd

- name: "{{{ rule_title }}} - add correct banner"
lineinfile:
- name: "{{{ rule_title }}} - ensure correct banner"
copy:
dest: /etc/motd
line: '{{{ ansible_deregexify_banner_etc_issue("login_banner_text") }}}'
create: yes
content: '{{{ ansible_deregexify_banner_etc_issue("login_banner_text") }}}'

0 comments on commit a9660f0

Please sign in to comment.