This commit is contained in:
Actaeus Curabitur 2022-09-08 06:03:10 -05:00
parent 7a5df216cc
commit 6f03ab50a9
2 changed files with 8 additions and 2 deletions

View file

@ -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" %}

View file

@ -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 %}