-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathgrading-script.sh
37 lines (32 loc) · 896 Bytes
/
grading-script.sh
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
- hosts: localhost
gather_facts: false
tasks:
- name: Create In-memory Inventory
add_host:
name: workstation-{{OSP_GUID}}.rhpds.opentlc.com
group: workstation
- hosts: workstation
gather_facts: false
tasks:
- name: OpenStack servers
os_server_facts:
cloud: ospcloud
server: 'frontend'
register: openstack_info
- name: Curl website
uri:
url: "http://{{item.public_v4}}"
with_items:
- "{{ openstack_info.ansible_facts.openstack_servers }}"
register: webpage
- hosts: localhost
gather_facts: false
tasks:
- name: Curl website
uri:
url: "http://frontend1.{{ THREE_TIER_GUID }}.example.opentlc.com"
return_content: yes
register: webpage
- name: Fail if 'Ansible has done its job' is not in the page content
fail:
when: "'Ansible has done its job' not in webpage.results[0].content"