From 6f03ab50a9d3b0e2a5e09ea880cff387dbf7471c Mon Sep 17 00:00:00 2001 From: Actaeus Curabitur Date: Thu, 8 Sep 2022 06:03:10 -0500 Subject: [PATCH] temp --- states/roles/maintain/saltmaster/init.sls | 3 +-- states/roles/maintain/saltmaster/test | 7 +++++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 states/roles/maintain/saltmaster/test diff --git a/states/roles/maintain/saltmaster/init.sls b/states/roles/maintain/saltmaster/init.sls index 062301b..815fbe4 100644 --- a/states/roles/maintain/saltmaster/init.sls +++ b/states/roles/maintain/saltmaster/init.sls @@ -1,9 +1,8 @@ {%- set os=grains['os'] -%} -{%- set branches=salt.cmd.shell('git ls-remote https://git.actcur.com/actcur/salt.git | grep -o -P "(?<=refs/heads/).*" | grep -Pv "(^temp$)|(^history$)"') -%} /test: file.managed: - - content: '{{branches}}' + - source: salt://roles/maintain/saltmaster/test salt-master: {%- if os=="CentOS" or os=="RedHat" %} diff --git a/states/roles/maintain/saltmaster/test b/states/roles/maintain/saltmaster/test new file mode 100644 index 0000000..48ac69d --- /dev/null +++ b/states/roles/maintain/saltmaster/test @@ -0,0 +1,7 @@ +{%- 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 %}