commit 9682821b1b3a6bad4141c4dc63dfb3b8a26a419d
Author: hiro <hiro(a)torproject.org>
Date: Sat Aug 31 15:52:02 2019 +0200
Update gettor tasks
---
roles/gettor/tasks/main.yml | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/roles/gettor/tasks/main.yml b/roles/gettor/tasks/main.yml
index 9e2416a..b6b28ab 100644
--- a/roles/gettor/tasks/main.yml
+++ b/roles/gettor/tasks/main.yml
@@ -15,30 +15,31 @@
args:
chdir: "{{ gettor_path }}"
+- name: create virtualenv
+ command: >
+ virtualenv venv
+ args:
+ chdir: "{{ gettor_path }}"
+
+- name: activate virtualenv
+ command: >
+ source venv/bin/activate
+ args:
+ chdir: "{{ gettor_path }}"
+
- name: create database
command: >
{{ gettor_path }}/scripts/create_db -n -c -o
- args:
- virtualenv: "{{ gettor_path }}/venv"
- virtualenv_command: virtualenv
- name: add links
command: >
{{ gettor_path }}/scripts/add_links_to_db -f gettor.db
- args:
- virtualenv: "{{ gettor_path }}/venv"
- virtualenv_command: virtualenv
- name: stop gettor
command: >
{{ gettor_path }}/bin gettor_service stop
- args:
- virtualenv: "{{ gettor_path }}/venv"
- virtualenv_command: virtualenv
+
- name: start gettor
command: >
{{ gettor_path }}/bin gettor_service start
- args:
- virtualenv: "{{ gettor_path }}/venv"
- virtualenv_command: virtualenv