feat(repo): add repo pattern so we can set distro repo during tests
This commit is contained in:
parent
d26c4f8057
commit
3c9efc713d
@ -33,3 +33,11 @@
|
|||||||
- file: {{ state }}
|
- file: {{ state }}
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
{%- macro format_kwargs(kwarg) -%}
|
||||||
|
{%- filter indent(4) %}
|
||||||
|
{%- for k, v in kwarg|dictsort() %}
|
||||||
|
- {{ k }}: {{ v }}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- endfilter %}
|
||||||
|
{%- endmacro %}
|
||||||
|
5
php/repo/init.sls
Normal file
5
php/repo/init.sls
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=sls
|
||||||
|
|
||||||
|
include:
|
||||||
|
- .install
|
11
php/repo/install.sls
Normal file
11
php/repo/install.sls
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# vim: ft=sls
|
||||||
|
|
||||||
|
{#- Get the `tplroot` from `tpldir` #}
|
||||||
|
{%- set tplroot = tpldir.split('/')[0] %}
|
||||||
|
{%- from tplroot ~ "/map.jinja" import php with context %}
|
||||||
|
{%- from tplroot ~ "/macro.jinja" import format_kwargs with context %}
|
||||||
|
|
||||||
|
php/repo/install:
|
||||||
|
pkgrepo.managed:
|
||||||
|
{{- format_kwargs(php.repo) }}
|
Loading…
Reference in New Issue
Block a user