From 2802893ae7bcb38494883e198ddca518e76e2396 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Mon, 26 Dec 2022 10:12:56 +0100 Subject: [PATCH] updated motd state --- states/motd/init.sls | 17 ++--------------- states/motd/install.sls | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 15 deletions(-) create mode 100644 states/motd/install.sls diff --git a/states/motd/init.sls b/states/motd/init.sls index a198def..e39dc86 100644 --- a/states/motd/init.sls +++ b/states/motd/init.sls @@ -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 diff --git a/states/motd/install.sls b/states/motd/install.sls new file mode 100644 index 0000000..8eaa68e --- /dev/null +++ b/states/motd/install.sls @@ -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