From d872a076db4f6c098df83938b68f2a0f807e161f Mon Sep 17 00:00:00 2001 From: Jimmy McCrory Date: Tue, 25 Apr 2017 07:24:57 -0700 Subject: [PATCH] Update galera repo url variables during upgrades Modify the 'Write vars required for upgrade' task to make use of backrefs so that any user defined variables for galera repo urls are updated for the expected release of MariaDB. Change-Id: I56aad0dd48df4f8e80d1b33a4130daa575b1814b --- .../playbooks/deploy-config-changes.yml | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade-utilities/playbooks/deploy-config-changes.yml b/scripts/upgrade-utilities/playbooks/deploy-config-changes.yml index f3dc3a1a9f..4a63d04c31 100644 --- a/scripts/upgrade-utilities/playbooks/deploy-config-changes.yml +++ b/scripts/upgrade-utilities/playbooks/deploy-config-changes.yml @@ -66,9 +66,25 @@ - name: Write vars required for upgrade lineinfile: dest: /etc/openstack_deploy/user_variables.yml - regexp: "^{{ item.key }}" + regexp: "{{ item.regexp | default('^' + item.key) }}" line: "{{ item.key }}: {{ item.value }}" + backrefs: "{{ item.backrefs | default('no') }}" state: present with_items: - key: "default_bind_mount_logs" - value: false + value: "false" + # Replace "10.0" with "10.1" within galera_repo_url + - key: "galera_repo_url" + regexp: '^galera_repo_url: (https?://.*10)\.0(.*)$' + value: '\1.1\2' + backrefs: yes + # Replace "10.0" with "10.1" within galera_client_apt_repo_url + - key: "galera_client_apt_repo_url" + regexp: '^galera_client_apt_repo_url: (https?://.*10)\.0(.*)$' + value: '\1.1\2' + backrefs: yes + # Replace "10.0" with "10.1" within galera_client_repo_url + - key: "galera_client_repo_url" + regexp: '^galera_client_repo_url: (https?://.*10)\.0(.*)$' + value: '\1.1\2' + backrefs: yes