This website works better with JavaScript.
Home
Help
Sign In
LILiK
/
lilik_playbook
Watch
5
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
add basic lxc_guest monitoring
python3
Andrea Cimbalo
7 years ago
parent
df0e0fdf15
commit
95f93d6a5d
5 changed files
with
39 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
all.yaml
+15
-0
roles/icinga2-monitoring/tasks/main.yaml
+7
-0
roles/icinga2-monitoring/templates/host.conf.j2
+10
-0
roles/icinga2/tasks/main.yaml
+6
-0
roles/lxc_guest/tasks/main.yaml
+ 1
- 1
all.yaml
View File
@ -1,10 +1,10 @@
-
include
:
status.yaml
-
include
:
ldap.yaml
-
include
:
blogs.yaml
-
include
:
lists.yaml
-
include
:
login.yaml
-
include
:
mail.yaml
-
include
:
projects.yaml
-
include
:
status.yaml
-
include
:
users.yaml
-
include
:
webmail.yaml
-
include
:
wiki.yaml
+ 15
- 0
roles/icinga2-monitoring/tasks/main.yaml
View File
@ -0,0 +1,15 @@
-
include_role:
name
:
service
vars:
service_name
:
icinga2
-
debug:
var
:
monitoring_host
-
name
:
add host monitoring
template:
src
:
host.conf.j2
dest
:
"/etc/icinga2/conf.d/hosts/{{ item }}.conf"
with_items:
-
"{{ monitoring_host }}"
notify
:
reload icinga2
+ 7
- 0
roles/icinga2-monitoring/templates/host.conf.j2
View File
@ -0,0 +1,7 @@
object Host "{{ item }}" {
import "generic-host"
vars.os = "Linux"
vars.address = "{{ hostvars | ip_from_inventory(item) }}"
vars.sla = "24x7"
}
+ 10
- 0
roles/icinga2/tasks/main.yaml
View File
@ -90,3 +90,13 @@
owner
:
root
group
:
icingaweb2
mode
:
0640
-
name
:
create icinga2 hosts directory
file:
path
:
/home/git/{{ item }}
state
:
directory
owner
:
icinga2
group
:
icinga2
mode
:
0770
with_items:
-
/etc/icinga2/conf.d/hosts/
+ 6
- 0
roles/lxc_guest/tasks/main.yaml
View File
@ -92,3 +92,9 @@
# - container_network
# is changed by executing handlers now
-
meta
:
flush_handlers
-
name
:
add monitoring facts
set_fact:
monitoring_host
:
"{{monitoring_host| default([]) }} + [ '{{ vm_name }}' ]"
delegate_facts
:
True
delegate_to
:
status
Write
Preview
Loading…
Cancel
Save