1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-15 04:32:11 +00:00

Update main.yml

This commit is contained in:
A Holt 2018-10-28 14:24:53 -04:00 committed by GitHub
parent e774c31b39
commit c294dd2b97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,29 +1,27 @@
- name: Install Munin package (debuntu) - name: Install 5 package for Munin (debuntu)
package: package:
name: "{{ item }}" name:
- munin
- munin-node
- munin-plugins-extra
- libcgi-fast-perl
- libapache2-mod-fcgid
state: present state: present
with_items:
- munin
- munin-node
- munin-plugins-extra
- libcgi-fast-perl
- libapache2-mod-fcgid
tags: tags:
- download - download
when: is_debuntu when: is_debuntu
- name: Install Munin package (OS's other than debuntu) - name: Install packages munin and munin-node (OS's other than debuntu)
package: package:
name: "{{ item }}" name:
- munin
- munin-node
state: present state: present
with_items:
- munin
- munin-node
tags: tags:
- download - download
when: not is_debuntu when: not is_debuntu
- name: Copy Munin config file - name: Install /etc/munin/munin.conf and Apache's munin24.conf, from templates
template: template:
src: "{{ item.src }}" src: "{{ item.src }}"
dest: "{{ item.dest }}" dest: "{{ item.dest }}"
@ -34,7 +32,7 @@
- { src: 'munin.conf.j2', dest: '/etc/munin/munin.conf' } - { src: 'munin.conf.j2', dest: '/etc/munin/munin.conf' }
- { src: 'munin24.conf.j2', dest: '/etc/{{ apache_config_dir }}/munin24.conf' } - { src: 'munin24.conf.j2', dest: '/etc/{{ apache_config_dir }}/munin24.conf' }
- name: Create admin user - name: Establish username/password Admin/changeme in /etc/munin/munin-htpasswd
htpasswd: htpasswd:
path: /etc/munin/munin-htpasswd path: /etc/munin/munin-htpasswd
name: Admin name: Admin
@ -49,21 +47,20 @@
state: started state: started
when: munin_enabled when: munin_enabled
- name: Enable Apache lookup (debuntu) - name: Create symlink munin24.conf from sites-enabled to sites-available (debuntu)
file: file:
src: /etc/apache2/sites-available/munin24.conf src: /etc/apache2/sites-available/munin24.conf
dest: /etc/apache2/sites-enabled/munin24.conf path: /etc/apache2/sites-enabled/munin24.conf
state: link state: link
when: munin_enabled and is_debuntu when: munin_enabled and is_debuntu
- name: Disable Apache lookup (debuntu) - name: Remove symlink munin24.conf in sites-enabled if not munin_enabled (debuntu)
file: file:
src: /etc/apache2/sites-available/munin24.conf path: /etc/apache2/sites-enabled/munin24.conf
dest: /etc/apache2/sites-enabled/munin24.conf
state: absent state: absent
when: not munin_enabled and is_debuntu when: not munin_enabled and is_debuntu
- name: Disable munin-node service when it becomes disabled - name: Disable munin-node service if not munin_enabled
service: service:
name: munin-node name: munin-node
enabled: no enabled: no