Merge "Adjust ordering for nova_db_setup"

This commit is contained in:
Jenkins 2017-03-02 17:34:03 +00:00 committed by Gerrit Code Review
commit 730338284e

View File

@ -13,11 +13,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Get the api_db version
command: "{{ nova_bin }}/nova-manage api_db version"
become: yes
become_user: "{{ nova_system_user_name }}"
register: nova_api_db_version
changed_when: false
tags:
- nova-db-setup
- nova-setup
- nova-command-bin
- name: Perform a Nova API DB sync
command: "{{ nova_bin }}/nova-manage --config-file /etc/nova/nova.conf api_db sync"
become: yes
become_user: "{{ nova_system_user_name }}"
changed_when: false
when:
- nova_api_db_version.stdout == "0"
tags:
- nova-db-setup
- nova-setup
@ -45,6 +58,16 @@
- nova-setup
- nova-command-bin
- name: Perform a Nova API DB sync
command: "{{ nova_bin }}/nova-manage --config-file /etc/nova/nova.conf api_db sync"
become: yes
become_user: "{{ nova_system_user_name }}"
changed_when: false
tags:
- nova-db-setup
- nova-setup
- nova-command-bin
- name: Perform a Nova DB sync
command: "{{ nova_bin }}/nova-manage --config-file /etc/nova/nova.conf db sync"
become: yes