Update Munin server role and all related resources
This commit is contained in:
parent
d1296fb250
commit
a77c779a84
|
@ -7,9 +7,9 @@ vault_public_key_<USER>: |
|
||||||
vault_munin_admin_user: munin
|
vault_munin_admin_user: munin
|
||||||
vault_munin_admin_password: munin
|
vault_munin_admin_password: munin
|
||||||
|
|
||||||
vault_private_key_munin_async_user_host: |
|
vault_private_key_munin_user_host: |
|
||||||
SSH_PRIV_KEY_OF_munin_async_user_USER_ON_USER_HOST
|
SSH_PRIV_KEY_OF_munin_user_USER_ON_USER_HOST
|
||||||
vault_public_key_munin_async_user_host: SSH_PUB_KEY_OF_munin_async_user_USER_ON_USER_HOST
|
vault_public_key_munin_user_host: SSH_PUB_KEY_OF_munin_user_USER_ON_USER_HOST
|
||||||
|
|
||||||
vault_private_key_backup_user_host: |
|
vault_private_key_backup_user_host: |
|
||||||
SSH_PRIV_KEY_OF_backup_user_USER_ON_USER_HOST
|
SSH_PRIV_KEY_OF_backup_user_USER_ON_USER_HOST
|
||||||
|
|
|
@ -9,8 +9,8 @@ munin_hosts:
|
||||||
munin_admin_user: "{{ vault_munin_admin_user }}"
|
munin_admin_user: "{{ vault_munin_admin_user }}"
|
||||||
munin_admin_password: "{{ vault_munin_admin_password }}"
|
munin_admin_password: "{{ vault_munin_admin_password }}"
|
||||||
|
|
||||||
private_key_munin_async_user_host: "{{ vault_private_key_munin_async_user_host }}"
|
private_key_munin_user_host: "{{ vault_private_key_munin_async_user_host }}"
|
||||||
public_key_munin_async_user_host: "{{ vault_public_key_munin_async_user_host }}"
|
public_key_munin__user_host: "{{ vault_public_key_munin_async_user_host }}"
|
||||||
|
|
||||||
munin_alerts: []
|
munin_alerts: []
|
||||||
|
|
||||||
|
|
|
@ -2,4 +2,6 @@
|
||||||
- hosts: munin_server
|
- hosts: munin_server
|
||||||
roles:
|
roles:
|
||||||
- geerlingguy.munin
|
- geerlingguy.munin
|
||||||
- munin_async_server
|
- munin_server
|
||||||
|
- geerlingguy.certbot
|
||||||
|
- geerlingguy.nginx
|
||||||
|
|
|
@ -1,44 +0,0 @@
|
||||||
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.
|
|
|
@ -1,11 +0,0 @@
|
||||||
---
|
|
||||||
# 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: ""
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
---
|
|
||||||
# Main tasks file for munin_async_server
|
|
||||||
|
|
||||||
- import_tasks: package.yml
|
|
||||||
- import_tasks: user.yml
|
|
||||||
- import_tasks: service.yml
|
|
|
@ -1,5 +0,0 @@
|
||||||
---
|
|
||||||
- name: Munin async installed
|
|
||||||
package:
|
|
||||||
name: "{{ munin_async_package }}"
|
|
||||||
state: present
|
|
|
@ -1,6 +0,0 @@
|
||||||
---
|
|
||||||
- name: Munin async enabled
|
|
||||||
service:
|
|
||||||
name: "{{ munin_async_service_name }}"
|
|
||||||
state: started
|
|
||||||
enabled: yes
|
|
|
@ -1,20 +0,0 @@
|
||||||
---
|
|
||||||
- name: Create SSH directory for munin-async user
|
|
||||||
file:
|
|
||||||
path: /var/spool/munin-async/.ssh
|
|
||||||
state: directory
|
|
||||||
mode: '0755'
|
|
||||||
- name: Deploy private key to access other Munin async node
|
|
||||||
copy:
|
|
||||||
dest: /var/spool/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: /var/spool/munin-async/.ssh/id_rsa.pub
|
|
||||||
owner: munin-async
|
|
||||||
group: munin-async
|
|
||||||
mode: '0644'
|
|
||||||
content: "{{ public_key_munin_async_user_host + '\n' }}"
|
|
48
roles/munin_server/README.md
Normal file
48
roles/munin_server/README.md
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
Ansible Role: munin server
|
||||||
|
=========
|
||||||
|
|
||||||
|
This role set up Munin 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` :
|
||||||
|
|
||||||
|
# Private/Public SSH keys of Munin server to access all Munin async client account
|
||||||
|
private_key_munin_user_host: ""
|
||||||
|
public_key_munin_user_host: ""
|
||||||
|
|
||||||
|
# Munin user and group
|
||||||
|
munin_user: "munin"
|
||||||
|
munin_group: "munin"
|
||||||
|
|
||||||
|
# Munin user home directory
|
||||||
|
munin_home_directory: "/var/lib/munin"
|
||||||
|
|
||||||
|
|
||||||
|
Dependencies
|
||||||
|
------------
|
||||||
|
|
||||||
|
None.
|
||||||
|
|
||||||
|
Example Playbook
|
||||||
|
----------------
|
||||||
|
|
||||||
|
- hosts: munin_server
|
||||||
|
roles:
|
||||||
|
- munin_server
|
||||||
|
|
||||||
|
License
|
||||||
|
-------
|
||||||
|
|
||||||
|
BSD
|
||||||
|
|
||||||
|
Author Information
|
||||||
|
------------------
|
||||||
|
|
||||||
|
This role was created in 2020 by Nemo.
|
13
roles/munin_server/defaults/main.yml
Normal file
13
roles/munin_server/defaults/main.yml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
---
|
||||||
|
# defaults file for munin_async_server
|
||||||
|
|
||||||
|
# Private/Public SSH keys of Munin async server to access all Munin async client account
|
||||||
|
private_key_munin_user_host: ""
|
||||||
|
public_key_munin_user_host: ""
|
||||||
|
|
||||||
|
# Munin user and group
|
||||||
|
munin_user: "munin"
|
||||||
|
munin_group: "munin"
|
||||||
|
|
||||||
|
# Munin user home directory
|
||||||
|
munin_home_directory: "/var/lib/munin"
|
|
@ -1,6 +1,6 @@
|
||||||
galaxy_info:
|
galaxy_info:
|
||||||
author: nemo
|
author: nemo
|
||||||
description: Set up Munin async server for GNU/Linux.
|
description: Set up Munin server for GNU/Linux.
|
||||||
company: Wirebrass
|
company: Wirebrass
|
||||||
|
|
||||||
license: license (BSD)
|
license: license (BSD)
|
||||||
|
@ -18,7 +18,6 @@ galaxy_info:
|
||||||
|
|
||||||
galaxy_tags:
|
galaxy_tags:
|
||||||
- munin
|
- munin
|
||||||
- munin-async
|
|
||||||
- system
|
- system
|
||||||
- server
|
- server
|
||||||
- auto
|
- auto
|
4
roles/munin_server/tasks/main.yml
Normal file
4
roles/munin_server/tasks/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
# Main tasks file for munin_server
|
||||||
|
|
||||||
|
import_tasks: user.yml
|
22
roles/munin_server/tasks/user.yml
Normal file
22
roles/munin_server/tasks/user.yml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
---
|
||||||
|
- name: Create SSH directory for Munin user
|
||||||
|
file:
|
||||||
|
path: "{{ /var/lib/munin }}"/.ssh
|
||||||
|
state: directory
|
||||||
|
owner: "{{ munin_user }}"
|
||||||
|
group: "{{ munin_user }}"
|
||||||
|
mode: '0700'
|
||||||
|
- name: Deploy private key to access other Munin node
|
||||||
|
copy:
|
||||||
|
dest: "{{ /var/lib/munin }}"/.ssh/id_rsa
|
||||||
|
owner: "{{ munin_user }}"
|
||||||
|
group: "{{ munin_user }}"
|
||||||
|
mode: '0600'
|
||||||
|
content: "{{ private_key_munin_async_user_host }}"
|
||||||
|
- name: Deploy public key to access other Munin node
|
||||||
|
copy:
|
||||||
|
dest: "{{ /var/lib/munin }}"/.ssh/id_rsa.pub
|
||||||
|
owner: "{{ munin_user }}"
|
||||||
|
group: "{{ munin_user }}"
|
||||||
|
mode: '0644'
|
||||||
|
content: "{{ public_key_munin_async_user_host + '\n' }}"
|
Loading…
Reference in a new issue