From 997f272c4e9919f014463e49ed7306c2d978e50d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Tue, 17 Sep 2019 14:59:25 -0400 Subject: [PATCH] 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 (cherry picked from commit 459677877a77190e94c770bbca6ed4ac76b4b7f6) --- test/integration/targets/hcloud_network_info/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/integration/targets/hcloud_network_info/tasks/main.yml b/test/integration/targets/hcloud_network_info/tasks/main.yml index 46bc57c4c8..80d3ee8f90 100644 --- a/test/integration/targets/hcloud_network_info/tasks/main.yml +++ b/test/integration/targets/hcloud_network_info/tasks/main.yml @@ -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: