diff options
Diffstat (limited to 'roles/tor/tasks/tor_install.yaml')
-rw-r--r-- | roles/tor/tasks/tor_install.yaml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/roles/tor/tasks/tor_install.yaml b/roles/tor/tasks/tor_install.yaml index 96cf98e..f1fc92f 100644 --- a/roles/tor/tasks/tor_install.yaml +++ b/roles/tor/tasks/tor_install.yaml @@ -9,6 +9,7 @@ - netcat-openbsd state: present update_cache: true + cache_valid_time: 86400 - name: check if /etc/tor/torrc exists stat: @@ -31,7 +32,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 |