Skip to content

Commit d26c4f8

Browse files
committed
refactor(macro): extract file_requisites macro
1 parent a2d094c commit d26c4f8

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

php/fpm/pools.sls

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
# Manages the php-fpm pools config files
22
{% from "php/map.jinja" import php with context %}
33
{% from "php/macro.jinja" import sls_block %}
4+
{% from "php/macro.jinja" import file_requisites %}
45
{% from "php/fpm/pools_config.sls" import pool_states with context %}
56
6-
{% macro file_requisites(states) %}
7-
{%- for state in states %}
8-
- file: {{ state }}
9-
{%- endfor -%}
10-
{% endmacro %}
11-
127
include:
138
- php.fpm.service
149
- php.fpm.pools_config

php/macro.jinja

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,9 @@
2727

2828
{{ ret|json() }}
2929
{%- endmacro -%}
30+
31+
{% macro file_requisites(states) %}
32+
{%- for state in states %}
33+
- file: {{ state }}
34+
{%- endfor -%}
35+
{% endmacro %}

0 commit comments

Comments
 (0)