mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Update+Rename munin/tasks/enable-or-disable.yml to nginx.yml
This commit is contained in:
parent
17de43c917
commit
90b95c0b52
2 changed files with 16 additions and 50 deletions
|
@ -1,50 +0,0 @@
|
|||
- name: Enable & Start 'munin-node' systemd service
|
||||
systemd:
|
||||
name: munin-node
|
||||
daemon_reload: yes
|
||||
enabled: yes
|
||||
state: started
|
||||
when: munin_enabled | bool
|
||||
|
||||
- name: Disable 'munin-node' systemd service
|
||||
systemd:
|
||||
name: munin-node
|
||||
enabled: no
|
||||
state: stopped
|
||||
when: not munin_enabled
|
||||
|
||||
# Apache
|
||||
|
||||
- name: Enable http://box/munin via Apache
|
||||
command: a2ensite munin24.conf
|
||||
when: apache_install and munin_enabled # and not nginx_enabled
|
||||
|
||||
- name: Disable http://box/munin via Apache
|
||||
command: a2dissite munin24.conf
|
||||
when: apache_install and not munin_enabled # or nginx_enabled
|
||||
|
||||
- name: Restart Apache systemd service ({{ apache_service }})
|
||||
systemd:
|
||||
name: "{{ apache_service }}" # apache2 or httpd, as set in /opt/iiab/iiab/vars/<OS>.yml
|
||||
state: restarted
|
||||
when: apache_install and apache_enabled
|
||||
|
||||
# NGINX
|
||||
|
||||
- name: Enable http://box/munin via NGINX, by installing {{ nginx_config_dir }}/munin24-nginx.conf from template
|
||||
template:
|
||||
src: munin24-nginx.conf.j2
|
||||
dest: "{{ nginx_config_dir }}/munin24-nginx.conf" # /etc/nginx/conf.d
|
||||
when: munin_enabled # and nginx_enabled
|
||||
|
||||
- name: Disable http://box/munin via NGINX, by installing {{ nginx_config_dir }}/munin24-nginx.conf
|
||||
file:
|
||||
path: "{{ nginx_config_dir }}/munin24-nginx.conf" # /etc/nginx/conf.d
|
||||
state: absent
|
||||
when: not munin_enabled
|
||||
|
||||
- name: Restart 'nginx' systemd service
|
||||
systemd:
|
||||
name: nginx
|
||||
state: restarted
|
||||
# when: nginx_enabled | bool
|
16
roles/munin/tasks/nginx.yml
Normal file
16
roles/munin/tasks/nginx.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
- name: Enable http://box/munin via NGINX, by installing {{ nginx_config_dir }}/munin24-nginx.conf from template
|
||||
template:
|
||||
src: munin24-nginx.conf.j2
|
||||
dest: "{{ nginx_config_dir }}/munin24-nginx.conf" # /etc/nginx/conf.d
|
||||
when: munin_enabled
|
||||
|
||||
- name: Disable http://box/munin via NGINX, by installing {{ nginx_config_dir }}/munin24-nginx.conf
|
||||
file:
|
||||
path: "{{ nginx_config_dir }}/munin24-nginx.conf" # /etc/nginx/conf.d
|
||||
state: absent
|
||||
when: not munin_enabled
|
||||
|
||||
- name: Restart 'nginx' systemd service
|
||||
systemd:
|
||||
name: nginx
|
||||
state: restarted
|
Loading…
Add table
Add a link
Reference in a new issue