MNAIO: Add supported distro check and remove trusty support

Ubuntu Trusty is too old to support much of what this tooling does,
so we remove support for it and add a task to verify that a supported
distribution version is being used.

Change-Id: I0247be130dd4adf1d1d50518e6ec5c617a3a8f7c
This commit is contained in:
Jesse Pretorius 2018-10-10 10:13:15 +01:00
parent acd9e30bde
commit 20c4cf2625
2 changed files with 10 additions and 4 deletions

View File

@ -20,6 +20,16 @@
tags:
- setup-host
tasks:
- name: Check for a supported Operating System
assert:
that:
- (ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'xenial') or
(ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'bionic')
msg: >-
The only supported host platforms for this tooling are Ubuntu 16.04 LTS (Xenial)
and Ubuntu 18.04 LTS (Bionic). Patches to add support for other distributions are
most welcome.
- name: Gather variables for each operating system
include_vars: "{{ item }}"
with_first_found:

View File

@ -17,10 +17,6 @@ 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/mitaka main"
state: present
filename: "uca"
condition: "{{ ansible_lsb.codename == 'trusty' }}"
- repo: "deb http://ubuntu-cloud.archive.canonical.com/ubuntu {{ ansible_lsb.codename }}-updates/queens main"
state: present
filename: "uca"