File tree Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 2
2
- hosts : runtime_host
3
3
vars_files :
4
4
- vars.yaml
5
+ - vault.yaml
5
6
tasks :
6
7
- name : Copy and unarchive the package into the indicators runtime host directory.
7
8
unarchive :
18
19
group : " {{ runtime_user }}"
19
20
state : link
20
21
22
+ - name : Check to see if we have a params file to send.
23
+ local_action : stat path="files/{{ indicator }}-params-prod.json"
24
+ register : file
25
+
26
+ - name : Check to see if we have a params template to send.
27
+ local_action : stat path="templates/{{ indicator }}-params-prod.json.j2"
28
+ register : template
29
+
21
30
- name : Set production params file.
22
31
copy :
23
32
src : files/{{ indicator }}-params-prod.json
24
33
dest : " {{ indicators_runtime_dir }}/{{ indicator }}/params.json"
25
34
owner : " {{ runtime_user }}"
26
35
group : " {{ runtime_user }}"
36
+ when : file.stat.exists
37
+
38
+ - name : Set production params template.
39
+ template :
40
+ src : templates/{{ indicator }}-params-prod.json.j2
41
+ dest : " {{ indicators_runtime_dir }}/{{ indicator }}/params.json"
42
+ owner : " {{ runtime_user }}"
43
+ group : " {{ runtime_user }}"
44
+ when : template.stat.exists
Original file line number Diff line number Diff line change 3
3
"static_file_dir": "./static",
4
4
"export_dir": "/common/covidcast/receiving/jhu-csse/",
5
5
"cache_dir": "./cache",
6
- "base_url" : " https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_{metric}_US.csv"
6
+ "base_url": "https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_{metric}_US.csv",
7
+ "aws_credentials": {
8
+ "aws_access_key_id": "{{ delphi_aws_access_key_id }}",
9
+ "aws_secret_access_key": "{{ delphi_aws_secret_access_key }}"
10
+ },
11
+ "bucket_name": "delphi-covidcast-indicator-output"
7
12
}
Original file line number Diff line number Diff line change @@ -5,3 +5,7 @@ indicators_runtime_dir: "/home/{{ runtime_user }}/runtime"
5
5
package : " {{ indicator }}.tar.gz" # This is passed in the Ansible invocation.
6
6
python_version : " 3.8.2"
7
7
pyenv_python_path : " /home/{{ runtime_user }}/.pyenv/versions/{{ python_version }}/bin/python"
8
+
9
+ # Indicators variables.
10
+ delphi_aws_access_key_id : " {{ vault_delphi_aws_access_key_id }}"
11
+ delphi_aws_secret_access_key : " {{ vault_delphi_aws_secret_access_key }}"
You can’t perform that action at this time.
0 commit comments