48 lines
2.0 KiB
YAML
48 lines
2.0 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', inventory_hostname) }}"
|
|
|
|
- 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 is success
|
|
retries: 3
|
|
delay: 10
|
|
delegate_to: "{{ (galera_server_extra_package_downloader == 'deployment-host') | ternary('localhost', inventory_hostname) }}"
|
|
|
|
- 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 is success
|
|
retries: 5
|
|
delay: 10
|