1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- #
- # Icingaweb2
- #
- {% set roles = salt['pillar.get']('nodes:' ~ grains.id ~ ':roles', []) %}
- {% set icingaweb2_config = salt['pillar.get']('monitoring:icingaweb2') %}
- include:
- - apt
- - sudo
- - needrestart
- - icinga2
- # Install icingaweb2 package
- icingaweb2-pkgs:
- pkg.installed:
- - pkgs:
- - icingaweb2
- - icingaweb2-module-monitoring
- - icinga2-ido-mysql
- - require:
- - file: /etc/apt/sources.list.d/icinga.list
- # Install monitoring module configs
- monitoring-module:
- file.recurse:
- - name: /etc/icingaweb2/modules/monitoring/
- - source: salt://icingaweb2/modules/monitoring/
- - file_mode: 660
- - dir_mode: 2770
- - user: www-data
- - group: icingaweb2
- /etc/icingaweb2/authentication.ini:
- file.managed:
- - source: salt://icingaweb2/authentication.ini.tmpl
- - mode: 660
- - user: www-data
- - group: icingaweb2
- - template: jinja
- - context:
- icingaweb2_config: {{ icingaweb2_config }}
- - require:
- - pkg: icingaweb2-pkgs
- /etc/icingaweb2/roles.ini:
- file.managed:
- - source: salt://icingaweb2/roles.ini.tmpl
- - mode: 660
- - user: www-data
- - group: icingaweb2
- - template: jinja
- - context:
- icingaweb2_config: {{ icingaweb2_config }}
- - require:
- - pkg: icingaweb2-pkgs
- /etc/icingaweb2/groups.ini:
- file.managed:
- - source: salt://icingaweb2/groups.ini.tmpl
- - mode: 660
- - user: www-data
- - group: icingaweb2
- - template: jinja
- - context:
- icingaweb2_config: {{ icingaweb2_config }}
- - require:
- - pkg: icingaweb2-pkgs
- /etc/icingaweb2/resources.ini:
- file.managed:
- - source: salt://icingaweb2/resources.ini.tmpl
- - mode: 660
- - user: www-data
- - group: icingaweb2
- - template: jinja
- - context:
- icingaweb2_config: {{ icingaweb2_config }}
- - require:
- - pkg: icingaweb2-pkgs
- /etc/icingaweb2/navigation/menu.ini:
- file.managed:
- - source: salt://icingaweb2/menu.ini.tmpl
- - mode: 660
- - user: www-data
- - group: icingaweb2
- - template: jinja
- - context:
- icingaweb2_config: {{ icingaweb2_config }}
- - require:
- - pkg: icingaweb2-pkgs
|