Feature: Copy custom plugins
Variables: - monitored_plugins_custom: list of plugins - monitored_plugins_custom_path: destination path
This commit is contained in:
parent
120bdd9048
commit
2e76f7b537
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1,5 @@
|
|||
files/plugins_custom/
|
||||
|
||||
.*.sw?
|
||||
*~
|
||||
|
||||
|
|
|
@ -13,6 +13,8 @@ monitored_packages_additional: []
|
|||
monitored_packages_additional_nrpe: []
|
||||
monitored_packages_additional_ssh: []
|
||||
|
||||
monitored_plugins_custom_path: /usr/local/plugins/
|
||||
|
||||
monitored_nrpe_server_address: null
|
||||
monitored_nrpe_port: 5666
|
||||
|
||||
|
|
0
files/plugins_custom/.PUT_YOUR_OWN_PLUGINS_HERE
Normal file
0
files/plugins_custom/.PUT_YOUR_OWN_PLUGINS_HERE
Normal file
|
@ -26,6 +26,10 @@
|
|||
include_tasks: packages.yml
|
||||
when: monitored_packages_install != False
|
||||
|
||||
- name: "INCLUDE: Copy custom plugins"
|
||||
include_tasks: plugins_custom.yml
|
||||
when: monitored_plugins_custom|default([]) != []
|
||||
|
||||
- name: "INCLUDE: Monitoring by NRPE"
|
||||
include_tasks: nrpe.yml
|
||||
when: monitored_by_nrpe == True
|
||||
|
|
11
tasks/plugins_custom.yml
Normal file
11
tasks/plugins_custom.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
- name: Copy custom plugins
|
||||
copy:
|
||||
src: "plugins_custom/{{ item }}"
|
||||
dest: "{{ monitored_plugins_custom_path }}"
|
||||
owner: root
|
||||
group: "{{ monitored_group }}"
|
||||
mode: 0750
|
||||
with_items: "{{ monitored_plugins_custom }}"
|
||||
|
||||
|
Loading…
Reference in a new issue