openstack-ansible-tests/test-prepare-containers.yml
Kevin Carter 54930c0048
Remove the serialization in tests
The lxc container create process were running in serial as it sets up
the test environment. Being this is setting up a test environment
there's no need for it to be executed in serial. The original reason
these container creates were running in serial was due to SSH issues
however the integrated repo has been creating containers in parallel for
sometime now so it is believed the original control path issues have
been resolved.

Change-Id: I59d563549b288e634338474aed45011e94b85c47
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-12-12 17:52:01 -06:00

58 lines
1.9 KiB
YAML

---
# Copyright 2015, 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: Gather facts for the LXC hosts
hosts: localhost
become: true
gather_facts: true
tasks:
- include: "common-tasks/test-set-nodepool-vars.yml"
- include: destroy_containers.yml
when: destroy_first | default(True) | bool
- name: Playbook for creating containers
hosts: all_containers
become: True
gather_facts: False
any_errors_fatal: true
tasks:
- name: Create containers
include_role:
name: "lxc_container_create"
- name: Wait for container connectivity
wait_for_connection:
connect_timeout: "{{ lxc_container_wait_params.connect_timeout | default(omit) }}"
delay: "{{ lxc_container_wait_params.delay | default(omit) }}"
sleep: "{{ lxc_container_wait_params.sleep | default(omit) }}"
timeout: "{{ lxc_container_wait_params.timeout | default(omit) }}"
vars_files:
- test-vars.yml
# TODO(evrardjp): Move this as an include_role above like the patch
# https://review.openstack.org/525109
# when https://review.openstack.org/#/c/521598 is in,
# to optimize serialization
- name: Execute the openstack-host role on containers
hosts: all_containers
become: true
gather_facts: true
pre_tasks:
- include: "common-tasks/test-set-nodepool-vars.yml"
roles:
- role: "openstack_hosts"
vars_files:
- test-vars.yml