Last active
August 29, 2015 14:01
-
-
Save viq/afbd5fe1150cf2aa6879 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
{% from "base/syslog/syslog.jinja" import syslog with context %} | |
include: | |
- base.example-ca | |
syslog-ng: | |
service: | |
- dead | |
- enable: False | |
rsyslog: | |
pkg: | |
- installed | |
- pkgs: | |
- rsyslog | |
- rsyslog-gnutls | |
service: | |
- running | |
- enable: True | |
- require: | |
- pkg: rsyslog | |
- service: syslog-ng | |
- watch: | |
- file: rsyslog | |
- sls: base.zwsa-ca | |
file.managed: | |
- name: /etc/rsyslog.conf | |
- source: | |
- salt://conf/syslog/rsyslog.conf.{{ grains['fqdn'] }} | |
- salt://conf/syslog/rsyslog.conf | |
- template: jinja | |
- context: | |
loghost: {{ syslog.loghost }} | |
- user: root | |
- group: root | |
- mode: 644 | |
- require: | |
- pkg: rsyslog |
This file contains hidden or 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
{% if salt['network.in_subnet']('11.22.33.44/16') %} | |
{% set loghost = "{{ salt['dnsutil.A']('logger1.example.com')[0] }}" %} | |
{% else %} | |
{% set loghost = "{{ salt['dnsutil.A']('logger2.example.com')[0] }}" %} | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment