-
Notifications
You must be signed in to change notification settings - Fork 138
/
deploy-crowbar.yml
86 lines (76 loc) · 2.09 KB
/
deploy-crowbar.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
---
- import_playbook: cloud-ses-integration.yml
when: ses_enabled
- name: Configure Crowbar and deploy OpenStack
hosts: "{{ cloud_env }}"
remote_user: root
gather_facts: True
vars:
task: "deploy"
pre_tasks:
- include_role:
name: rocketchat_notify
vars:
rc_action: "started"
rc_state: "Started"
when:
- rc_notify
- rc_notify_start
- not is_physical_deploy
tasks:
- block:
- name: Crowbar log stream at
debug:
msg: "http://{{ ansible_host }}:9091/"
- include_role:
name: crowbar_setup
vars:
qa_crowbarsetup_cmd: "setup_trusted_cert server {{ ssl_certfile }} {{ ssl_keyfile }}"
when:
- ssl_enabled
- not ssl_insecure
- include_role:
name: crowbar_setup
vars:
qa_crowbarsetup_cmd: "{{ item }} dns default"
loop:
- "custom_configuration"
- "crowbar_proposal_commit"
when: "'designate' in enabled_services"
- include_role:
name: crowbar_setup
vars:
qa_crowbarsetup_cmd: onadmin_batch
- include_role:
name: crowbar_setup
vars:
qa_crowbarsetup_cmd: onadmin_rebootcloud
when:
- reboot_after_deploy
- not update_after_deploy
rescue:
- include_role:
name: rocketchat_notify
vars:
rc_action: "finished"
rc_state: "Failed"
when: rc_notify
- name: Stop if something failed
fail:
msg: "{{ task }} failed."
always:
- include_role:
name: jenkins_artifacts
when: lookup("env", "WORKSPACE")
vars:
jenkins_artifacts_to_collect:
- src: "{{ admin_mkcloud_config_file }}"
- src: "{{ qa_crowbarsetup_log }}"
post_tasks:
- include_role:
name: rocketchat_notify
vars:
rc_action: "finished"
rc_state: "Success"
when:
- rc_notify