Skip to content

Commit

Permalink
MNAIO: Use single vars file for Ubuntu trusty/xenial/bionic
Browse files Browse the repository at this point in the history
Given there is almost no difference between the releases, we can
use the same vars file and simple conditionals. The package
'software-properties-common' is available for Trusty & Xenial so
we just use that and remove the unnecessary extra package.

We also now add the correct UCA repositories for Trusty and Bionic
so that we get the latest version of libvirt.

Finally, we simplify the conditional for the iptables binary to
make it far easier to read.

Change-Id: Id4b3711a4d7a0ccc13db956d41017ac01c97825f
  • Loading branch information
Jesse Pretorius committed Aug 13, 2018
1 parent 62039aa commit 241837f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 58 deletions.
56 changes: 0 additions & 56 deletions multi-node-aio/playbooks/vars/ubuntu-18.04.yml

This file was deleted.

11 changes: 9 additions & 2 deletions multi-node-aio/playbooks/vars/ubuntu.yml
Expand Up @@ -17,10 +17,18 @@ 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"
condition: "{{ ansible_lsb.codename == 'xenial' }}"
- repo: "deb http://ubuntu-cloud.archive.canonical.com/ubuntu {{ ansible_lsb.codename }}-updates/rocky main"
state: present
filename: "uca"
condition: "{{ ansible_lsb.codename == 'bionic' }}"

mnaio_host_distro_packages:
- bridge-utils
Expand All @@ -32,7 +40,6 @@ mnaio_host_distro_packages:
- openssh-server
- python2.7
- python-lxml
- python-software-properties
- qemu-kvm
- qemu-utils
- software-properties-common
Expand All @@ -52,6 +59,6 @@ mnaio_dhcp_distro_packages:
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') }}"
mnaio_host_iptables_service: "{{ (ansible_lsb.codename == 'trusty') | ternary('iptables-persistent', 'netfilter-persistent') }}"

ssh_service_name: ssh

0 comments on commit 241837f

Please sign in to comment.