Skip to content

Commit

Permalink
Remove percona repo if not used
Browse files Browse the repository at this point in the history
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.

Change-Id: I2ccc2904d0d4244dc0792411b49763cc3f7e2e22
Closes-Bug: 1653947
Signed-off-by: Jean-Philippe Evrard <jean-philippe.evrard@rackspace.co.uk>
  • Loading branch information
Jean-Philippe Evrard committed Jan 6, 2017
1 parent fc83b28 commit 2aa7f1c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
@@ -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.
3 changes: 1 addition & 2 deletions tasks/galera_install_apt.yml
Expand Up @@ -86,12 +86,11 @@
apt_repository:
repo: "{{ galera_percona_xtrabackup_repo.repo }}"
filename: "{{ galera_percona_xtrabackup_repo.filename }}"
state: "{{ galera_percona_xtrabackup_repo.state }}"
state: "{{ use_percona_upstream | bool | ternary('present','absent') }}"
register: add_repos
until: add_repos|success
retries: 5
delay: 2
when: use_percona_upstream | bool
tags:
- percona-repos

Expand Down

0 comments on commit 2aa7f1c

Please sign in to comment.