30 lines
706 B
Text
30 lines
706 B
Text
{%- 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}}'
|
|
|
|
salt-master:
|
|
{%- if os=="CentOS" or os=="RedHat" %}
|
|
pkg.installed: []
|
|
{%- elif os=="Arch" or os=="Manjaro" %}
|
|
pkg.installed:
|
|
- pkgs:
|
|
- salt
|
|
{%- endif %}
|
|
service.running:
|
|
- enable: true
|
|
- watch:
|
|
- file: /etc/salt/master
|
|
|
|
/etc/salt/master:
|
|
file.managed:
|
|
- source: salt://roles/maintain/saltmaster/master
|
|
- user: root
|
|
- group: root
|
|
- mode: 644
|
|
|
|
/srv/salt/prod/states/pillars:
|
|
file.symlink:
|
|
- target: ../pillars/
|