hcloud_networ_info: be more resilient is network already exists

We may already have an existing network or subnet. This commit ensures
we don't raise an error in this case.
e.g: https://app.shippable.com/github/ansible/ansible/runs/143559/145/tests
pull/62464/head
Gonéri Le Bouder 5 years ago
parent 9f7b124a6f
commit 459677877a

@ -52,9 +52,9 @@
- name: verify test gather hcloud network info in check mode
assert:
that:
- hcloud_network.hcloud_network_info | selectattr('name','equalto','{{ hcloud_network_name }}') | list | count == 1
- hcloud_network.hcloud_network_info[0].subnetworks | list | count == 1
- hcloud_network.hcloud_network_info[0].routes | list | count == 1
- hcloud_network.hcloud_network_info | selectattr('name','equalto','{{ hcloud_network_name }}') | list | count >= 1
- hcloud_network.hcloud_network_info[0].subnetworks | list | count >= 1
- hcloud_network.hcloud_network_info[0].routes | list | count >= 1
- name: test gather hcloud network info with correct label selector
hcloud_network_info:

Loading…
Cancel
Save