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