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
65 lines
2.3 KiB
YAML
65 lines
2.3 KiB
YAML
---
|
|
# Copyright 2014, 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: Prepare the package list
|
|
set_fact:
|
|
galera_packages_list: |-
|
|
{% set packages = galera_server_required_distro_packages + galera_server_mariadb_distro_packages %}
|
|
{% if ansible_architecture == 'x86_64' %}
|
|
{% set _ = packages.extend(galera_server_percona_distro_packages) %}
|
|
{% endif %}
|
|
{% if ansible_architecture == 'ppc64le' and ansible_distribution == 'Ubuntu' %}
|
|
{% for extra_package in galera_server_percona_distro_packages_alt_arch['ansible_architecture'] %}
|
|
{% set _package_path = galera_server_extra_package_path ~ '/' ~ ansible_architecture %}
|
|
{% set _ = packages.append(_package_path ~ '/' ~ extra_package['url'] | basename) %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{{ packages }}
|
|
|
|
- name: Download the extra packages
|
|
include_tasks: galera_install_download_extra_packages.yml
|
|
when:
|
|
- ansible_architecture == 'ppc64le'
|
|
|
|
- name: Remove conflicting distro packages
|
|
package:
|
|
name: "{{ galera_server_mariadb_distro_packages_remove | default([]) }}"
|
|
state: absent
|
|
|
|
- include_tasks: "galera_install_{{ ansible_pkg_mgr }}.yml"
|
|
|
|
- name: Install pip packages
|
|
pip:
|
|
name: "{{ galera_pip_packages }}"
|
|
state: "{{ galera_pip_package_state }}"
|
|
extra_args: >-
|
|
{{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }}
|
|
{{ pip_install_options | default('') }}
|
|
register: install_packages
|
|
until: install_packages|success
|
|
retries: 5
|
|
delay: 2
|
|
|
|
- name: Record galera has been deployed
|
|
ini_file:
|
|
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
|
|
section: galera
|
|
option: deployed
|
|
value: true
|
|
|
|
- name: Set the galera existing cluster fact
|
|
set_fact:
|
|
galera_deployed: true
|