From c0d27e13d7a7b9ccd2c7e3050d5a55a02fd02eb0 Mon Sep 17 00:00:00 2001 From: Actaeus Curabitur Date: Thu, 8 Sep 2022 06:10:52 -0500 Subject: [PATCH] updated git pillar for saltmaster --- pillars/roles/git/saltmaster.sls | 7 +++++++ states/roles/maintain/saltmaster/init.sls | 7 ------- states/roles/maintain/saltmaster/test | 7 ------- 3 files changed, 7 insertions(+), 14 deletions(-) delete mode 100644 states/roles/maintain/saltmaster/test diff --git a/pillars/roles/git/saltmaster.sls b/pillars/roles/git/saltmaster.sls index 05d6f71..0b4f612 100644 --- a/pillars/roles/git/saltmaster.sls +++ b/pillars/roles/git/saltmaster.sls @@ -1,3 +1,10 @@ +{%- set branches=salt.cmd.shell('git ls-remote https://git.actcur.com/actcur/salt.git | grep -o -P "(?<=refs/heads/).*" | grep -Pv "(^temp$)|(^history$)"').split('\n') -%} +branches: + saltmaster: +{%- for branch in branches %} + - {{branch}} +{%- endfor %} + git: salt: repo: "ssh://gitea@git.actcur.com:5022/actcur/salt.git" diff --git a/states/roles/maintain/saltmaster/init.sls b/states/roles/maintain/saltmaster/init.sls index ef3f1a3..bab7e93 100644 --- a/states/roles/maintain/saltmaster/init.sls +++ b/states/roles/maintain/saltmaster/init.sls @@ -1,10 +1,3 @@ -{%- set os=grains['os'] -%} - -/test: - file.managed: - - source: salt://roles/maintain/saltmaster/test - - template: jinja - salt-master: {%- if os=="CentOS" or os=="RedHat" %} pkg.installed: [] diff --git a/states/roles/maintain/saltmaster/test b/states/roles/maintain/saltmaster/test deleted file mode 100644 index 48ac69d..0000000 --- a/states/roles/maintain/saltmaster/test +++ /dev/null @@ -1,7 +0,0 @@ -{%- set branches=salt.cmd.shell('git ls-remote https://git.actcur.com/actcur/salt.git | grep -o -P "(?<=refs/heads/).*" | grep -Pv "(^temp$)|(^history$)"').split(' ') -%} -branches: - saltmaster: - - a -{%- for branch in branches %} - - {{branch}} -{% endfor %}