24 lines
807 B
YAML
24 lines
807 B
YAML
---
|
|
- name: Include disable_default_motd.yml if motd_disable_default_motd is True
|
|
ansible.builtin.include_tasks: disable_default_motd.yml
|
|
when: motd_disable_default_motd|bool
|
|
|
|
- name: "Configure_motd | Apply template {{ motd_template + ' in ' + _motd_file_path }}"
|
|
ansible.builtin.copy:
|
|
content: "{{ motd_template_prepend + _motd_template_content + motd_template_append }}"
|
|
dest: "{{ _motd_file_path }}"
|
|
owner: root
|
|
group: root
|
|
mode: '0755'
|
|
tags:
|
|
- molecule-idempotence-notest
|
|
|
|
- name: Configure_motd | Add in pam pam_exec {{ _motd_file_path }}
|
|
ansible.builtin.lineinfile:
|
|
path: "{{ item }}"
|
|
line: session optional pam_exec.so type=open_session stdout {{ _motd_file_path }}
|
|
loop:
|
|
- "{{ _motd_pam_login_file_path }}"
|
|
- "{{ _motd_pam_sshd_file_path }}"
|
|
...
|