From 08e6c1d82b66cd5a10093ddbab4bd118ab08c7cb Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 6 Aug 2015 09:00:52 -0400 Subject: [PATCH] avoid possible errors with new broadcast handling in linux --- lib/ansible/module_utils/facts.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/facts.py b/lib/ansible/module_utils/facts.py index 84c7a95e3e..14a36dea29 100644 --- a/lib/ansible/module_utils/facts.py +++ b/lib/ansible/module_utils/facts.py @@ -1877,10 +1877,12 @@ class LinuxNetwork(Network): if not line: continue words = line.split() + broadcast = '' if words[0] == 'inet': if '/' in words[1]: address, netmask_length = words[1].split('/') - broadcast = words[3] + if len(words) > 3: + broadcast = words[3] else: # pointopoint interfaces do not have a prefix address = words[1]