diff options
author | heqnx <root@heqnx.com> | 2025-05-29 19:34:32 +0300 |
---|---|---|
committer | heqnx <root@heqnx.com> | 2025-05-29 19:34:32 +0300 |
commit | b8f1d76bd38d03e68fbc51f8e7340a9963a4104d (patch) | |
tree | 1cf7347b862e4c6059463ea6b811f44a0d37c41c /roles/tor/tasks | |
parent | 0e9c8dc71a87b86a9d99c82b5f9aaa37dffeb9bd (diff) | |
download | ansible-playbooks-b8f1d76bd38d03e68fbc51f8e7340a9963a4104d.tar.gz ansible-playbooks-b8f1d76bd38d03e68fbc51f8e7340a9963a4104d.zip |
removed handlers, need to run all the time
Diffstat (limited to 'roles/tor/tasks')
-rw-r--r-- | roles/tor/tasks/ssh_hidden_service.yaml | 8 | ||||
-rw-r--r-- | roles/tor/tasks/tor_install.yaml | 8 |
2 files changed, 14 insertions, 2 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: diff --git a/roles/tor/tasks/tor_install.yaml b/roles/tor/tasks/tor_install.yaml index 96cf98e..3a053e6 100644 --- a/roles/tor/tasks/tor_install.yaml +++ b/roles/tor/tasks/tor_install.yaml @@ -31,7 +31,13 @@ owner: debian-tor group: debian-tor mode: '0644' - notify: restart tor + +- name: restart tor + systemd: + name: tor + state: restarted + enabled: true + when: ansible_service_mgr == 'systemd' - name: check if tor is routing traffic correctly command: curl --socks5-hostname 127.0.0.1:9050 https://check.torproject.org/api/ip |