Set a var for the MariaDB major version
Setting a custom MariaDB mirror URL is very tedious to maintain because operators must ensure they update the overridden repo URL every time the major version changes within the galera role. This will allow operators to set overrides for their local mirror like: galera_repo_url: "http://mirror.mydomain.com/mariadb/repo/{{ galera_major_version }}/ubuntu" Change-Id: Ie5dd27b8cffff5245724ecc79e79272086bf3b30
This commit is contained in:
@@ -43,6 +43,9 @@ galera_debconf_items: []
|
||||
galera_server_percona_distro_packages: []
|
||||
galera_mariadb_server_package: "{{ _galera_mariadb_server_package }}"
|
||||
|
||||
# The major version used to select the repo URL path
|
||||
galera_major_version: 10.1
|
||||
|
||||
# Set the URL for the MariaDB repository
|
||||
galera_repo_url: "{{ _galera_repo_url }}"
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ galera_server_upgrade_packages_remove:
|
||||
|
||||
galera_mariadb_service_name: "mariadb"
|
||||
|
||||
_galera_repo_url: "http://yum.mariadb.org/10.1/centos/7/x86_64"
|
||||
_galera_repo_url: "http://yum.mariadb.org/{{ galera_major_version }}/centos/7/x86_64"
|
||||
_galera_repo:
|
||||
name: MariaDB
|
||||
description: "MariaDB Repo"
|
||||
|
||||
@@ -45,7 +45,7 @@ galera_etc_include_dir: "/etc/mysql/conf.d"
|
||||
# The package name for mariaDB is set as a variable
|
||||
# so that it can be used in debconf later in the
|
||||
# "galera_common" role.
|
||||
_galera_mariadb_server_package: "mariadb-server-10.1"
|
||||
_galera_mariadb_server_package: "mariadb-server-{{ galera_major_version }}"
|
||||
|
||||
# NB This is specifically galera_server_mariadb_distro_packages as these
|
||||
# packages only get installed during the galera play - this is because of
|
||||
@@ -105,7 +105,7 @@ _galera_percona_xtrabackup_repo:
|
||||
state: "present"
|
||||
filename: "Percona"
|
||||
|
||||
_galera_repo_url: "http://mirror.rackspace.com/mariadb/repo/10.1/ubuntu"
|
||||
_galera_repo_url: "http://mirror.rackspace.com/mariadb/repo/{{ galera_major_version }}/ubuntu"
|
||||
_galera_repo:
|
||||
repo: "deb {{ galera_repo_url }} {{ ansible_distribution_release }} main"
|
||||
state: "present"
|
||||
|
||||
Reference in New Issue
Block a user