-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrestart_neo.yml
67 lines (60 loc) · 1.64 KB
/
restart_neo.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
---
- import_playbook: playbook_launch_pre_tasks.yml
- name: Run Neo4j
hosts: remote
user: core
gather_facts: False
vars_files:
- "environments/{{ env }}/main.yml" # ENV must always be loaded first
- "environments/shared_secrets.yml"
- "environments/shared_variables.yml"
tasks:
- name: Login to Docker
block:
- include_tasks: tasks/docker_login.yml
- set_fact:
failed_flag: "passed"
rescue:
- debug:
msg: "Failed execute docker login."
- set_fact:
failed_flag: "failed"
- name: Stop Neo
block:
- include_tasks: tasks/stop_neo.yml
- set_fact:
failed_flag: "passed"
rescue:
- debug:
msg: "Error Detected Failing Build"
- set_fact:
failed_flag: "failed"
- name: Start Neo ENV
block:
- include_tasks: tasks/start_neo_env.yml
- set_fact:
failed_flag: "passed"
rescue:
- debug:
msg: "Error Detected Failing Build"
- set_fact:
failed_flag: "failed"
when: not DOWNLOAD_NEO4J_DATA_IMAGE_FROM_AWS
- name: Start Neo Data
block:
- include_tasks: tasks/start_neo_data.yml
- set_fact:
failed_flag: "passed"
rescue:
- debug:
msg: "Error Detected Failing Build"
- set_fact:
failed_flag: "failed"
when: DOWNLOAD_NEO4J_DATA_IMAGE_FROM_AWS
- name: Check Failures
hosts: remote
gather_facts: False
tasks:
- fail:
msg: "The execution has failed because of errors."
when: failed_flag == "failed"