Browse Source

php.ng.modules: install modules...

tags/v0.34.0^2
Adrien "ze" Urban 5 years ago
parent
commit
a126bf658b
1 changed files with 23 additions and 0 deletions
  1. +23
    -0
      php/ng/modules.sls

+ 23
- 0
php/ng/modules.sls View File

{% 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…
Cancel
Save