diff --git a/states/sensu/agent.sls b/states/sensu/agent.sls index 68e131b..e8e2e8c 100644 --- a/states/sensu/agent.sls +++ b/states/sensu/agent.sls @@ -26,9 +26,10 @@ sensu-agent-bin: sensu-agent-service-file: file.managed: - name: /etc/systemd/system/sensu-agent.service - - source: salt://sensu/sensu-agent.service + - source: salt://sensu/sensu-agent.service.j2 - user: root - group: root + - template: jinja - mode: 0644 sensu-agent-cache-dir: @@ -73,4 +74,4 @@ sensu-agent-service: - name: sensu-agent - enable: True - require: - - file: sensu-agent-config-file \ No newline at end of file + - file: sensu-agent-config-file diff --git a/states/sensu/sensu-agent.service b/states/sensu/sensu-agent.service.j2 similarity index 76% rename from states/sensu/sensu-agent.service rename to states/sensu/sensu-agent.service.j2 index bbbce0f..8ade199 100644 --- a/states/sensu/sensu-agent.service +++ b/states/sensu/sensu-agent.service.j2 @@ -1,3 +1,4 @@ +## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }} [Unit] Description=The Sensu Agent process. After=network-online.target @@ -14,4 +15,4 @@ ExecStart=/usr/sbin/sensu-agent start WorkingDirectory=/ [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target