updated motd state

This commit is contained in:
Paul 2022-12-26 10:12:56 +01:00
parent bc2a10b8af
commit 2802893ae7
2 changed files with 18 additions and 15 deletions

View File

@ -1,16 +1,3 @@
---
motd-pkg:
pkg.latest:
- name: figlet
{% if salt["file.is_link"]("/etc/motd") %}
motd-file-link-delete:
file.absent:
- name: /etc/motd
{% endif %}
motd-file:
file.managed:
- name: /etc/motd
- source: salt://motd/motd.j2
- template: jinja
include:
- .install

16
states/motd/install.sls Normal file
View File

@ -0,0 +1,16 @@
---
motd-pkg:
pkg.installed:
- name: figlet
{% if salt["file.is_link"]("/etc/motd") %}
motd-file-link-delete:
file.absent:
- name: /etc/motd
{% endif %}
motd-file:
file.managed:
- name: /etc/motd
- source: salt://motd/motd.j2
- template: jinja