Saltstack Official Syslog-NG Formula
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

install.sls 1.1KB

12345678910111213141516171819202122232425262728293031323334
  1. # -*- coding: utf-8 -*-
  2. # vim: ft=sls
  3. {#- Get the `tplroot` from `tpldir` #}
  4. {%- set tplroot = tpldir.split('/')[0] %}
  5. {%- from tplroot ~ "/map.jinja" import syslog_ng with context %}
  6. {#- Simulating `grains.osfinger`, which is avoided since not available in all distros #}
  7. {%- if [grains.os, grains.osrelease] == ['Amazon', '2'] %}
  8. syslog_ng/package/repo:
  9. pkgrepo.managed:
  10. - name: epel
  11. - humanname: Extra Packages for Enterprise Linux 7 - $basearch
  12. - mirrorlist: https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
  13. - enabled: 1
  14. - gpgcheck: 1
  15. - gpgkey: https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
  16. - failovermethod: priority
  17. - require_in:
  18. - pkg: syslog_ng/package/install
  19. {%- endif %}
  20. syslog_ng/package/install:
  21. pkg.installed:
  22. - name: {{ syslog_ng.package }}
  23. {%- if syslog_ng.packages is defined and syslog_ng.packages %}
  24. syslog_ng/packages/install:
  25. pkg.installed:
  26. - pkgs:
  27. {%- for pkg in syslog_ng.packages %}
  28. - {{ pkg.name }}{% if pkg.version is defined and pkg.version %}: '{{ pkg.version }}' {% endif %}
  29. {%- endfor %}
  30. {%- endif %}