From bbcc4cda7ada4470db07dc02a5938a5b650e2f1c Mon Sep 17 00:00:00 2001 From: sticky-note Date: Wed, 12 Feb 2020 15:49:22 +1100 Subject: [PATCH] fix(tpl_path): replace slspath to tplroot --- salt/cloud.sls | 3 ++- salt/master.sls | 2 +- salt/minion.sls | 2 +- salt/ssh.sls | 3 ++- salt/standalone.sls | 3 ++- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/salt/cloud.sls b/salt/cloud.sls index 7d87f24..71ae0d2 100644 --- a/salt/cloud.sls +++ b/salt/cloud.sls @@ -1,3 +1,4 @@ +{%- set tplroot = tpldir.split('/')[0] %} {% from "salt/map.jinja" import salt_settings with context %} {%- if salt_settings.use_pip %} @@ -34,7 +35,7 @@ salt-cloud: cloud-cert-{{ cert }}-pem: file.managed: - name: {{ salt_settings.config_path }}/pki/cloud/{{ cert }}.pem - - source: salt://{{ slspath }}/files/key + - source: salt://{{ tplroot }}/files/key - template: jinja - user: root - group: diff --git a/salt/master.sls b/salt/master.sls index 4a23cca..ce08f7f 100644 --- a/salt/master.sls +++ b/salt/master.sls @@ -24,7 +24,7 @@ salt-master: }} {%- else %} - template: jinja - - source: salt://{{ slspath }}/files/master.d + - source: salt://{{ tplroot }}/files/master.d {%- endif %} - clean: {{ salt_settings.clean_config_d_dir }} - exclude_pat: _* diff --git a/salt/minion.sls b/salt/minion.sls index 466fdb3..e61e072 100644 --- a/salt/minion.sls +++ b/salt/minion.sls @@ -65,7 +65,7 @@ salt-minion: }} {%- else %} - template: jinja - - source: salt://{{ slspath }}/files/minion.d + - source: salt://{{ tplroot }}/files/minion.d - context: standalone: False {%- endif %} diff --git a/salt/ssh.sls b/salt/ssh.sls index 8f27a77..e81e89e 100644 --- a/salt/ssh.sls +++ b/salt/ssh.sls @@ -1,3 +1,4 @@ +{%- set tplroot = tpldir.split('/')[0] %} {% from "salt/map.jinja" import salt_settings with context %} {% if salt_settings.install_packages %} @@ -12,7 +13,7 @@ ensure-salt-ssh-is-installed: ensure-roster-config: file.managed: - name: {{ salt_settings.config_path }}/roster - - source: salt://{{ slspath }}/files/roster.jinja + - source: salt://{{ tplroot }}/files/roster.jinja - template: jinja {% if salt_settings.install_packages %} - require: diff --git a/salt/standalone.sls b/salt/standalone.sls index daffcec..dd38a5a 100644 --- a/salt/standalone.sls +++ b/salt/standalone.sls @@ -1,3 +1,4 @@ +{%- set tplroot = tpldir.split('/')[0] %} {% from "salt/map.jinja" import salt_settings with context %} salt-minion: @@ -11,7 +12,7 @@ salt-minion: file.recurse: - name: {{ salt_settings.config_path }}/minion.d - template: jinja - - source: salt://{{ slspath }}/files/minion.d + - source: salt://{{ tplroot }}/files/minion.d - clean: {{ salt_settings.clean_config_d_dir }} - exclude_pat: _* - context: