forked from openstack-ansible/ansible-role-horizon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.yml
52 lines (46 loc) · 1.5 KB
/
test.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
---
- hosts: all
sudo: False
vars:
cirros_url: http://cdn.download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img
openstack_identity_demo_password: password
vars_files:
- defaults/main.yml
tasks:
- name: update admin.openrc from template
template:
src: templates/admin.openrc
dest: "{{ ansible_env.PWD }}/admin.openrc"
owner: "{{ ansible_ssh_user }}"
- name: create demo tenant
keystone_user:
endpoint: "{{ openstack_identity_admin_url }}"
token: "{{ openstack_identity_admin_token }}"
tenant: demo
tenant_description: "Demo Tenant"
- name: create demo user
keystone_user:
endpoint: "{{ openstack_identity_admin_url }}"
token: "{{ openstack_identity_admin_token }}"
tenant: demo
user: demo
password: "{{ openstack_identity_demo_password }}"
- name: associate _member_ role with demo user
keystone_user:
endpoint: "{{ openstack_identity_admin_url }}"
token: "{{ openstack_identity_admin_token }}"
tenant: demo
user: demo
role: _member_
- name: ensure demo user has admin role
keystone_user:
endpoint: "{{ openstack_identity_admin_url }}"
token: "{{ openstack_identity_admin_token }}"
tenant: demo
user: demo
role: admin
- name: update demo.openrc template
template:
src: templates/demo.openrc
dest: "{{ ansible_env.PWD }}/demo.openrc"
mode: 0600