Skip to content

Commit ae1e0a3

Browse files
committed
Merge pull request #6 from genuss/additional_packages
Add possibility to install additional packages
2 parents 41080f7 + ae8b1d4 commit ae1e0a3

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

README.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,8 @@ Install the ``sylog-ng`` package.
2626
Install and configure the ``syslog-ng`` package.
2727

2828
note: if the first character of a string is '=' the string is treated as a literal (not ecapsulated in quotes)
29+
30+
``syslog_ng.packages``
31+
-----------
32+
33+
Install optional packages which may provide additional functionality.

syslog_ng/packages.sls

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{% from "syslog_ng/map.jinja" import syslog_ng with context %}
2+
3+
4+
include:
5+
- syslog_ng
6+
7+
{%- if syslog_ng.packages is defined and syslog_ng.packages %}
8+
syslog_ng_packages:
9+
pkg.installed:
10+
- pkgs:
11+
{%- for pkg in syslog_ng.packages %}
12+
- {{ pkg.name }}{% if pkg.version is defined and pkg.version %}: '{{ pkg.version }}' {% endif %}
13+
{%- endfor %}
14+
- watch_in:
15+
- service: syslog_ng
16+
{%- endif %}

0 commit comments

Comments
 (0)