2019-04-02 14:33:22 +02:00
|
|
|
{% 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 %}
|
2019-04-11 10:41:25 +02:00
|
|
|
{% set state = base_name ~ module %}
|
2019-04-02 14:33:22 +02:00
|
|
|
{% 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 %}
|