Avoid failures when default libvirt network does not exist
This is a follow-up change to [1]. Depending on operating system and environment configuration, default libvirt network may not exist. Right now, `Check for libvirt default network` task throws an error in this case causing nova playbook to fail. This change fixes that by instructing ansible to not throw an error if `virsh net-list` fails with "Network not found: no network with matching name" because it is acceptable to not have this network. [1] https://review.opendev.org/c/openstack/openstack-ansible-os_nova/+/899768 Change-Id: If692bc94f421bc84ad9e6d43f548b68196a9e751
This commit is contained in:
1 changed files with 1 additions and 0 deletions
@@ -16,6 +16,7 @@
- name:Get information about libvirt default network
command:"virsh net-info default"
changed_when:false
failed_when:(default_net_info.rc != 0) and ('Network not found' not in default_net_info.stderr)
register:default_net_info
- name: Disable libvirt default network # noqa:no-changed-when
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.