-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(repository): add support for pkgrepo.managed
BREAKING CHANGE: the variable 'pkg' was renamed 'pkg.name', update your pillars
- Loading branch information
1 parent
ea84c92
commit 907f9a6
Showing
11 changed files
with
91 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=jinja | ||
# | ||
# Collection of common macros | ||
|
||
{%- macro format_kwargs(kwarg) -%} | ||
|
||
{%- filter indent(4) %} | ||
{%- for k, v in kwarg|dictsort() %} | ||
- {{ k }}: {{ v }} | ||
{%- endfor %} | ||
{%- endfilter %} | ||
|
||
{%- endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=sls | ||
|
||
{#- Get the `tplroot` from `tpldir` #} | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- from tplroot ~ "/map.jinja" import prometheus with context %} | ||
prometheus-package-repo-clean-pkgrepo-absent: | ||
pkgrepo.absent: | ||
- name: {{ prometheus.pkg.repo.name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=sls | ||
|
||
include: | ||
- .install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=sls | ||
|
||
{#- Get the `tplroot` from `tpldir` #} | ||
{%- set tplroot = tpldir.split('/')[0] %} | ||
{%- from tplroot ~ "/map.jinja" import prometheus with context %} | ||
{%- if prometheus.pkg.use_upstream_repo %} | ||
{%- from tplroot ~ "/jinja/macros.jinja" import format_kwargs with context %} | ||
prometheus-package-repo-install-pkgrepo-managed: | ||
pkgrepo.managed: | ||
{{- format_kwargs(prometheus.pkg.repo) }} | ||
prometheus-package-repo-install-file-replace-workaround-for-salt-51494: | ||
file.replace: | ||
- name: /etc/yum.repos.d/prometheus.repo | ||
- pattern: ' gpgkey2=' | ||
- repl: '\n ' | ||
- ignore_if_missing: True | ||
- onlyif: {{ grains.os_family == 'RedHat' }} | ||
{%- endif %} |