Remove percona repo if not used
If the ``use_percona_upstream`` value is changed from True to False, don't remove the existing repository. This is also the source of a bug in Mitaka: We were installing the repo by default and installed the percona-xtrabackup tool with a deb file. If another playbook/role installed percona-xtrabackup, it would override (and probably upgrade) the deb installed version, which is undesired. Combined backport of: - https://review.openstack.org/#/c/417362/ - https://review.openstack.org/#/c/417776/ - https://review.openstack.org/#/c/416234/ Change-Id: Ibb2f01e6b61774a2517feb5baf4a5452b7f68a84 Closes-Bug: 1653947 Signed-off-by: Jean-Philippe Evrard <jean-philippe.evrard@rackspace.co.uk>
This commit is contained in:
parent
fab09fe391
commit
4a2ad19948
@ -0,0 +1,6 @@
|
||||
---
|
||||
features:
|
||||
- The filename of the apt source can now be defined
|
||||
with the variable ``filename`` inside the dicts
|
||||
``galera_repo`` and
|
||||
``galera_percona_xtrabackup_repo``.
|
@ -0,0 +1,9 @@
|
||||
---
|
||||
fixes:
|
||||
- The percona repository stayed in placed even after
|
||||
a change of the variable ``use_percona_upstream``.
|
||||
From now on, the percona repository will not be
|
||||
present unless the deployer decides to
|
||||
``use_percona_upstream``. This also fixes a bug
|
||||
of the presence of this apt repository after an
|
||||
upgdrade from Mitaka.
|
@ -75,28 +75,25 @@
|
||||
|
||||
- name: Add galera repo
|
||||
apt_repository:
|
||||
repo: "{{ item.repo }}"
|
||||
state: "{{ item.state }}"
|
||||
repo: "{{ galera_repo.repo }}"
|
||||
filename: "{{ galera_repo.filename | default(omit) }}"
|
||||
state: "{{ galera_repo.state }}"
|
||||
register: add_repos
|
||||
until: add_repos|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items:
|
||||
- "{{ galera_repo }}"
|
||||
tags:
|
||||
- galera-repos
|
||||
|
||||
- name: Add percona repo
|
||||
apt_repository:
|
||||
repo: "{{ item.repo }}"
|
||||
state: "{{ item.state }}"
|
||||
repo: "{{ galera_percona_xtrabackup_repo.repo }}"
|
||||
filename: "{{ galera_percona_xtrabackup_repo.filename | default(omit) }}"
|
||||
state: "{{ use_percona_upstream | bool | ternary('present','absent') }}"
|
||||
register: add_repos
|
||||
until: add_repos|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items:
|
||||
- "{{ galera_percona_xtrabackup_repo }}"
|
||||
when: use_percona_upstream | bool
|
||||
tags:
|
||||
- percona-repos
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user