fix envs
This commit is contained in:
parent
0ca3588275
commit
0174b6effb
4 changed files with 12 additions and 3 deletions
9
pillars/envs.sls
Normal file
9
pillars/envs.sls
Normal file
|
@ -0,0 +1,9 @@
|
|||
{%- set envs=salt.cmd.shell('ls /srv/salt/').split('\n') -%}
|
||||
envs:
|
||||
{%- if envs is not none -%}
|
||||
{%- for env in envs %}
|
||||
- {{env}}
|
||||
{%- endfor -%}
|
||||
{%- else -%}
|
||||
- prod
|
||||
{%- endif -%}
|
|
@ -4,4 +4,5 @@
|
|||
'*':
|
||||
- roles
|
||||
- servers
|
||||
- envs
|
||||
{%- endfor %}
|
||||
|
|
|
@ -6,6 +6,7 @@ $CONFIG = array (
|
|||
1 => 'cloud.actcur.com'
|
||||
),
|
||||
'overwrite.cli.url' => 'https://cloud.actcur.com/',
|
||||
'overwriteprotocol' => 'https',
|
||||
'htaccess.RewriteBase' => '/',
|
||||
'datadirectory' => '/mnt/nextcloud/data',
|
||||
'logfile' => '/var/log/nextcloud/nextcloud.log',
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
|
||||
{%- set states = salt['cp.list_states'](saltenv) -%}
|
||||
{%- set envs=salt.cmd.shell('git ls-remote https://git.actcur.com/actcur/salt.git | grep -o -P "(?<=refs/heads/).*" | grep -Pv "(^temp$)|(^history$)"').split('\n') -%}
|
||||
{%- set envs=salt.cmd.shell('ls /srv/salt/').split('\n') -%}
|
||||
{% for env in envs %}
|
||||
{% for env in pillar['envs'] %}
|
||||
{{ env }}:
|
||||
'os_family:RedHat':
|
||||
- match: grain_pcre
|
||||
|
|
Loading…
Add table
Reference in a new issue