evolinux-base: deploy custom motd if template are present

This commit is contained in:
Victor LABORIE 2018-11-30 15:14:39 +01:00
parent 6469733d2f
commit 74f25e8183
3 changed files with 20 additions and 0 deletions

View file

@ -11,6 +11,7 @@ The **patch** part changes incrementally at each release.
## [Unreleased]
### Added
* evolinux-base: deploy custom motd if template are present
### Changed

View file

@ -96,6 +96,8 @@
include: log2mail.yml
when: evolinux_log2mail_include
- include: motd.yml
- name: Munin
include_role:
name: munin

View file

@ -0,0 +1,17 @@
---
- name: Deploy custom motd
template:
src: "{{ item }}"
dest: /etc/motd
force: True
owner: root
group: root
mode: "0644"
with_first_found:
- files:
- "motd/motd.{{ inventory_hostname }}.j2"
- "motd/motd.{{ host_group }}.j2"
- "motd/motd.default.j2"
skip: True
tags:
- motd