diff options
Diffstat (limited to 'roles/munin-master')
-rw-r--r-- | roles/munin-master/handlers/main.yml | 4 | ||||
-rw-r--r-- | roles/munin-master/tasks/main.yml | 11 | ||||
-rw-r--r-- | roles/munin-master/templates/etc/stunnel/munin-master.conf.j2 | 3 |
3 files changed, 11 insertions, 7 deletions
diff --git a/roles/munin-master/handlers/main.yml b/roles/munin-master/handlers/main.yml index 4c41033..f65376c 100644 --- a/roles/munin-master/handlers/main.yml +++ b/roles/munin-master/handlers/main.yml @@ -20,5 +20,5 @@ - name: Restart Nginx service: name=nginx state=restarted -- name: Restart stunnel - service: name=stunnel4 pattern=/usr/bin/stunnel4 state=restarted +- name: Restart stunnel@munin-master + service: name=stunnel4@munin-master state=restarted diff --git a/roles/munin-master/tasks/main.yml b/roles/munin-master/tasks/main.yml index 4b3cfb7..1580197 100644 --- a/roles/munin-master/tasks/main.yml +++ b/roles/munin-master/tasks/main.yml @@ -103,7 +103,7 @@ with_items: "{{ groups.all | difference([inventory_hostname]) }}" register: r1 notify: - - Restart stunnel + - Restart stunnel@munin-master - name: Configure stunnel template: src=etc/stunnel/munin-master.conf.j2 @@ -112,10 +112,13 @@ mode=0644 register: r2 notify: - - Restart stunnel + - Restart stunnel@munin-master -- name: Start stunnel - service: name=stunnel4 pattern=/usr/bin/stunnel4 state=started +- name: Enable stunnel@munin-master + service: name=stunnel4@munin-master enabled=yes + +- name: Start stunnel@munin-master + service: name=stunnel4@munin-master state=started when: not (r1.changed or r2.changed) - meta: flush_handlers diff --git a/roles/munin-master/templates/etc/stunnel/munin-master.conf.j2 b/roles/munin-master/templates/etc/stunnel/munin-master.conf.j2 index bbe4114..ffc7d0d 100644 --- a/roles/munin-master/templates/etc/stunnel/munin-master.conf.j2 +++ b/roles/munin-master/templates/etc/stunnel/munin-master.conf.j2 @@ -7,7 +7,8 @@ setuid = stunnel4 setgid = stunnel4 ; PID is created inside the chroot jail -pid = /var/run/stunnel4/munin-master.pid +pid = +foreground = yes ; Only log messages at severity warning (4) and higher debug = 4 |