mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #13100 from ghislainbourgeois/patch-2
Fix get_dns_facts on inexistent resolv.conf
This commit is contained in:
commit
74d76105aa
1 changed files with 1 additions and 1 deletions
|
@ -727,7 +727,7 @@ class Facts(object):
|
|||
|
||||
def get_dns_facts(self):
|
||||
self.facts['dns'] = {}
|
||||
for line in get_file_lines('/etc/resolv.conf'):
|
||||
for line in get_file_content('/etc/resolv.conf', '').splitlines():
|
||||
if line.startswith('#') or line.startswith(';') or line.strip() == '':
|
||||
continue
|
||||
tokens = line.split()
|
||||
|
|
Loading…
Reference in a new issue