temp
This commit is contained in:
parent
7a5df216cc
commit
6f03ab50a9
2 changed files with 8 additions and 2 deletions
|
@ -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" %}
|
||||
|
|
7
states/roles/maintain/saltmaster/test
Normal file
7
states/roles/maintain/saltmaster/test
Normal 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 %}
|
Loading…
Add table
Reference in a new issue