|
@@ -6,22 +6,6 @@
|
|
|
action: template src=munin/munin.conf.j2 dest=/etc/munin/munin.conf owner=root group=root mode=0644
|
|
|
when_boolean: ${with_munin}
|
|
|
|
|
|
-- name: Create basic authentication file for munin web interface
|
|
|
- action: template src=munin/nginx_auth.j2 dest=${munin_http_auth_file} owner=root group=www-data mode=0640
|
|
|
- when_boolean: ${with_munin} and ${with_munin_http_auth}
|
|
|
-
|
|
|
-- name: Install munin nginx virtual host (sites-available)
|
|
|
- action: template src=munin/nginx_vhost.j2 dest=/etc/nginx/sites-available/munin owner=root group=root mode=0644
|
|
|
- notify:
|
|
|
- - Reload nginx for munin
|
|
|
- when_boolean: ${with_munin}
|
|
|
-
|
|
|
-- name: Install munin nginx virtual host (sites-enabled)
|
|
|
- action: file src=/etc/nginx/sites-available/munin path=/etc/nginx/sites-enabled/munin state=link
|
|
|
- notify:
|
|
|
- - Reload nginx for munin
|
|
|
- when_boolean: ${with_munin}
|
|
|
-
|
|
|
- name: Install munin-node packages
|
|
|
action: ${ansible_pkg_mgr} pkg=${item} state=installed update_cache=yes
|
|
|
with_items:
|
|
@@ -59,6 +43,30 @@
|
|
|
- Restart munin-node
|
|
|
when_boolean: ${with_munin_node}
|
|
|
|
|
|
+- name: Install nginx virtual host for munin (sites-available)
|
|
|
+ action: template src=munin/nginx_vhost.j2 dest=/etc/nginx/sites-available/munin owner=root group=root mode=0644
|
|
|
+ notify:
|
|
|
+ - Reload nginx for munin
|
|
|
+ when_boolean: ${with_munin} and ${with_nginx}
|
|
|
+
|
|
|
+- name: Install nginx virtual host for munin (sites-enabled)
|
|
|
+ action: file src=/etc/nginx/sites-available/munin path=/etc/nginx/sites-enabled/munin state=link
|
|
|
+ notify:
|
|
|
+ - Reload nginx for munin
|
|
|
+ when_boolean: ${with_munin} and ${with_nginx}
|
|
|
+
|
|
|
+- name: Install apache2 virtual host for munin (sites-available)
|
|
|
+ action: template src=munin/apache2_vhost.j2 dest=/etc/apache2/sites-available/munin owner=root group=root mode=0644
|
|
|
+ notify:
|
|
|
+ - Reload apache2 for munin
|
|
|
+ when_boolean: ${with_munin} and ${with_apache2}
|
|
|
+
|
|
|
+- name: Install apache2 virtual host for munin (sites-enabled)
|
|
|
+ action: file src=/etc/apache2/sites-available/munin path=/etc/apache2/sites-enabled/munin state=link
|
|
|
+ notify:
|
|
|
+ - Reload apache2 for munin
|
|
|
+ when_boolean: ${with_munin} and ${with_apache2}
|
|
|
+
|
|
|
- name: Ensure munin-node is running
|
|
|
action: service name=munin-node state=started
|
|
|
when_boolean: ${with_munin_node}
|