Simplify the string check for offline db migrations

The old string check was too specific which causes services like lbaasv2
and vpnaas to fail when attempting an offline migration. This change
simply makes that stdout conditional simpler.

Closes-Bug: #1705420
Change-Id: Id24aaf852df5b9d19d201763554dcbfe0275e3e2
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2017-08-17 10:36:19 -05:00
parent 2e8c127155
commit e2b171d7ad
No known key found for this signature in database
GPG Key ID: 69FEFFC5E2D9273F

View File

@ -38,7 +38,7 @@
register: _offline_migrations_check register: _offline_migrations_check
failed_when: failed_when:
- "_offline_migrations_check.rc == 1" - "_offline_migrations_check.rc == 1"
- "'Need to apply migrations from neutron contract branch' not in _offline_migrations_check.stdout" - "'Need to apply migrations' not in _offline_migrations_check.stdout"
- name: Set the fact for the required offline migrations - name: Set the fact for the required offline migrations
ini_file: ini_file:
@ -48,7 +48,7 @@
value: "True" value: "True"
when: when:
- "'stdout' in _offline_migrations_check" - "'stdout' in _offline_migrations_check"
- "'Need to apply migrations from neutron contract branch' in _offline_migrations_check.stdout" - "'Need to apply migrations' in _offline_migrations_check.stdout"
notify: Restart neutron services notify: Restart neutron services
- name: Refresh local facts - name: Refresh local facts