initial state for zabbix server
This commit is contained in:
parent
778ebe13b2
commit
69f31c5316
7
states/zabbix_server/config.sls
Normal file
7
states/zabbix_server/config.sls
Normal 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
|
10
states/zabbix_server/defaults.yaml
Normal file
10
states/zabbix_server/defaults.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
zabbix_Ãserver:
|
||||||
|
pkgs:
|
||||||
|
- zabbix-frontend-php
|
||||||
|
- zabbix-server-pgsql
|
||||||
|
config:
|
||||||
|
DBHost: zabbix
|
||||||
|
DBName: zabbix
|
||||||
|
DBUser: zabbix
|
||||||
|
DBPassword: zabbix
|
7
states/zabbix_server/init.sls
Normal file
7
states/zabbix_server/init.sls
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
include:
|
||||||
|
- postgresql
|
||||||
|
- php
|
||||||
|
- .install
|
||||||
|
- .config
|
||||||
|
- .service
|
6
states/zabbix_server/install.sls
Normal file
6
states/zabbix_server/install.sls
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
{%- from "zabbix_server/map.jinja" import zabbix_server with context %}
|
||||||
|
|
||||||
|
zabbix_server_pkgs:
|
||||||
|
pkg.latest:
|
||||||
|
- pkgs: {{ zabbix_server.pkgs }}
|
5
states/zabbix_server/map.jinja
Normal file
5
states/zabbix_server/map.jinja
Normal 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) -%}
|
6
states/zabbix_server/service.sls
Normal file
6
states/zabbix_server/service.sls
Normal 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
|
4
states/zabbix_server/templates/zabbix_server.conf.j2
Normal file
4
states/zabbix_server/templates/zabbix_server.conf.j2
Normal 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 %}
|
Loading…
Reference in New Issue
Block a user