Update icinga2 server role
This commit is contained in:
parent
c10b6ab95c
commit
9fc4b7d682
|
@ -91,3 +91,6 @@ icinga2_server_ticket_salt: ""
|
||||||
icinga2_server_custom_hostgroup: wirebrass
|
icinga2_server_custom_hostgroup: wirebrass
|
||||||
|
|
||||||
icinga2_server_nagios_plugins_location: "/usr/lib/nagios/plugins/"
|
icinga2_server_nagios_plugins_location: "/usr/lib/nagios/plugins/"
|
||||||
|
icinga2_server_icinga_ssh_pubkey: ""
|
||||||
|
icinga2_server_icinga_ssh_privkey: ""
|
||||||
|
|
||||||
|
|
|
@ -38,3 +38,52 @@
|
||||||
- check_rdns
|
- check_rdns
|
||||||
notify: restart icinga2
|
notify: restart icinga2
|
||||||
|
|
||||||
|
- name: Nagios SSH folder created
|
||||||
|
file:
|
||||||
|
path: "/home/{{ icinga2_server_user }}/.ssh"
|
||||||
|
state: directory
|
||||||
|
owner: "{{ icinga2_server_user }}"
|
||||||
|
group: "{{ icinga2_server_group }}"
|
||||||
|
mode: '0755'
|
||||||
|
|
||||||
|
- name: Private key to access supervised servers
|
||||||
|
copy:
|
||||||
|
dest: "/home/{{ icinga2_server_user }}/.ssh/id_rsa"
|
||||||
|
owner: "{{ icinga2_server_user }}"
|
||||||
|
group: "{{ icinga2_server_group }}"
|
||||||
|
mode: '0600'
|
||||||
|
content: "{{ icinga2_server_icinga_ssh_privkey }}"
|
||||||
|
no_log: True
|
||||||
|
|
||||||
|
- name: Public key to access supervised servers
|
||||||
|
copy:
|
||||||
|
dest: "/home/{{ icinga2_server_user }}/.ssh/id_rsa.pub"
|
||||||
|
owner: "{{ icinga2_server_user }}"
|
||||||
|
group: "{{ icinga2_server_group }}"
|
||||||
|
mode: '0644'
|
||||||
|
content: "{{ icinga2_server_icinga_ssh_pubkey + '\n' }}"
|
||||||
|
|
||||||
|
- name: Icinga2 config hosts folder created
|
||||||
|
file:
|
||||||
|
path: "/etc/icinga2/conf.d/hosts"
|
||||||
|
state: directory
|
||||||
|
owner: "{{ icinga2_server_user }}"
|
||||||
|
group: "{{ icinga2_server_group }}"
|
||||||
|
mode: '0755'
|
||||||
|
|
||||||
|
- name: Python DNS module server installed
|
||||||
|
package:
|
||||||
|
name: "python-dns"
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Python dnspython module server installed
|
||||||
|
package:
|
||||||
|
name: "python-dnspython"
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Icingaweb2 monitoring module folder permissions configured
|
||||||
|
file:
|
||||||
|
path: "/usr/share/icingaweb2/modules/monitoring"
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ object CheckCommand "by_ssh_wirebrass" {
|
||||||
|
|
||||||
vars.by_ssh_custom_plugins_path = "{{ icinga2_server_nagios_plugins_location }}"
|
vars.by_ssh_custom_plugins_path = "{{ icinga2_server_nagios_plugins_location }}"
|
||||||
vars.by_ssh_logname = "nagios"
|
vars.by_ssh_logname = "nagios"
|
||||||
vars.by_ssh_identity = "/var/lib/icinga2/.ssh/id_rsa"
|
vars.by_ssh_identity = "/home/nagios/.ssh/id_rsa"
|
||||||
vars.by_ssh_options = [ "ControlMaster=auto","ControlPath=/var/run/icinga2/$host.name$","ControlPersist=10m"]
|
vars.by_ssh_options = [ "ControlMaster=auto","ControlPath=/var/run/icinga2/$host.name$","ControlPersist=10m"]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -259,13 +259,13 @@ apply Service "procs" {
|
||||||
assign where host.name == NodeName
|
assign where host.name == NodeName
|
||||||
}
|
}
|
||||||
|
|
||||||
apply Service "swap" {
|
#apply Service "swap" {
|
||||||
import "generic-service"
|
# import "generic-service"
|
||||||
|
#
|
||||||
check_command = "swap"
|
# check_command = "swap"
|
||||||
|
#
|
||||||
assign where host.name == NodeName
|
# assign where host.name == NodeName
|
||||||
}
|
#}
|
||||||
|
|
||||||
apply Service "users" {
|
apply Service "users" {
|
||||||
import "generic-service"
|
import "generic-service"
|
||||||
|
|
Loading…
Reference in a new issue