From 459677877a77190e94c770bbca6ed4ac76b4b7f6 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 --- 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 46bc57c4c88..80d3ee8f906 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: