aboutsummaryrefslogtreecommitdiff
path: root/roles/tor/tasks/ssh_hidden_service.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/tor/tasks/ssh_hidden_service.yaml')
-rw-r--r--roles/tor/tasks/ssh_hidden_service.yaml8
1 files changed, 7 insertions, 1 deletions
diff --git a/roles/tor/tasks/ssh_hidden_service.yaml b/roles/tor/tasks/ssh_hidden_service.yaml
index cbac7fa..e757aa1 100644
--- a/roles/tor/tasks/ssh_hidden_service.yaml
+++ b/roles/tor/tasks/ssh_hidden_service.yaml
@@ -13,7 +13,13 @@
block: |
HiddenServiceDir /var/lib/tor/ssh
HiddenServicePort 22 127.0.0.1:22
- notify: restart tor
+
+- name: restart tor
+ systemd:
+ name: tor
+ state: restarted
+ enabled: true
+ when: ansible_service_mgr == 'systemd'
- name: wait for hidden service hostname file
wait_for: