php.ng.modules: install modules...
This commit is contained in:
parent
14bb2b3f28
commit
a126bf658b
23
php/ng/modules.sls
Normal file
23
php/ng/modules.sls
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{% from "php/ng/map.jinja" import php with context %}
|
||||||
|
|
||||||
|
{% set modules = salt['pillar.get']('php:ng:modules') or [] %}
|
||||||
|
{% set base_name = 'php.ng.' %}
|
||||||
|
{% set existing_states = salt['cp.list_states']() %}
|
||||||
|
|
||||||
|
{% set includes = [] %}
|
||||||
|
{% set install = [] %}
|
||||||
|
|
||||||
|
{% for module in modules %}
|
||||||
|
{% set state = base_name + module %}
|
||||||
|
{% if state in existing_states %}
|
||||||
|
{% do includes.append(state) %}
|
||||||
|
{% else %}
|
||||||
|
{% do install.append(module) %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
include: {{ includes|json }}
|
||||||
|
|
||||||
|
{% for state in install %}
|
||||||
|
{% include "php/ng/installed.jinja" %}
|
||||||
|
{% endfor %}
|
Loading…
Reference in New Issue
Block a user