2022-12-04 15:14:43 +01:00
|
|
|
- name: "motd : set motd"
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: "{{ _system_base_motd_file }}"
|
|
|
|
dest: "/etc/motd"
|
|
|
|
mode: 0644
|
|
|
|
when:
|
2022-12-08 23:19:54 +01:00
|
|
|
system_base_motd_dir is defined and
|
2022-12-04 15:14:43 +01:00
|
|
|
_system_base_motd_file != ""
|
|
|
|
vars:
|
|
|
|
_file_path:
|
2022-12-08 23:19:54 +01:00
|
|
|
- "{{ system_base_motd_dir }}/{{ ansible_hostname }}"
|
2022-12-04 15:14:43 +01:00
|
|
|
_system_base_motd_file: >-
|
|
|
|
{{ lookup('ansible.builtin.first_found', _file_path, errors='ignore') }}
|