forked from redhat-cop/agnosticd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
post_software.yml
69 lines (62 loc) · 2.18 KB
/
post_software.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
---
- name: Step 00xxxxx post software
hosts: localhost
gather_facts: false
become: true
tasks:
- debug:
msg: "Post-Software tasks Started"
- name: Deploy user setup
hosts: localhost
connection: local
gather_facts: false
tags:
- step005
tasks:
- name: osp user.info
when: cloud_provider == 'osp'
block:
- name: print out user.info
agnosticd_user_info:
msg: "{{ item }}"
loop:
- "To access bastion via SSH:"
- "ssh {{ student_name }}@bastion.{{ guid }}.{{ osp_cluster_dns_zone }}"
- "Enter ssh password when prompted: {{ hostvars['bastion']['student_password'] }}"
- ""
- "frontend could be access via browser when ready:"
- "http://frontend.{{ guid }}.{{ osp_cluster_dns_zone }}"
- name: Save user data
agnosticd_user_info:
data:
ssh_command: "ssh {{ student_name }}@bastion.{{ guid }}.{{ osp_cluster_dns_zone }}"
ssh_password: "{{ hostvars['bastion']['student_password'] }}"
frontend_url: "http://frontend.{{ guid }}.{{ osp_cluster_dns_zone }}"
- name: ec2 user.info
when: cloud_provider == 'ec2'
block:
- name: print out user.info
agnosticd_user_info:
msg: "{{ item }}"
loop:
- "To access frontend via browser:"
- "http://frontend1.{{ guid }}{{ subdomain_base_suffix }}"
- ""
- "To access bastion via SSH:"
- "ssh {{ student_name }}@bastion.{{ guid }}{{ subdomain_base_suffix }}"
- "Enter ssh password when prompted: {{ hostvars[groups['bastions'][0]]['student_password'] }}"
- name: Save user data
agnosticd_user_info:
data:
ssh_command: "ssh {{ student_name }}@bastion.{{ guid }}{{ subdomain_base_suffix }}"
ssh_password: "{{ hostvars[groups['bastions'][0]]['student_password'] }}"
- name: PostSoftware flight-check
hosts: localhost
connection: local
gather_facts: false
become: false
tags:
- post_flight_check
tasks:
- debug:
msg: "Post-Software checks completed successfully"