mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix setup module explosion when a route is empty. Closes #909
This commit is contained in:
parent
d70be9adfe
commit
3d3c8a004e
1 changed files with 1 additions and 1 deletions
|
@ -473,7 +473,7 @@ class LinuxNetwork(Network):
|
||||||
continue
|
continue
|
||||||
words = output.split('\n')[0].split()
|
words = output.split('\n')[0].split()
|
||||||
# A valid output starts with the queried address on the first line
|
# A valid output starts with the queried address on the first line
|
||||||
if words[0] == command[v][-1]:
|
if len(words) > 0 and words[0] == command[v][-1]:
|
||||||
for i in range(len(words) - 1):
|
for i in range(len(words) - 1):
|
||||||
if words[i] == 'dev':
|
if words[i] == 'dev':
|
||||||
interface[v]['interface'] = words[i+1]
|
interface[v]['interface'] = words[i+1]
|
||||||
|
|
Loading…
Reference in a new issue