We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bee8d8c + e032cf2 commit 1c2675cCopy full SHA for 1c2675c
roles/edpm_sshd/tasks/configure.yml
@@ -74,11 +74,16 @@
74
{% if edpm_sshd_banner_enabled %}
75
{% set _ = edpm_sshd_server_options.__setitem__('Banner', '/etc/issue') %}
76
{% endif %}
77
- {% if edpm_sshd_motd_enabled %}
78
- {% set _ = edpm_sshd_server_options.__setitem__('PrintMotd', 'yes') %}
79
- {% endif %}
80
{{ edpm_sshd_server_options }}
81
+ - name: Set sshd motd when enabled
+ ansible.builtin.lineinfile:
+ path: /etc/pam.d/sshd
82
+ regexp: "^session.*optional.*pam_motd.so"
83
+ line: "session optional pam_motd.so motd=/etc/motd"
84
+ state: present
85
+ when: edpm_sshd_motd_enabled
86
+
87
- name: Adjust ssh server configuration
88
become: true
89
ansible.builtin.template:
0 commit comments