Merge "mysql/undercloud: add condition for upgrade"

This commit is contained in:
Zuul 2018-07-17 09:08:49 +00:00 committed by Gerrit Code Review
commit d8b7b192ae
1 changed files with 6 additions and 2 deletions

View File

@ -267,14 +267,18 @@ outputs:
mysql -e "DROP DATABASE \`neutron\`;"
fi
become: true
when: {get_param: UndercloudUpgrade}
when:
- {get_param: UndercloudUpgrade}
- mariadb_enabled|bool
# https://bugs.launchpad.net/tripleo/+bug/1776570
- name: Manage mysql user for healthcheck and revoke grant
shell: |
mysql -e "CREATE USER IF NOT EXISTS \`mysql\`@\`localhost\`;"
mysql -e "REVOKE ALL PRIVILEGES, GRANT OPTION FROM \`mysql\`@\`localhost\`;"
become: true
when: {get_param: UndercloudUpgrade}
when:
- {get_param: UndercloudUpgrade}
- mariadb_enabled|bool
- name: Stop and disable mysql service
when: mariadb_enabled|bool
service: name=mariadb state=stopped enabled=no