Add Munin async server role
This commit is contained in:
parent
db893b5291
commit
0793b81000
|
@ -7,6 +7,10 @@ vault_public_key_<USER>: |
|
|||
vault_munin_admin_user: munin
|
||||
vault_munin_admin_password: munin
|
||||
|
||||
vault_private_key_munin_async_user_host: |
|
||||
SSH_PRIV_KEY_OF_munin_async_user_USER_ON_USER_HOST
|
||||
vault_public_key_munin_async_user_host: SSH_PUB_KEY_OF_munin_async_user_USER_ON_USER_HOST
|
||||
|
||||
vault_private_key_backup_user_host: |
|
||||
SSH_PRIV_KEY_OF_backup_user_USER_ON_USER_HOST
|
||||
vault_public_key_backup_user_host: SSH_PUBKEY_OF_backup_user_USER_ON_BACKUP_HOST
|
||||
|
|
|
@ -9,4 +9,7 @@ munin_hosts:
|
|||
munin_admin_user: "{{ vault_munin_admin_user }}"
|
||||
munin_admin_password: "{{ vault_munin_admin_password }}"
|
||||
|
||||
private_key_munin_async_user_host: "{{ vault_private_key_munin_async_user_host }}"
|
||||
public_key_munin_async_user_host: "{{ vault_public_key_munin_async_user_host }}"
|
||||
|
||||
munin_alerts: []
|
||||
|
|
|
@ -2,3 +2,4 @@
|
|||
- hosts: munin_server
|
||||
roles:
|
||||
- geerlingguy.munin
|
||||
- munin_async_server
|
||||
|
|
44
roles/munin_async_server/README.md
Normal file
44
roles/munin_async_server/README.md
Normal file
|
@ -0,0 +1,44 @@
|
|||
Ansible Role: munin async server
|
||||
=========
|
||||
|
||||
This role set up Munin async server for a GNU/Linux server.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
The role geerlingguy.munin needs to be deploy on the Munin server before using the current role.
|
||||
|
||||
Roll Variables
|
||||
--------------
|
||||
|
||||
All variables and default values are defined in `defaults/main.yml` :
|
||||
|
||||
# Name of the munin-async service and munin-async package (depends on your OS, can be munin-async, munin-asyncd...)
|
||||
munin_async_service_name: munin-async
|
||||
munin_async_package: munin-async
|
||||
|
||||
# Private/Public SSH keys of Munin async server to access all Munin async client account
|
||||
private_key_munin_async_user_host: ""
|
||||
public_key_munin_async_user_host: ""
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
None.
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
||||
- hosts: munin_server
|
||||
roles:
|
||||
- munin_async_server
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
BSD
|
||||
|
||||
Author Information
|
||||
------------------
|
||||
|
||||
This role was created in 2020 by Nemo.
|
11
roles/munin_async_server/defaults/main.yml
Normal file
11
roles/munin_async_server/defaults/main.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
# defaults file for munin_async_server
|
||||
|
||||
# Name of the munin-async service and munin-async package (depends on your OS, can be munin-async, munin-asyncd...)
|
||||
munin_async_service_name: munin-async
|
||||
munin_async_package: munin-async
|
||||
|
||||
# Private/Public SSH keys of Munin async server to access all Munin async client account
|
||||
private_key_munin_async_user_host: ""
|
||||
public_key_munin_async_user_host: ""
|
||||
|
26
roles/munin_async_server/meta/main.yml
Normal file
26
roles/munin_async_server/meta/main.yml
Normal file
|
@ -0,0 +1,26 @@
|
|||
galaxy_info:
|
||||
author: nemo
|
||||
description: Set up Munin async server for GNU/Linux.
|
||||
company: Wirebrass
|
||||
|
||||
license: license (BSD)
|
||||
|
||||
min_ansible_version: 2.4
|
||||
|
||||
platforms:
|
||||
- name: Debian
|
||||
versions:
|
||||
- stretch
|
||||
- buster
|
||||
- name: Gentoo
|
||||
versions:
|
||||
- all
|
||||
|
||||
galaxy_tags:
|
||||
- munin
|
||||
- munin-async
|
||||
- system
|
||||
- server
|
||||
- auto
|
||||
|
||||
dependencies: []
|
6
roles/munin_async_server/tasks/main.yml
Normal file
6
roles/munin_async_server/tasks/main.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
# Main tasks file for munin_async_server
|
||||
|
||||
- import_tasks: package.yml
|
||||
- import_tasks: user.yml
|
||||
- import_tasks: service.yml
|
5
roles/munin_async_server/tasks/package.yml
Normal file
5
roles/munin_async_server/tasks/package.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- name: Munin async installed
|
||||
package:
|
||||
name: "{{ munin_async_package }}"
|
||||
state: present
|
6
roles/munin_async_server/tasks/service.yml
Normal file
6
roles/munin_async_server/tasks/service.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
- name: Munin async enabled
|
||||
service:
|
||||
name: "{{ munin_async_service_name }}"
|
||||
state: started
|
||||
enabled: yes
|
15
roles/munin_async_server/tasks/user.yml
Normal file
15
roles/munin_async_server/tasks/user.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
- name: Deploy private key to access other Munin async node
|
||||
copy:
|
||||
dest: /home/munin-async/.ssh/id_rsa
|
||||
owner: munin-async
|
||||
group: munin-async
|
||||
mode: '0600'
|
||||
content: "{{ private_key_munin_async_user_host }}"
|
||||
- name: Deploy public key to access other Munin async node
|
||||
copy:
|
||||
dest: /home/munin-async/.ssh/id_rsa.pub
|
||||
owner: munin-async
|
||||
group: munin-async
|
||||
mode: '0644'
|
||||
content: "{{ public_key_munin_async_user_host + '\n' }}"
|
Loading…
Reference in a new issue