Merge "Follow up on "Fix error 601""

This commit is contained in:
Zuul 2020-09-07 15:20:34 +00:00 committed by Gerrit Code Review
commit e026d0d110
6 changed files with 29 additions and 22 deletions

View File

@ -26,7 +26,11 @@
become: no
connection: local
roles:
- { role: bifrost-configdrives-dynamic,
when: provision_state == "available" and maintenance | bool }
- { role: bifrost-deploy-nodes-dynamic,
when: provision_state == "available" and maintenance | bool }
- role: bifrost-configdrives-dynamic
when:
- provision_state == "available"
- maintenance | bool
- role: bifrost-deploy-nodes-dynamic
when:
- provision_state == "available"
- maintenance | bool

View File

@ -38,11 +38,12 @@
skip_items: []
register: node_info
roles:
- { role: bifrost-unprovision-node-dynamic,
when: (provision_state == "active"
- role: bifrost-unprovision-node-dynamic
when:
- provision_state == "active"
or provision_state == "deploy failed"
or provision_state == "error")
and (not maintenance | bool) }
or provision_state == "error"
- not maintenance | bool
post_tasks:
- name: "Pull ironic facts until provision state available"
os_ironic_node_info:
@ -60,10 +61,14 @@
become: no
connection: local
roles:
- { role: bifrost-configdrives-dynamic,
when: (provision_state == "available") and (not maintenance | bool) }
- { role: bifrost-deploy-nodes-dynamic,
when: (provision_state == "available") and (not maintenance | bool) }
- role: bifrost-configdrives-dynamic
when:
- provision_state == "available"
- not maintenance | bool
- role: bifrost-deploy-nodes-dynamic
when:
- provision_state == "available"
- not maintenance | bool
post_tasks:
- name: "Pull ironic facts until provision state active"
os_ironic_node_info:

View File

@ -22,7 +22,7 @@
- name: "Defined ssh_public_key_path - Error if ssh_public_key_path is not valid"
fail:
msg: "ssh_public_key_path is not valid."
when: not test_ssh_public_key_path.stat.exists | bool
when: not test_ssh_public_key_path.stat.exists
delegate_to: localhost
- name: "Defined ssh_public_key_path - Read SSH public key in"

View File

@ -18,4 +18,4 @@
register: test_image_present
- name: "Create bootable image"
include: create_bootable_image.yml
when: test_image_present.stat.exists | bool
when: test_image_present.stat.exists

View File

@ -58,8 +58,8 @@
- name: "Place sgabios.bin"
command: cp /usr/share/misc/sgabios.bin /usr/share/qemu/sgabios.bin
when:
- not test_sgabios_qemu | bool
- test_sgabios_misc | bool
- not test_sgabios_qemu.stat.exists
- test_sgabios_misc.stat.exists
# NOTE(TheJulia): In order to prevent conflicts, stop
# dnsmasq to prevent conflicts with libvirt restarting.

View File

@ -155,8 +155,7 @@
- name: "Populate keystone for Bifrost"
include: keystone_setup.yml
when:
- enable_keystone | bool
when: enable_keystone | bool
# NOTE(pas-ha) needed to e.g. pick up new interfaces after libvirt install
- name: "Refresh facts"
@ -183,14 +182,13 @@
environment: "{{ bifrost_venv_env }}"
when:
- ironic.database.host == 'localhost'
- test_created_db.changed | bool
- test_created_db.changed
- name: "Upgrade ironic DB Schema"
command: ironic-dbsync --config-file /etc/ironic/ironic.conf upgrade
environment: "{{ bifrost_venv_env }}"
when: >
ironic.database.host != 'localhost' or
not test_created_db.changed | bool
when: ironic.database.host != 'localhost'
or not test_created_db.changed
- name: "Create service folder"
file: