Refactor icinga2 config into roles
This commit is contained in:
parent
f2cd2d6250
commit
1af655b390
88
ANSIBLE/roles/icinga2/tasks/icinga2-templates.yml
Normal file
88
ANSIBLE/roles/icinga2/tasks/icinga2-templates.yml
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
---
|
||||||
|
- name: Template app.conf
|
||||||
|
template:
|
||||||
|
src: etc/icinga2/conf.d/app.conf.j2
|
||||||
|
dest: /etc/icinga2/conf.d/app.conf
|
||||||
|
owner: nagios
|
||||||
|
group: nagios
|
||||||
|
mode: '0644'
|
||||||
|
notify: Restart Icinga2
|
||||||
|
- name: Template apt.conf
|
||||||
|
template:
|
||||||
|
src: etc/icinga2/conf.d/apt.conf.j2
|
||||||
|
dest: /etc/icinga2/conf.d/apt.conf
|
||||||
|
owner: nagios
|
||||||
|
group: nagios
|
||||||
|
mode: '0644'
|
||||||
|
notify: Restart Icinga2
|
||||||
|
- name: Template commands.conf
|
||||||
|
template:
|
||||||
|
src: etc/icinga2/conf.d/commands.conf.j2
|
||||||
|
dest: /etc/icinga2/conf.d/commands.conf
|
||||||
|
owner: nagios
|
||||||
|
group: nagios
|
||||||
|
mode: '0644'
|
||||||
|
notify: Restart Icinga2
|
||||||
|
- name: Template downtimes.conf
|
||||||
|
template:
|
||||||
|
src: etc/icinga2/conf.d/downtimes.conf.j2
|
||||||
|
dest: /etc/icinga2/conf.d/downtimes.conf
|
||||||
|
owner: nagios
|
||||||
|
group: nagios
|
||||||
|
mode: '0644'
|
||||||
|
notify: Restart Icinga2
|
||||||
|
- name: Template groups.conf
|
||||||
|
template:
|
||||||
|
src: etc/icinga2/conf.d/groups.conf.j2
|
||||||
|
dest: /etc/icinga2/conf.d/groups.conf
|
||||||
|
owner: nagios
|
||||||
|
group: nagios
|
||||||
|
mode: '0644'
|
||||||
|
notify: Restart Icinga2
|
||||||
|
- name: Template hosts.conf
|
||||||
|
template:
|
||||||
|
src: etc/icinga2/conf.d/hosts.conf.j2
|
||||||
|
dest: /etc/icinga2/conf.d/hosts.conf
|
||||||
|
owner: nagios
|
||||||
|
group: nagios
|
||||||
|
mode: '0644'
|
||||||
|
notify: Restart Icinga2
|
||||||
|
- name: Template notifications.conf
|
||||||
|
template:
|
||||||
|
src: etc/icinga2/conf.d/notifications.conf.j2
|
||||||
|
dest: /etc/icinga2/conf.d/notifications.conf
|
||||||
|
group: nagios
|
||||||
|
mode: '0644'
|
||||||
|
notify: Restart Icinga2
|
||||||
|
- name: Template services.conf
|
||||||
|
template:
|
||||||
|
src: etc/icinga2/conf.d/services.conf.j2
|
||||||
|
dest: /etc/icinga2/conf.d/services.conf
|
||||||
|
owner: nagios
|
||||||
|
group: nagios
|
||||||
|
mode: '0644'
|
||||||
|
notify: Restart Icinga2
|
||||||
|
- name: Template templates.conf
|
||||||
|
template:
|
||||||
|
src: etc/icinga2/conf.d/templates.conf.j2
|
||||||
|
dest: /etc/icinga2/conf.d/templates.conf
|
||||||
|
owner: nagios
|
||||||
|
group: nagios
|
||||||
|
mode: '0644'
|
||||||
|
notify: Restart Icinga2
|
||||||
|
- name: Template timeperiods.conf
|
||||||
|
template:
|
||||||
|
src: etc/icinga2/conf.d/timeperiods.conf.j2
|
||||||
|
dest: /etc/icinga2/conf.d/timeperiods.conf
|
||||||
|
owner: nagios
|
||||||
|
group: nagios
|
||||||
|
mode: '0644'
|
||||||
|
notify: Restart Icinga2
|
||||||
|
- name: Template templates.conf
|
||||||
|
template:
|
||||||
|
src: etc/icinga2/conf.d/users.conf.j2
|
||||||
|
dest: /etc/icinga2/conf.d/users.conf
|
||||||
|
owner: nagios
|
||||||
|
group: nagios
|
||||||
|
mode: '0644'
|
||||||
|
notify: Restart Icinga2
|
@ -83,5 +83,6 @@
|
|||||||
group: root
|
group: root
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
notify: Restart Icinga2
|
notify: Restart Icinga2
|
||||||
|
|
||||||
|
|
||||||
|
- name: Setup Icinga2 Templates
|
||||||
|
include_tasks: icinga2-templates.yml
|
Loading…
x
Reference in New Issue
Block a user