commit 44314d952b65dfe42b01de8521de931f8f2b1e6b
Author: hiro <hiro(a)torproject.org>
Date: Fri Sep 27 17:22:43 2019 +0200
Fix shell commands
---
roles/gettor/tasks/main.yml | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/roles/gettor/tasks/main.yml b/roles/gettor/tasks/main.yml
index feb9660..4c05156 100644
--- a/roles/gettor/tasks/main.yml
+++ b/roles/gettor/tasks/main.yml
@@ -25,21 +25,29 @@
when: not stat_result.stat.exists
- name: export stats
- shell: {{ gettor_path }}/scripts/export_stats
+ shell: scripts/export_stats
+ args:
+ chdir: "{{ gettor_path }}"
- name: create virtualenv
- shell: virtualenv {{ gettor_path }}/venv
+ shell: virtualenv venv
args:
chdir: "{{ gettor_path }}"
- name: activate virtualenv
- shell: . {{ gettor_path }}/venv/bin/activate
+ shell: source venv/bin/activate
+ args:
+ chdir: "{{ gettor_path }}"
- name: create database
- shell: {{ gettor_path }}/venv/bin/python3 {{ gettor_path }}/scripts/create_db -n -c -o -f gettor.db
+ shell: venv/bin/python3 scripts/create_db -n -c -o -f gettor.db
+ args:
+ chdir: "{{ gettor_path }}"
- name: add links
- shell: {{ gettor_path }}/venv/bin/python3 {{ gettor_path }}/scripts/add_links_to_db -f gettor.db
+ shell: venv/bin/python3 scripts/add_links_to_db -f gettor.db
+ args:
+ chdir: "{{ gettor_path }}"
- name: stop gettor
shell: ./bin gettor_service stop
@@ -47,6 +55,6 @@
chdir: "{{ gettor_path }}"
- name: start gettor
- shell: ./bin gettor_service start
+ shell: bin gettor_service start
args:
chdir: "{{ gettor_path }}