mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 03:32:12 +00:00
Update main.yml
This commit is contained in:
parent
e774c31b39
commit
c294dd2b97
1 changed files with 18 additions and 21 deletions
|
@ -1,29 +1,27 @@
|
|||
- name: Install Munin package (debuntu)
|
||||
- name: Install 5 package for Munin (debuntu)
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
name:
|
||||
- munin
|
||||
- munin-node
|
||||
- munin-plugins-extra
|
||||
- libcgi-fast-perl
|
||||
- libapache2-mod-fcgid
|
||||
state: present
|
||||
with_items:
|
||||
- munin
|
||||
- munin-node
|
||||
- munin-plugins-extra
|
||||
- libcgi-fast-perl
|
||||
- libapache2-mod-fcgid
|
||||
tags:
|
||||
- download
|
||||
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:
|
||||
name: "{{ item }}"
|
||||
name:
|
||||
- munin
|
||||
- munin-node
|
||||
state: present
|
||||
with_items:
|
||||
- munin
|
||||
- munin-node
|
||||
tags:
|
||||
- download
|
||||
when: not is_debuntu
|
||||
|
||||
- name: Copy Munin config file
|
||||
- name: Install /etc/munin/munin.conf and Apache's munin24.conf, from templates
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
|
@ -34,7 +32,7 @@
|
|||
- { src: 'munin.conf.j2', dest: '/etc/munin/munin.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:
|
||||
path: /etc/munin/munin-htpasswd
|
||||
name: Admin
|
||||
|
@ -49,21 +47,20 @@
|
|||
state: started
|
||||
when: munin_enabled
|
||||
|
||||
- name: Enable Apache lookup (debuntu)
|
||||
- name: Create symlink munin24.conf from sites-enabled to sites-available (debuntu)
|
||||
file:
|
||||
src: /etc/apache2/sites-available/munin24.conf
|
||||
dest: /etc/apache2/sites-enabled/munin24.conf
|
||||
path: /etc/apache2/sites-enabled/munin24.conf
|
||||
state: link
|
||||
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:
|
||||
src: /etc/apache2/sites-available/munin24.conf
|
||||
dest: /etc/apache2/sites-enabled/munin24.conf
|
||||
path: /etc/apache2/sites-enabled/munin24.conf
|
||||
state: absent
|
||||
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:
|
||||
name: munin-node
|
||||
enabled: no
|
||||
|
|
Loading…
Reference in a new issue