diff --git a/states/salt_minion/config.sls b/states/salt_minion/config.sls index 3d973a0..31546d8 100644 --- a/states/salt_minion/config.sls +++ b/states/salt_minion/config.sls @@ -3,7 +3,7 @@ salt-minion-config: file.managed: - name: /etc/salt/minion - - source: salt://salt_minion/minion.j2 + - source: salt://salt_minion/templates/minion.j2 - user: root - group: root - mode: 640 diff --git a/states/salt_minion/service.sls b/states/salt_minion/service.sls index b64520c..d81f706 100644 --- a/states/salt_minion/service.sls +++ b/states/salt_minion/service.sls @@ -3,7 +3,7 @@ salt-minion-service-file: file.managed: - name: /etc/systemd/system/salt-minion.service - - source: salt://salt_minion/salt-minion.service.j2 + - source: salt://salt_minion/templates/salt-minion.service.j2 - template: jinja - user: root - group: root diff --git a/states/salt_minion/minion.j2 b/states/salt_minion/templates/minion.j2 similarity index 78% rename from states/salt_minion/minion.j2 rename to states/salt_minion/templates/minion.j2 index 509f286..006c910 100644 --- a/states/salt_minion/minion.j2 +++ b/states/salt_minion/templates/minion.j2 @@ -1,3 +1,3 @@ ## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }} {%- from "salt_minion/map.jinja" import salt_minion with context %} -{{ salt_minion.config|yaml(False) }} \ No newline at end of file +{{ salt_minion.config|yaml(False) }} diff --git a/states/salt_minion/minion.sample b/states/salt_minion/templates/minion.sample similarity index 99% rename from states/salt_minion/minion.sample rename to states/salt_minion/templates/minion.sample index 3885e7c..f94568f 100644 --- a/states/salt_minion/minion.sample +++ b/states/salt_minion/templates/minion.sample @@ -327,7 +327,7 @@ # Grains cache expiration, in seconds. If the cache file is older than this # number of seconds then the grains cache will be dumped and fully re-populated -# with fresh data. Defaults to 5 minutes. Will have no effect if 'grains_cache' +# with fresh data. Defaults to 5 minutes. Will have no effect if 'grains_cache' # is not enabled. # grains_cache_expiration: 300 @@ -778,4 +778,4 @@ log_level: debug ###### Miscellaneous settings ###### ############################################ # Default match type for filtering events tags: startswith, endswith, find, regex, fnmatch -#event_match_type: startswith \ No newline at end of file +#event_match_type: startswith diff --git a/states/salt_minion/salt-minion.service.j2 b/states/salt_minion/templates/salt-minion.service.j2 similarity index 77% rename from states/salt_minion/salt-minion.service.j2 rename to states/salt_minion/templates/salt-minion.service.j2 index 36e1cce..9aefa2d 100644 --- a/states/salt_minion/salt-minion.service.j2 +++ b/states/salt_minion/templates/salt-minion.service.j2 @@ -9,8 +9,9 @@ Type=notify KillMode=control-group NotifyAccess=all LimitNOFILE=8192 -ExecStart=/usr/local/bin/salt-minion +ExecSearchPath=/usr/local/bin:/usr/bin +ExecStart=salt-minion TimeoutStopSec=5s [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target