-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhxarc_play.yml
88 lines (71 loc) · 2.93 KB
/
hxarc_play.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
---
- import_playbook: common_play.yml
- hosts: '{{ target_hosts | default("tag_service_hxarc", true) }}'
remote_user: "{{ my_remote_user }}"
become: yes
become_user: root
vars:
redirect_to_edx_lti: "{{ lookup('env', 'EDX_REDIRECT') | default('', true) }}"
vars_files:
- vars/common_vars.yml
- vars/hxarc_vars.yml
handlers:
- include: handlers/main.yml
tasks:
- name: SUBPROC DEPS | install subproc
include_role:
name: subproc_install
vars:
subproc_name: '{{ subproc_deps_item.name }}'
subproc_git_repo: '{{ subproc_deps_item.git_repo }}'
subproc_git_revision: '{{ subproc_deps_item.git_revision }}'
subproc_git_deploy_key_file: '{{ subproc_deps_item.git_deploy_key_file | default("", true) }}'
subproc_dirs_to_create: '{{ subproc_deps_item.subproc_dirs_to_create }}'
subproc_venv_dir: '{{ subproc_rootdir_base }}/{{ subproc_deps_item.name }}/venv'
subproc_bin_dir: '{{ subproc_rootdir_base }}/{{ subproc_deps_item.name }}/bin'
subproc_wrapper_template: '{{ subproc_deps_item.subproc_wrapper_template }}'
subproc_wrapper_path: '{{ subproc_deps_item.subproc_wrapper_path }}'
subproc_script_path: '{{ subproc_deps_item.subproc_script_path }}'
subproc_output_basename: '{{ subproc_config[subproc_deps_item.name]["output_basename"] }}'
subproc_output_ext: '{{ subproc_config[subproc_deps_item.name]["output_ext"] }}'
subproc_input_data_filename: '{{ subproc_config[subproc_deps_item.name]["input_data_filename"] | default("hxarc_input_data.json", true) }}'
loop: '{{ subproc_deps }}'
loop_control:
loop_var: subproc_deps_item
- name: install webapp
include_role:
name: webapp_install
- name: run migration and collectstatic
include_tasks: 'roles/webapp_install/tasks/django_manage.yml'
- name: create django admin user
include_tasks: 'roles/webapp_install/tasks/django_admin_user.yml'
- name: config nginx
include_role:
name: nginx
- name: drop index to redirect to edge
template:
src: roles/subproc_install/templates/index_redirect.html.j2
dest: "{{ static_dir }}/index.html"
owner: "{{ service_user }}"
group: "{{ service_group }}"
mode: 0766
backup: yes
when: redirect_to_edx_lti is defined and redirect_to_edx_lti != ''
- name: hxarc-only | cleanup temp files cronjob
include_role:
name: hxarc
- hosts: '{{ target_hosts | default("tag_service_hxarc", true) }}'
remote_user: "{{ my_remote_user }}"
become: yes
become_user: root
vars_files:
- vars/common_vars.yml
- vars/hxarc_vars.yml
handlers:
- include: handlers/main.yml
tasks:
- name: install redis
include_role:
name: external/geerlingguy.redis
#- import_playbook: cloudwatch_scripts_play.yml
#- import_playbook: route53_play.yml