Files
openstack-ansible-galera_se…/tasks/galera_install_download_extra_packages.yml
Jesse Pretorius 1075fe411a Restore support for percona packages when using ppc64le
In https://review.openstack.org/535252 the installation
process for the role was simplified, but an unintentional
side-effect was to removed the previously included support
for installing the extra percona packages when installing
on the ppc64le platform.

This patch re-introduces that ability, but scopes it to
only execute on that hardware platform, and only for Ubuntu.

The download is, by default, facilitated through the deploy
node (rather than the target nodes) so that the download
is done once, then pushed to the targets. This can be
adjusted with the right parameters to download from the
targets instead.

Also, in https://review.openstack.org/543888 adjustments
were made to disable compression/qpress on architectures
other than x86_64, and to fail the role execution if it
was enabled on any other architecture. This has been
corrected to ensure that compression is enabled by default
for ppc64le on Ubuntu, and enabled by default for x86_64,
but disabled by default for all other combinations. The
fail task is adjusted appropriately and moved to the main
task file so that it executes and fails out before any
changes are made.

Change-Id: I850a37b465a427a827e357111942973457fafa0d
2018-02-23 16:48:15 +00:00

48 lines
1.9 KiB
YAML

---
# Copyright 2016, 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.
- name: Ensure that galera_server_extra_package_paths exist
file:
path: "{{ galera_server_extra_package_path }}/{{ item.key }}"
state: directory
with_dict: "{{ galera_server_percona_distro_packages_alt_arch }}"
delegate_to: "{{ (galera_server_extra_package_downloader == 'deployment-host') | ternary('localhost', omit) }}"
- name: Download extra packages
get_url:
url: "{{ item.value.url }}"
dest: "{{ galera_server_extra_package_path }}/{{ item.key }}/"
checksum: "{{ item.value.checksum | default(omit) }}"
force: "{{ item.value.checksum is not defined }}"
validate_certs: "{{ galera_server_extra_package_validate_certs }}"
with_dict: "{{ galera_server_percona_distro_packages_alt_arch }}"
register: fetch_url
until: fetch_url | success
retries: 3
delay: 10
delegate_to: "{{ (galera_server_extra_package_downloader == 'deployment-host') | ternary('localhost', omit) }}"
- name: Copy downloaded packages from deployment-host to target-host
copy:
src: "{{ galera_server_extra_package_path }}/{{ item.key }}/{{ item.value.url | basename }}"
dest: "{{ galera_server_extra_package_path }}/{{ item.key }}/"
with_dict: "{{ galera_server_percona_distro_packages_alt_arch }}"
when:
- galera_server_extra_package_downloader == "deployment-host"
register: file_copy
until: file_copy | success
retries: 5
delay: 10