summaryrefslogtreecommitdiffstats
path: root/roles/bacula-sd/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/bacula-sd/tasks')
-rw-r--r--roles/bacula-sd/tasks/main.yml21
1 files changed, 7 insertions, 14 deletions
diff --git a/roles/bacula-sd/tasks/main.yml b/roles/bacula-sd/tasks/main.yml
index a888db6..5de0d3d 100644
--- a/roles/bacula-sd/tasks/main.yml
+++ b/roles/bacula-sd/tasks/main.yml
@@ -1,13 +1,3 @@
-- name: Install stunnel
- apt: pkg=stunnel4
-
-- name: Auto-enable stunnel
- lineinfile: dest=/etc/default/stunnel4
- regexp='^(\s*#)?\s*ENABLED='
- line='ENABLED=1'
- owner=root group=root
- mode=0644
-
- name: Create /etc/stunnel/certs
file: path=/etc/stunnel/certs
state=directory
@@ -24,7 +14,7 @@
changed_when: r1.rc == 0
failed_when: r1.rc > 1
notify:
- - Restart stunnel
+ - Restart stunnel@bacula-sd
tags:
- genkey
@@ -45,7 +35,7 @@
mode=0644
register: r2
notify:
- - Restart stunnel
+ - Restart stunnel@bacula-sd
- name: Configure stunnel
template: src=etc/stunnel/bacula-sd.conf.j2
@@ -54,10 +44,13 @@
mode=0644
register: r3
notify:
- - Restart stunnel
+ - Restart stunnel@bacula-sd
+
+- name: Enable stunnel@bacula-sd
+ service: name=stunnel4@bacula-sd enabled=yes
- name: Start stunnel
- service: name=stunnel4 pattern=/usr/bin/stunnel4 state=started
+ service: name=stunnel4@bacula-sd state=started
when: not (r1.changed or r2.changed or r3.changed)
- meta: flush_handlers