From d26c4f80570361e41bc94c2d30216564293f137d Mon Sep 17 00:00:00 2001 From: Nicolas Rodriguez Date: Wed, 4 Sep 2019 00:35:10 +0200 Subject: [PATCH] refactor(macro): extract file_requisites macro --- php/fpm/pools.sls | 7 +------ php/macro.jinja | 6 ++++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/php/fpm/pools.sls b/php/fpm/pools.sls index bd5cc28..ff03e88 100644 --- a/php/fpm/pools.sls +++ b/php/fpm/pools.sls @@ -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 diff --git a/php/macro.jinja b/php/macro.jinja index 5790820..b5c76c3 100644 --- a/php/macro.jinja +++ b/php/macro.jinja @@ -27,3 +27,9 @@ {{ ret|json() }} {%- endmacro -%} + +{% macro file_requisites(states) %} + {%- for state in states %} + - file: {{ state }} + {%- endfor -%} +{% endmacro %}