8cf5a6ad56
The fix is no longer needed since a fixed aria2 package has been promoted in epel. See https://bugzilla.redhat.com/show_bug.cgi?id=1704413 This is a revert of the following changes: I7770c5417feacfc43a3ad8801125603a55ba9ea8 I26d3c9338247ffc789bf4a5291e65e954151cc51 I4ec91f541e6d2d4cca4d899f4c7d519b169e2f50 Change-Id: Ia181556e77dcc85bea726e47fc8ca1f097cc3bbb
49 lines
1.7 KiB
YAML
49 lines
1.7 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.
|
|
|
|
# Because of this post and it's related bug(s) this is adding the container
|
|
# volumes the old way. The new way would simply be calling `machinectl`.
|
|
# * https://www.mail-archive.com/systemd-devel@lists.freedesktop.org/msg28255.html
|
|
- name: Remove old image cache
|
|
command: "btrfs subvolume delete /var/lib/machines/{{ lxc_container_base_name }}"
|
|
register: cache_refresh_del
|
|
changed_when: cache_refresh_del.rc == 0
|
|
failed_when: cache_refresh_del.rc not in [0, 1]
|
|
when:
|
|
- lxc_image_cache_refresh | bool
|
|
|
|
- name: Add image cache
|
|
command: "btrfs subvolume create /var/lib/machines/{{ lxc_container_base_name }}"
|
|
register: cache_refresh_add
|
|
changed_when: cache_refresh_add.rc == 0
|
|
failed_when: cache_refresh_add.rc not in [0, 1]
|
|
when:
|
|
- lxc_image_cache_refresh | bool
|
|
|
|
- name: Ensure image has been pre-staged
|
|
async_status:
|
|
jid: "{{ prestage_image.ansible_job_id }}"
|
|
register: job_result
|
|
until: job_result.finished
|
|
retries: 60
|
|
|
|
- name: Place container rootfs
|
|
unarchive:
|
|
src: "/tmp/{{ cache_basename }}"
|
|
dest: "/var/lib/machines/{{ lxc_container_base_name }}"
|
|
remote_src: True
|
|
notify:
|
|
- Remove rootfs archive
|