openstack-ansible-tests/test-prepare-containers.yml
Travis Truman 1943251152 Address ansible_ssh_* var deprecation
Replacing usage of ansible_ssh_host, ansible_ssh_user,
ansible_ssh_port with ansible_host, ansible_user and ansible_port
Depends-On: I35371879a87c115f219cd181245fe59f6d7d3f77
Change-Id: I97c3958c406b44b271d361860516d0b903438a83
2016-09-19 11:06:48 +01:00

39 lines
1.2 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: Playbook for creating containers
hosts: localhost
become: true
gather_facts: true
- include: destroy_containers.yml
when: destroy_first | default(True) | bool
- name: Playbook for creating containers
hosts: all_containers
serial: 1
become: True
gather_facts: False
roles:
- role: "lxc_container_create"
post_tasks:
- name: Wait for ssh to be available
local_action:
module: wait_for
port: "{{ ansible_port | default('22') }}"
host: "{{ ansible_host | default(inventory_hostname) }}"
search_regex: OpenSSH
delay: 1