summaryrefslogtreecommitdiffstats
path: root/roles/common/tasks/stunnel.yml
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2016-05-11 18:07:09 +0200
committerGuilhem Moulin <guilhem@fripost.org>2016-05-12 11:33:55 +0200
commit90d498034b891123350785a134402172de477f4f (patch)
treea6e3c924054c3f689cdaffffe3a479e88fb97282 /roles/common/tasks/stunnel.yml
parente370313ad5895871479fffc922e3c72c0375dbf2 (diff)
Use systemd unit files for stunnel4.
Diffstat (limited to 'roles/common/tasks/stunnel.yml')
-rw-r--r--roles/common/tasks/stunnel.yml20
1 files changed, 20 insertions, 0 deletions
diff --git a/roles/common/tasks/stunnel.yml b/roles/common/tasks/stunnel.yml
new file mode 100644
index 0000000..68469cd
--- /dev/null
+++ b/roles/common/tasks/stunnel.yml
@@ -0,0 +1,20 @@
+- name: Install stunnel4
+ apt: pkg=stunnel4
+
+- name: Set 'ENABLED=0' in /etc/default/stunnel4
+ lineinfile: dest=/etc/default/stunnel4
+ regexp='^(\s*#)?\s*ENABLED='
+ line='ENABLED=0'
+ owner=root group=root
+ mode=0644
+
+- name: Copy stunnel4 service file
+ copy: src=lib/systemd/system/{{ item }}
+ dest=/lib/systemd/system/{{ item }}
+ owner=root group=root
+ mode=0644
+ notify:
+ - systemctl daemon-reload
+ with_items:
+ - stunnel4.service
+ - stunnel4@.service