xci: roles: configure-network: Avoid passing empty string to module 25/53425/3
authorMarkos Chandras <mchandras@suse.de>
Fri, 9 Mar 2018 16:31:13 +0000 (16:31 +0000)
committerMarkos Chandras <mchandras@suse.de>
Sat, 10 Mar 2018 09:51:02 +0000 (09:51 +0000)
The package module gets upset if we pass it an empty string as a package
name

Mar 09 15:15:33 TASK [configure-network : Ensure networking packages are present] **************
Mar 09 15:15:49 fatal: [opnfv]: FAILED! => {"changed": false, "failed":
true, "msg": "No package matching '' found available, installed or
updated", "rc": 126, "results": ["iproute-3.10.0-87.el7.x86_64 providing
iproute is already installed", "No package matching '' found available,
installed or updated"]}

As such, lets pass an existing package for non-Debian distros to make
the module happy.

Change-Id: Ib1128057097193278cfe50f79daf35332b54e781
Signed-off-by: Markos Chandras <mchandras@suse.de>
xci/playbooks/roles/configure-network/tasks/main.yml

index 21f213c..01edf45 100644 (file)
@@ -17,7 +17,7 @@
     network_packages:
       - bridge-utils
       - "{{ (ansible_pkg_mgr in ['zypper', 'apt']) | ternary('iproute2', 'iproute') }}"
-      - "{{ (ansible_pkg_mgr == 'apt') | ternary('vlan', '') }}"
+      - "{{ (ansible_pkg_mgr == 'apt') | ternary('vlan', 'bridge-utils') }}"
       - iptables
 
 - name: Ensure networking packages are present