-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathcheck_openstack_endpoints.yaml
36 lines (33 loc) · 1.05 KB
/
check_openstack_endpoints.yaml
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: undercloud
vars:
metadata:
name: Check connectivity to various OpenStack services
description: >
# TODO: this could also check for undercloud encpoints
This will attempt to connect to each service endpoint defined in
your hosts file's controller_vip variable.
groups:
- post-deployment
tasks:
- name: Load the overcloud credentials
overcloudrc: path=/home/stack/overcloudrc
# Check connectivity to horizon
- name: Check Horizon
# TODO: get Horizon endpoint from Keystone
uri: url=http://{{public_vip}}
# Check that we can obtain an auth token from horizon
- name: Check Keystone
uri:
url: "{{ overcloudrc.OS_AUTH_URL }}/tokens"
method: POST
body_format: json
body:
auth:
passwordCredentials:
username: "{{ overcloudrc.OS_USERNAME }}"
password: "{{ overcloudrc.OS_PASSWORD }}"
tenantName: "{{ overcloudrc.OS_TENANT_NAME }}"
return_content: yes
register: auth_token
# TODO: other endpoints