Bladeren bron

refactor(macro): extract file_requisites macro

tags/v1.1.0
Nicolas Rodriguez 5 jaren geleden
bovenliggende
commit
d26c4f8057
2 gewijzigde bestanden met toevoegingen van 7 en 6 verwijderingen
  1. +1
    -6
      php/fpm/pools.sls
  2. +6
    -0
      php/macro.jinja

+ 1
- 6
php/fpm/pools.sls Bestand weergeven

@@ -1,14 +1,9 @@
# Manages the php-fpm pools config files
{% from "php/map.jinja" import php with context %}
{% from "php/macro.jinja" import sls_block %}
{% from "php/macro.jinja" import file_requisites %}
{% from "php/fpm/pools_config.sls" import pool_states with context %}

{% macro file_requisites(states) %}
{%- for state in states %}
- file: {{ state }}
{%- endfor -%}
{% endmacro %}

include:
- php.fpm.service
- php.fpm.pools_config

+ 6
- 0
php/macro.jinja Bestand weergeven

@@ -27,3 +27,9 @@

{{ ret|json() }}
{%- endmacro -%}

{% macro file_requisites(states) %}
{%- for state in states %}
- file: {{ state }}
{%- endfor -%}
{% endmacro %}

Laden…
Annuleren
Opslaan