Skip to content

Commit 3c9efc7

Browse files
committed
feat(repo): add repo pattern so we can set distro repo during tests
1 parent d26c4f8 commit 3c9efc7

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

php/macro.jinja

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,11 @@
3333
- file: {{ state }}
3434
{%- endfor -%}
3535
{% endmacro %}
36+
37+
{%- macro format_kwargs(kwarg) -%}
38+
{%- filter indent(4) %}
39+
{%- for k, v in kwarg|dictsort() %}
40+
- {{ k }}: {{ v }}
41+
{%- endfor %}
42+
{%- endfilter %}
43+
{%- endmacro %}

php/repo/init.sls

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=sls
3+
4+
include:
5+
- .install

php/repo/install.sls

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=sls
3+
4+
{#- Get the `tplroot` from `tpldir` #}
5+
{%- set tplroot = tpldir.split('/')[0] %}
6+
{%- from tplroot ~ "/map.jinja" import php with context %}
7+
{%- from tplroot ~ "/macro.jinja" import format_kwargs with context %}
8+
9+
php/repo/install:
10+
pkgrepo.managed:
11+
{{- format_kwargs(php.repo) }}

0 commit comments

Comments
 (0)