Skip to content

Commit 8a64e57

Browse files
add deployment of monitoring and statistic tools
1 parent bffe7a3 commit 8a64e57

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,15 @@ ansible-playbook tests/standalone.yml -i tests/inventory --vault-password-file .
5151
If you need a two-nodes multimaster example, give a look at `tests/multimaster1.yml` and `tests/multimaster2.yml`
5252

5353

54+
Give a look to `tests/monitoring.yml` for an example of playbook that deploys LTB monitoring and statistics tools
55+
56+
Run the corresponding task with:
57+
58+
```
59+
ansible-playbook tests/monitoring.yml -i tests/inventory
60+
```
61+
62+
5463
License
5564
-------
5665

tasks/monitoring.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
# tasks file for deploying monitoring tools
3+
4+
- name: Download Nagios plugins
5+
get_url:
6+
url: "{{ ltb_base_url }}{{ ltb_nagios_archive_name }}"
7+
dest: "{{ ltb_dest_path }}"
8+
mode: '0644'
9+
10+
- name: Download Cacti plugins
11+
get_url:
12+
url: "{{ ltb_base_url }}{{ ltb_cacti_archive_name }}"
13+
dest: "{{ ltb_dest_path }}"
14+
mode: '0644'
15+
16+
- name: extract Nagios archive
17+
ansible.builtin.unarchive:
18+
src: "{{ ltb_dest_path }}/{{ ltb_nagios_archive_name }}"
19+
dest: "{{ ltb_dest_path }}"
20+
21+
- name: extract Cacti archive
22+
ansible.builtin.unarchive:
23+
src: "{{ ltb_dest_path }}/{{ ltb_cacti_archive_name }}"
24+
dest: "{{ ltb_dest_path }}"

tests/monitoring.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
########################################################################################################
2+
# example of playbook for deploying monitoring and statistics tools from LTB
3+
########################################################################################################
4+
---
5+
- hosts: localhost
6+
remote_user: root
7+
vars:
8+
# destination path where to put monitoring and statistics tools
9+
ltb_dest_path: "/usr/local/openldap/etc/openldap/"
10+
ltb_base_url: "https://ltb-project.org/archives/"
11+
ltb_nagios_archive_name: "ltb-project-nagios-plugins-0.8.tar.gz"
12+
ltb_cacti_archive_name: "ltb-project-cacti-plugins-0.3.tar.gz"
13+
tasks:
14+
- name: deploying monitoring and statistics tools from LTB (load tasks/monitoring.yml)
15+
include_role:
16+
name: ansible-role-ldaptoolbox-openldap
17+
tasks_from: monitoring

0 commit comments

Comments
 (0)