commit de49f2d471701a12f9152db5389902bfe7b2fda0 Author: Iain R. Learmonth irl@fsfe.org Date: Wed Mar 4 14:47:34 2020 +0000
a/check: Run a tor client for check updater --- ansible/roles/check/files/checktor.service | 9 +++++ ansible/roles/check/files/torrc | 8 +++++ ansible/roles/check/tasks/main.yml | 54 +++++++++++++++--------------- 3 files changed, 44 insertions(+), 27 deletions(-)
diff --git a/ansible/roles/check/files/checktor.service b/ansible/roles/check/files/checktor.service new file mode 100644 index 0000000..10d57c2 --- /dev/null +++ b/ansible/roles/check/files/checktor.service @@ -0,0 +1,9 @@ +[Unit] +Description=Tor Client (Check) + +[Service] +Type=simple +ExecStart=/usr/bin/tor -f /srv/check.torproject.org/torrc + +[Install] +WantedBy=default.target diff --git a/ansible/roles/check/files/torrc b/ansible/roles/check/files/torrc new file mode 100644 index 0000000..65c50bf --- /dev/null +++ b/ansible/roles/check/files/torrc @@ -0,0 +1,8 @@ +FetchDirInfoEarly 1 +FetchDirInfoExtraEarly 1 +FetchUselessDescriptors 1 +UseMicrodescriptors 0 +DownloadExtraInfo 1 +DataDirectory /srv/check.torproject.org/tordata +SocksPort 0 +ControlPort 0 diff --git a/ansible/roles/check/tasks/main.yml b/ansible/roles/check/tasks/main.yml index bb4d53b..c4af5a0 100644 --- a/ansible/roles/check/tasks/main.yml +++ b/ansible/roles/check/tasks/main.yml @@ -11,13 +11,6 @@ state: directory become: true become_user: check -#- name: install the ipscan module -# copy: -# src: ipscan.py -# dest: /srv/tordnsel.torproject.org/exitscanner/exitmap/src/modules/ipscan.py -# mode: 0755 -# become: true -# become_user: tordnsel - name: create systemd user directory for check file: path: /srv/check.torproject.org/.config/systemd/user @@ -41,23 +34,30 @@ target: build become: true become_user: check -#- name: install exit scanner service file -# copy: -# src: exitscanner.service -# dest: "/srv/tordnsel.torproject.org/.config/systemd/user/exitscanner.service" -# become: true -# become_user: tordnsel -#- name: reload systemd daemon -# systemd: -# scope: user -# daemon_reload: yes -# become: true -# become_user: tordnsel -#- name: enable and start exitscanner service -# systemd: -# scope: user -# name: exitscanner -# state: started -# enabled: yes -# become: yes -# become_user: tordnsel +- name: install tor client torrc + copy: + src: torrc + dest: /srv/check.torproject.org/torrc + become: true + become_user: check +- name: create tor data directory + file: + path: /srv/check.torproject.org/tordata + state: directory + become: true + become_user: check +- name: install tor client service file + copy: + src: checktor.service + dest: "/srv/check.torproject.org/.config/systemd/user/checktor.service" + become: true + become_user: check +- name: enable and start tor client service + systemd: + scope: user + name: checktor + state: started + enabled: yes + daemon_reload: yes + become: yes + become_user: check
tor-commits@lists.torproject.org