Dave Wilde 482e845d92 Improve multi-node AIO robustness
In order to improve the readability and robustness of the mnaio feature
I have replaced the shell out to virsh tasks to use the virt module
where available.  I have also created a vm-status play that will
hopefully help resolve SSH failures into the VMs.  This play utilizes
the block/rescue/handler pattern to attempt to restart the VM once if
it fails the initial SSH check.  Hopefully this will reduce the SSH
failures due to a suck VM.  This adds a new variable called
vm_ssh_timeout which allows the deployer an easy place to override the
default timeout.  The python-lxml package is needed for the virt module.

Change-Id: I027556b71a8c26d08a56b4ffa56b2eeaf1cbabe9
2018-06-29 10:12:16 -05:00

58 lines
1.5 KiB
YAML

---
# Copyright 2017, 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 witing, 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.
mnaio_host_required_distro_packages:
- ubuntu-cloud-keyring
mnaio_host_package_repos:
- repo: "deb http://ubuntu-cloud.archive.canonical.com/ubuntu {{ ansible_lsb.codename }}-updates/queens main"
state: present
filename: "uca"
condition: "{{ ansible_lsb.codename == 'xenial' }}"
mnaio_host_distro_packages:
- bridge-utils
- ifenslave
- iptables-persistent
- libvirt-bin
- lvm2
- ntp
- openssh-server
- python2.7
- python-lxml
- python-software-properties
- qemu-kvm
- qemu-utils
- software-properties-common
- virtinst
- virt-manager
- vlan
mnaio_pxe_distro_packages:
- tftpd-hpa
- inetutils-inetd
- nginx
- p7zip-full
mnaio_dhcp_distro_packages:
- isc-dhcp-server
mnaio_pkg_cache_server_distro_packages:
- apt-cacher-ng
mnaio_host_iptables_service: "{{ (ansible_distribution | lower + '-' + ansible_distribution_version | lower == 'ubuntu-14.04') | ternary('iptables-persistent', 'netfilter-persistent') }}"
ssh_service_name: ssh