Skip to content

Commit 4e46ea0

Browse files
committed
feat(install): provide EPEL repo configuration for Amazon Linux-2
1 parent bd2506f commit 4e46ea0

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

syslog_ng/package/install.sls

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@
55
{%- set tplroot = tpldir.split('/')[0] %}
66
{%- from tplroot ~ "/map.jinja" import syslog_ng with context %}
77
8+
{#- Simulating `grains.osfinger`, which is avoided since not available in all distros #}
9+
{%- if [grains.os, grains.osrelease] == ['Amazon', '2'] %}
10+
syslog_ng/package/repo:
11+
pkgrepo.managed:
12+
- name: epel
13+
- humanname: Extra Packages for Enterprise Linux 7 - $basearch
14+
- mirrorlist: https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
15+
- enabled: 1
16+
- gpgcheck: 1
17+
- gpgkey: https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
18+
- failovermethod: priority
19+
- require_in:
20+
- pkg: syslog_ng/package/install
21+
{%- endif %}
22+
823
syslog_ng/package/install:
924
pkg.installed:
1025
- name: {{ syslog_ng.package }}

0 commit comments

Comments
 (0)