Set container create tasks to non-voting/fix pkg

There are some inter-dependencies here where the container tasks will
not pass until a few updates are in both here and elsewhere. This change
sets the container create tasks to non-voting until all of the required
updates get in.

Remove the aria2 requirement

While aria2 has some nice features, the get_url command can do most of
what we need and does so in a far more universal way. This change
removes the aria2 dependency and updates the aria2 tasks to use the
get_url module.

Change-Id: Iab422c718d789ef13b8ec55938fdb7e73e40061b
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2018-06-21 00:38:00 -05:00
parent 1bd4e81c66
commit cfb3f9e7cd
No known key found for this signature in database
GPG Key ID: 9443251A787B9FB3
9 changed files with 11 additions and 22 deletions

View File

@ -149,7 +149,6 @@ nspawn_container_distro_packages: "{{ _nspawn_container_distro_packages | defaul
# Default list of packages to install on the physical host machine. # Default list of packages to install on the physical host machine.
# nspawn_hosts_distro_packages: # nspawn_hosts_distro_packages:
# - aria2
# - bridge-utils # - bridge-utils
# - btrfs-tools # - btrfs-tools
nspawn_hosts_distro_packages: "{{ _nspawn_hosts_distro_packages | default([]) }}" nspawn_hosts_distro_packages: "{{ _nspawn_hosts_distro_packages | default([]) }}"

View File

@ -23,7 +23,7 @@
- name: Remove rootfs archive - name: Remove rootfs archive
file: file:
path: "/tmp/{{ cache_basename }}" path: "/tmp/{{ nspawn_hosts_container_image_url | basename }}"
state: "absent" state: "absent"
- name: Enable network dnsmasq service - name: Enable network dnsmasq service

View File

@ -58,7 +58,7 @@
- name: Place container rootfs - name: Place container rootfs
unarchive: unarchive:
src: "/tmp/{{ cache_basename }}" src: "/tmp/{{ nspawn_hosts_container_image_url | basename }}"
dest: "/var/lib/machines/{{ nspawn_container_base_name }}" dest: "/var/lib/machines/{{ nspawn_container_base_name }}"
remote_src: True remote_src: True
notify: notify:

View File

@ -48,22 +48,12 @@
when: when:
- nspawn_hosts_container_image_download_legacy | bool - nspawn_hosts_container_image_download_legacy | bool
- name: Set nspawn cache basename
set_fact:
cache_basename: "{{ nspawn_hosts_container_image_url | basename }}"
- name: Pre-stage the nspawn image on the system - name: Pre-stage the nspawn image on the system
shell: > get_url:
aria2c url: "{{ nspawn_hosts_container_image_url }}"
--max-connection-per-server=4 dest: "/tmp/{{ nspawn_hosts_container_image_url | basename }}"
--allow-overwrite=true validate_certs: "{{ nspawn_hosts_validate_certs | bool }}"
--dir=/tmp force: true
--out={{ cache_basename }}
--check-certificate={{ (nspawn_hosts_validate_certs | bool) | lower }}
{{ nspawn_hosts_container_image_url }}
> /var/log/aria2c-image-prestage.log 2>&1
args:
warn: no
register: prestage_image register: prestage_image
async: 300 async: 300
poll: 0 poll: 0

View File

@ -16,7 +16,6 @@
_nspawn_hosts_container_image_url: "https://github.com/CentOS/sig-cloud-instance-images/raw/CentOS-7/docker/centos-7-docker.tar.xz" _nspawn_hosts_container_image_url: "https://github.com/CentOS/sig-cloud-instance-images/raw/CentOS-7/docker/centos-7-docker.tar.xz"
_nspawn_hosts_distro_packages: _nspawn_hosts_distro_packages:
- aria2
- bridge-utils - bridge-utils
- btrfs-progs - btrfs-progs
- dbus - dbus

View File

@ -20,7 +20,6 @@ _nspawn_hosts_distro_packages:
- apparmor-parser - apparmor-parser
- apparmor-profiles - apparmor-profiles
- apparmor-utils - apparmor-utils
- aria2
- bridge-utils - bridge-utils
- btrfsprogs - btrfsprogs
- dbus-1 - dbus-1

View File

@ -16,7 +16,6 @@
_nspawn_hosts_container_image_url: "http://cdimage.ubuntu.com/ubuntu-base/releases/16.04/release/ubuntu-base-16.04.4-base-{{ nspawn_cache_map.arch }}.tar.gz" _nspawn_hosts_container_image_url: "http://cdimage.ubuntu.com/ubuntu-base/releases/16.04/release/ubuntu-base-16.04.4-base-{{ nspawn_cache_map.arch }}.tar.gz"
_nspawn_hosts_distro_packages: _nspawn_hosts_distro_packages:
- aria2
- bridge-utils - bridge-utils
- btrfs-tools - btrfs-tools
- dbus - dbus

View File

@ -16,7 +16,6 @@
_nspawn_hosts_container_image_url: "http://cdimage.ubuntu.com/ubuntu-base/releases/18.04/release/ubuntu-base-18.04-base-{{ nspawn_cache_map.arch }}.tar.gz" _nspawn_hosts_container_image_url: "http://cdimage.ubuntu.com/ubuntu-base/releases/18.04/release/ubuntu-base-18.04-base-{{ nspawn_cache_map.arch }}.tar.gz"
_nspawn_hosts_distro_packages: _nspawn_hosts_distro_packages:
- aria2
- bridge-utils - bridge-utils
- btrfs-tools - btrfs-tools
- dbus - dbus

View File

@ -26,21 +26,25 @@
name: openstack-ansible-nspawn-container-create-centos-7 name: openstack-ansible-nspawn-container-create-centos-7
parent: openstack-ansible-nspawn-container-create parent: openstack-ansible-nspawn-container-create
nodeset: centos-7 nodeset: centos-7
voting: false
- job: - job:
name: openstack-ansible-nspawn-container-create-opensuse-423 name: openstack-ansible-nspawn-container-create-opensuse-423
parent: openstack-ansible-nspawn-container-create parent: openstack-ansible-nspawn-container-create
nodeset: opensuse-423 nodeset: opensuse-423
voting: false
- job: - job:
name: openstack-ansible-nspawn-container-create-ubuntu-xenial name: openstack-ansible-nspawn-container-create-ubuntu-xenial
parent: openstack-ansible-nspawn-container-create parent: openstack-ansible-nspawn-container-create
nodeset: ubuntu-xenial nodeset: ubuntu-xenial
voting: false
- job: - job:
name: openstack-ansible-nspawn-container-create-ubuntu-bionic name: openstack-ansible-nspawn-container-create-ubuntu-bionic
parent: openstack-ansible-nspawn-container-create parent: openstack-ansible-nspawn-container-create
nodeset: ubuntu-bionic nodeset: ubuntu-bionic
voting: false
- job: - job:
name: openstack-ansible-integrated-deploy-nspawn name: openstack-ansible-integrated-deploy-nspawn