111 lines
2.6 KiB
Text
111 lines
2.6 KiB
Text
{% set states = salt['cp.list_states'](saltenv) %}
|
|
icinga2:
|
|
pkg.installed
|
|
icingaweb2:
|
|
pkg.installed
|
|
icinga-php:
|
|
pkg.installed:
|
|
- name: php
|
|
icinga-php-fpm:
|
|
pkg.installed:
|
|
- name: php-fpm
|
|
service.running:
|
|
- name: php-fpm
|
|
- enable: true
|
|
- watch:
|
|
- file: /etc/php/php.ini
|
|
icinga-php-xsl:
|
|
pkg.installed:
|
|
- name: php-xsl
|
|
icinga-mysql-client:
|
|
pkg.installed:
|
|
- name: mariadb-clients
|
|
|
|
/etc/nginx/conf.d/icinga-local.conf:
|
|
file.managed:
|
|
- source: salt://roles/maintain/icinga/nginx.conf
|
|
- user: root
|
|
- group: root
|
|
- mode: 644
|
|
- makedirs: true
|
|
/etc/php/php.ini:
|
|
file.managed:
|
|
- source: salt://roles/maintain/icinga/php.ini
|
|
- user: root
|
|
- group: root
|
|
- mode: 644
|
|
/etc/icinga2/features-available/ido-mysql.conf:
|
|
file.managed:
|
|
- source: salt://roles/maintain/icinga/ido-mysql.conf
|
|
- user: icinga
|
|
- group: icinga
|
|
- mode: 644
|
|
- template: jinja
|
|
/etc/icinga2/conf.d/api-users.conf:
|
|
file.managed:
|
|
- source: salt://roles/maintain/icinga/api-users.conf
|
|
- user: icinga
|
|
- group: icinga
|
|
- mode: 644
|
|
- template: jinja
|
|
|
|
/etc/icinga2/features-enabled/ido-mysql.conf:
|
|
file.symlink:
|
|
- target: /etc/icinga2/features-available/ido-mysql.conf
|
|
|
|
|
|
/etc/icinga2/server_roles/:
|
|
file.recurse:
|
|
- source: salt://pillars/servers/roles/server/
|
|
- user: root
|
|
- group: root
|
|
- clean: true
|
|
- makedirs: true
|
|
- file_mode: 600
|
|
- dir_mode: 755
|
|
|
|
/etc/icinga2/conf.d/hosts.conf:
|
|
file.managed:
|
|
- source: salt://roles/maintain/icinga/conf.d/hosts.conf
|
|
- user: icinga
|
|
- group: icinga
|
|
- mode: 640
|
|
- makedirs: true
|
|
- template: jinja
|
|
|
|
/etc/icinga2/conf.d/services/core.conf:
|
|
file.managed:
|
|
- source: salt://roles/maintain/icinga/conf.d/services/core.conf
|
|
- user: icinga
|
|
- group: icinga
|
|
- makedirs: true
|
|
- mode: 640
|
|
|
|
/etc/icinga2/conf.d/services/service.conf:
|
|
file.managed:
|
|
- source: salt://roles/maintain/icinga/conf.d/services/service.conf
|
|
- user: icinga
|
|
- group: icinga
|
|
- makedirs: true
|
|
- mode: 640
|
|
- template: jinja
|
|
- context:
|
|
services: {{ pillar['services'] }}
|
|
|
|
icinga2-service:
|
|
service.running:
|
|
- name: icinga2
|
|
- enable: true
|
|
- watch:
|
|
- file: /etc/icinga2/conf.d/*/*
|
|
|
|
|
|
#databases:
|
|
#icinga2_ido
|
|
#icinga2_web
|
|
|
|
#need to create icinga ido db and generate schema from /usr/share/icinga2-ido-mysql/schema/mysql.sql
|
|
#backup /etc/icingaweb2 - this is generated during setup in the GUI if it doesn't exist
|
|
|
|
#limit php open_basedir to icinga stuff - should be done for *all* php based web uis
|
|
#will want ldap php module eventually
|