ansible-roles/system/base/motd/tasks/main.yml

12 lines
315 B
YAML
Raw Normal View History

2022-12-20 19:47:11 +01:00
---
- name: "set motd"
ansible.builtin.copy:
src: "{{ item }}"
dest: "/etc/motd"
mode: 0644
loop: "{{ [lookup('ansible.builtin.first_found', _file_path, skip=true)] | flatten }}"
vars:
_file_path: "{{ system_base_motd_dir }}/{{ ansible_hostname }}"
when:
system_base_motd_dir is defined