-
Notifications
You must be signed in to change notification settings - Fork 1
/
create_surveys.yml
48 lines (46 loc) · 2.12 KB
/
create_surveys.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
- name: Create surveys on the server
hosts: telephone
user: root
become: yes
become_user: telephone
vars_files:
- env_vars/base.yml
- env_vars/prod.yml
vars:
game_id: 2
generations:
- 6
- 7
- 8
generations_label: "{{ generations | join('') }}"
generations_str: "{{ generations | join(' ') }}"
tasks:
- name: Create betweeen and within category surveys
django_manage:
command: "new_survey {{ item.name }} -g {{ game_id }} -n {{ generations_str }} -i {{ item.include }} -c {{ item.include }} -e {{ item.include }}"
app_path: "{{ project_path }}"
virtualenv: "{{ virtualenv_path }}"
settings: "{{ django_settings_file }}"
environment: "{{ django_environment }}"
with_items:
- { name: "within-glass-g{{ generations_label }}", include: "34 35 36 37" }
- { name: "within-tear-g{{ generations_label }}", include: "38 39 40 41" }
- { name: "within-water-g{{ generations_label }}", include: "42 43 44 45" }
- { name: "within-zipper-g{{ generations_label }}", include: "46 47 48 49" }
- { name: "between-1-g{{ generations_label }}", include: "42 38 46 34" }
- { name: "between-2-g{{ generations_label }}", include: "43 39 47 35" }
- { name: "between-3-g{{ generations_label }}", include: "44 40 48 36" }
- { name: "between-4-g{{ generations_label }}", include: "45 41 49 37" }
- name: Create same category surveys
django_manage:
command: "new_survey {{ item.name }} -g {{ game_id }} -n {{ generations_str }} -x {{ item.exclude }} -c {{ item.exclude }} -e {{ item.exclude }}"
app_path: "{{ project_path }}"
virtualenv: "{{ virtualenv_path }}"
settings: "{{ django_settings_file }}"
environment: "{{ django_environment }}"
with_items:
- { name: "same-1-g{{ generations_label }}", exclude: "42 38 46 34" }
- { name: "same-2-g{{ generations_label }}", exclude: "43 39 47 35" }
- { name: "same-3-g{{ generations_label }}", exclude: "44 40 48 36" }
- { name: "same-4-g{{ generations_label }}", exclude: "45 41 49 37" }