openstack-ansible/rpc_deployment/roles/tempest_resources/tasks/main.yml
Hugh Saunders 23f9b77365 Add cinder tests to gate script
Also adds basic neutron library and task to create a network in
tempest_resources.

Related: https://github.com/rcbops/ansible-lxc-rpc/issues/472
2014-11-18 14:37:33 +00:00

74 lines
2.2 KiB
YAML

---
# Copyright 2014, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Ensure cirros image
glance:
command: 'image-create'
openrc_path: /root/openrc
image_name: cirros
image_url: 'http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img'
image_container_format: bare
image_disk_format: qcow2
image_is_public: True
- name: Ensure tempest tenants
keystone:
command: ensure_tenant
tenant_name: "{{ item }}"
description: "{{ item }} Tenant"
endpoint: "{{ auth_identity_uri }}"
login_tenant_name: "{{ auth_admin_tenant }}"
login_user: "{{ auth_admin_username }}"
login_password: "{{ auth_admin_password }}"
with_items:
- demo
- alt_demo
- name: Ensure tempest users
keystone:
command: ensure_user
tenant_name: "{{ item }}"
user_name: "{{ item }}"
password: "{{ item }}"
description: "{{ item }} User"
endpoint: "{{ auth_identity_uri }}"
login_tenant_name: "{{ auth_admin_tenant }}"
login_user: "{{ auth_admin_username }}"
login_password: "{{ auth_admin_password }}"
with_items:
- demo
- alt_demo
- name: Ensure tempest users have heat_stack_owners role
keystone:
command: ensure_user_role
tenant_name: "{{ item }}"
user_name: "{{ item }}"
role_name: heat_stack_owner
endpoint: "{{ auth_identity_uri }}"
login_tenant_name: "{{ auth_admin_tenant }}"
login_user: "{{ auth_admin_username }}"
login_password: "{{ auth_admin_password }}"
with_items:
- demo
- alt_demo
- name: Ensure tempest network exists
neutron:
command: create_network_with_subnet
openrc_path: /root/openrc
name: tempest
cidr: "192.168.74.0/24"