Skip to content

Commit

Permalink
Partial Revert "Use PAM for sshd Motd"
Browse files Browse the repository at this point in the history
This partially reverts commit e032cf2.
RHEL9 and greater will use PAM by default. We only need to ensure
PrintMotd is set to "no" to avoid duplication of the motd message.

We changed the default for PrintMotd in:
openstack-k8s-operators#838

This change ensures that we don't override the PrintMotd value and
instead we allow users to be explicit about this, otherwise, we default
to no.

Signed-off-by: Brendan Shephard <[email protected]>
  • Loading branch information
bshephar committed Dec 9, 2024
1 parent c7cc7ed commit e71d284
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions roles/edpm_sshd/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,6 @@
{% endif %}
{{ edpm_sshd_server_options }}
- name: Set sshd motd when enabled
ansible.builtin.lineinfile:
path: /etc/pam.d/sshd
regexp: "^session.*optional.*pam_motd.so"
line: "session optional pam_motd.so motd=/etc/motd"
state: present
when: edpm_sshd_motd_enabled

- name: Adjust ssh server configuration
become: true
ansible.builtin.template:
Expand Down

0 comments on commit e71d284

Please sign in to comment.