2019-02-14 15:15:54 +01:00
|
|
|
---
|
|
|
|
- block:
|
|
|
|
- name: Install the packages that manage the dynamic motd file on debian based distributions
|
|
|
|
apt: pkg={{ deb_motd_packages }} state=present update_cache=yes cache_valid_time=3600
|
|
|
|
|
|
|
|
- name: Install our motd template file on debian based distributions
|
|
|
|
template: src=motd.j2 dest=/etc/static-motd owner=root group=root mode=0644
|
|
|
|
|
|
|
|
- name: Install the dynamic merge script of the motd file on debian based distributions
|
|
|
|
template: src=update_motd.j2 dest=/etc/update-motd.d/05-motd-message owner=root group=root mode=0755
|
|
|
|
|
|
|
|
- name: Initialise the motd prompt on debian based distributions
|
2019-02-19 12:18:56 +01:00
|
|
|
shell: run-parts --lsbsysinit /etc/update-motd.d > /run/motd.dynamic && touch /etc/.custom_motd
|
|
|
|
args:
|
|
|
|
creates: /etc/.custom_motd
|
2019-02-14 15:15:54 +01:00
|
|
|
|
|
|
|
tags: motd
|