initial state for zabbix server

This commit is contained in:
Paul 2020-09-27 22:16:06 +02:00
parent 778ebe13b2
commit 69f31c5316
7 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,7 @@
---
{%- from "zabbix_server/map.jinja" import zabbix_server with context %}
zabbix_server-config:
file.managed:
- name: /etc/zabbix/zabbix_server.conf
- source: salt://zabbix_server/templates/zabbix_server.conf.j2
- template: jinja

View File

@ -0,0 +1,10 @@
---
zabbix_Ãserver:
pkgs:
- zabbix-frontend-php
- zabbix-server-pgsql
config:
DBHost: zabbix
DBName: zabbix
DBUser: zabbix
DBPassword: zabbix

View File

@ -0,0 +1,7 @@
---
include:
- postgresql
- php
- .install
- .config
- .service

View File

@ -0,0 +1,6 @@
---
{%- from "zabbix_server/map.jinja" import zabbix_server with context %}
zabbix_server_pkgs:
pkg.latest:
- pkgs: {{ zabbix_server.pkgs }}

View File

@ -0,0 +1,5 @@
{%- import_yaml "zabbix_server/defaults.yaml" as default_settings -%}
{%- set defaults = salt['grains.filter_by'](default_settings, default='zabbix_server') -%}
{%- set zabbix_server = salt['pillar.get']('zabbix_server', default=defaults, merge=True) -%}

View File

@ -0,0 +1,6 @@
---
{%- from "zabbix_server/map.jinja" import zabbix_server with context %}
zabbix_server-service:
service.running:
- name: zabbix-server
- enabled: true

View File

@ -0,0 +1,4 @@
{%- from "zabbix_server/map.jinja" import zabbix_server with context %}
{% for k, v in zabbix_server.config.items() %}
{{ k }}={{ v }}
{% endfor %}