Fixes #4: Clean up role / coding standards, etc.
parent
9ab3a65c0d
commit
6ba30a9f6c
|
|
@ -69,7 +69,7 @@ None.
|
||||||
|
|
||||||
- hosts: servers
|
- hosts: servers
|
||||||
roles:
|
roles:
|
||||||
- { role: geerlingguy.munin }
|
- geerlingguy.munin
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
---
|
|
||||||
# TODO
|
|
||||||
|
|
@ -3,7 +3,7 @@ dependencies: []
|
||||||
|
|
||||||
galaxy_info:
|
galaxy_info:
|
||||||
author: geerlingguy
|
author: geerlingguy
|
||||||
description: Munin monitoring server for RedHat/CentOS.
|
description: Munin monitoring server for RedHat/CentOS or Debian/Ubuntu.
|
||||||
company: "Midwestern Mac, LLC"
|
company: "Midwestern Mac, LLC"
|
||||||
license: "license (BSD, MIT)"
|
license: "license (BSD, MIT)"
|
||||||
min_ansible_version: 1.4
|
min_ansible_version: 1.4
|
||||||
|
|
@ -11,6 +11,12 @@ galaxy_info:
|
||||||
- name: EL
|
- name: EL
|
||||||
versions:
|
versions:
|
||||||
- all
|
- all
|
||||||
|
- name: Debian
|
||||||
|
versions:
|
||||||
|
- all
|
||||||
|
- name: Ubuntu
|
||||||
|
versions:
|
||||||
|
- all
|
||||||
categories:
|
categories:
|
||||||
- monitoring
|
- monitoring
|
||||||
- system
|
- system
|
||||||
|
|
|
||||||
|
|
@ -3,31 +3,35 @@
|
||||||
include_vars: "{{ ansible_os_family }}.yml"
|
include_vars: "{{ ansible_os_family }}.yml"
|
||||||
|
|
||||||
- name: Install required packages for munin (RedHat).
|
- name: Install required packages for munin (RedHat).
|
||||||
yum: "pkg={{ item }} state=installed"
|
yum: "name={{ item }} state=present"
|
||||||
with_items: munin_packages
|
with_items: munin_packages
|
||||||
when: ansible_os_family == 'RedHat'
|
when: ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
- name: Install required packages for munin (Debian).
|
- name: Install required packages for munin (Debian).
|
||||||
apt: "pkg={{ item }} state=installed"
|
apt: "name={{ item }} state=present"
|
||||||
with_items: munin_packages
|
with_items: munin_packages
|
||||||
when: ansible_os_family == 'Debian'
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
- name: Copy munin configurations.
|
- name: Copy munin configurations.
|
||||||
template: >
|
template:
|
||||||
src={{ item.src }}
|
src: "{{ item.src }}"
|
||||||
dest={{ item.dest }}
|
dest: "{{ item.dest }}"
|
||||||
owner=root group=root mode=644
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0644
|
||||||
with_items:
|
with_items:
|
||||||
- { src: munin.conf.j2, dest: /etc/munin/munin.conf }
|
- src: munin.conf.j2
|
||||||
- { src: hosts.conf.j2, dest: "{{ munin_conf_d_directory }}/hosts.conf" }
|
dest: /etc/munin/munin.conf
|
||||||
|
- src: hosts.conf.j2
|
||||||
|
dest: "{{ munin_conf_d_directory }}/hosts.conf"
|
||||||
|
|
||||||
- name: Create munin user via htpasswd.
|
- name: Create munin user via htpasswd.
|
||||||
htpasswd: >
|
htpasswd:
|
||||||
create=yes
|
create: yes
|
||||||
name={{ munin_admin_user }}
|
name: "{{ munin_admin_user }}"
|
||||||
password={{ munin_admin_password }}
|
password: "{{ munin_admin_password }}"
|
||||||
path=/etc/munin/munin-htpasswd
|
path: /etc/munin/munin-htpasswd
|
||||||
state=present
|
state: present
|
||||||
|
|
||||||
- name: Enable or disable the munin cron job.
|
- name: Enable or disable the munin cron job.
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue