Allow override of the repo filename
Apt cannot have 2 mirrors with the same content in 2 different files. If a deployer has an apt mirror with mariadb (and others), the deployer still need to add a repository, but will also need to define the filename used, in order to avoid clashes. This commit makes possible to decide the filename for the repo. Change-Id: Ic83d464512f6f8697e520d79520dcf21370f8beb Signed-off-by: Jean-Philippe Evrard <jean-philippe.evrard@rackspace.co.uk>
This commit is contained in:
parent
8fd03f2f41
commit
8935c29e70
|
@ -37,3 +37,5 @@ galera_client_fatal_deprecations: false
|
||||||
|
|
||||||
## Tunable overrides
|
## Tunable overrides
|
||||||
galera_client_my_cnf_overrides: {}
|
galera_client_my_cnf_overrides: {}
|
||||||
|
|
||||||
|
mariadb_repo_filename: "MariaDB"
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
features:
|
||||||
|
- The filename of the apt/yum source can now be
|
||||||
|
defined with the variable ``mariadb_repo_filename``.
|
|
@ -58,7 +58,7 @@
|
||||||
# statically named apt sources file.
|
# statically named apt sources file.
|
||||||
- name: Find old sources
|
- name: Find old sources
|
||||||
command: >
|
command: >
|
||||||
grep -rnil maria /etc/apt/sources.list.d/ --exclude MariaDB.list
|
grep -rnil maria /etc/apt/sources.list.d/ --exclude {{ mariadb_repo_filename }}.list
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
register: old_sources
|
register: old_sources
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
- name: Add galera repo
|
- name: Add galera repo
|
||||||
apt_repository:
|
apt_repository:
|
||||||
repo: "{{ galera_client_repo }}"
|
repo: "{{ galera_client_repo }}"
|
||||||
filename: MariaDB
|
filename: "{{ mariadb_repo_filename }}"
|
||||||
state: present
|
state: present
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
register: add_repo
|
register: add_repo
|
||||||
|
|
|
@ -18,7 +18,7 @@ galera_client_repo:
|
||||||
state: "present"
|
state: "present"
|
||||||
name: MariaDB
|
name: MariaDB
|
||||||
description: "MariaDB Repo"
|
description: "MariaDB Repo"
|
||||||
file: MariaDB
|
file: "{{ mariadb_repo_filename }}"
|
||||||
baseurl: "{{ galera_client_yum_repo_url }}"
|
baseurl: "{{ galera_client_yum_repo_url }}"
|
||||||
gpgkey: "http://yum.mariadb.org/RPM-GPG-KEY-MariaDB"
|
gpgkey: "http://yum.mariadb.org/RPM-GPG-KEY-MariaDB"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue