Skip to content

Commit

Permalink
add deployment of monitoring and statistic tools
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcoutadeur committed Feb 9, 2022
1 parent bffe7a3 commit 8a64e57
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ ansible-playbook tests/standalone.yml -i tests/inventory --vault-password-file .
If you need a two-nodes multimaster example, give a look at `tests/multimaster1.yml` and `tests/multimaster2.yml`


Give a look to `tests/monitoring.yml` for an example of playbook that deploys LTB monitoring and statistics tools

Run the corresponding task with:

```
ansible-playbook tests/monitoring.yml -i tests/inventory
```


License
-------

Expand Down
24 changes: 24 additions & 0 deletions tasks/monitoring.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
# tasks file for deploying monitoring tools

- name: Download Nagios plugins
get_url:
url: "{{ ltb_base_url }}{{ ltb_nagios_archive_name }}"
dest: "{{ ltb_dest_path }}"
mode: '0644'

- name: Download Cacti plugins
get_url:
url: "{{ ltb_base_url }}{{ ltb_cacti_archive_name }}"
dest: "{{ ltb_dest_path }}"
mode: '0644'

- name: extract Nagios archive
ansible.builtin.unarchive:
src: "{{ ltb_dest_path }}/{{ ltb_nagios_archive_name }}"
dest: "{{ ltb_dest_path }}"

- name: extract Cacti archive
ansible.builtin.unarchive:
src: "{{ ltb_dest_path }}/{{ ltb_cacti_archive_name }}"
dest: "{{ ltb_dest_path }}"
17 changes: 17 additions & 0 deletions tests/monitoring.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
########################################################################################################
# example of playbook for deploying monitoring and statistics tools from LTB
########################################################################################################
---
- hosts: localhost
remote_user: root
vars:
# destination path where to put monitoring and statistics tools
ltb_dest_path: "/usr/local/openldap/etc/openldap/"
ltb_base_url: "https://ltb-project.org/archives/"
ltb_nagios_archive_name: "ltb-project-nagios-plugins-0.8.tar.gz"
ltb_cacti_archive_name: "ltb-project-cacti-plugins-0.3.tar.gz"
tasks:
- name: deploying monitoring and statistics tools from LTB (load tasks/monitoring.yml)
include_role:
name: ansible-role-ldaptoolbox-openldap
tasks_from: monitoring

0 comments on commit 8a64e57

Please sign in to comment.