parent
01dcdd2a92
commit
67ce675c37
@ -0,0 +1,43 @@
|
|||||||
|
diff -ur a/salt/grains/core.py b/salt/grains/core.py
|
||||||
|
--- a/salt/grains/core.py 2017-05-15 13:04:13.484215822 -0600
|
||||||
|
+++ b/salt/grains/core.py 2017-05-15 13:08:08.626518175 -0600
|
||||||
|
@@ -1678,14 +1678,10 @@
|
||||||
|
|
||||||
|
ret = {}
|
||||||
|
ret['ipv4'] = salt.utils.network.ip_addrs(include_loopback=True)
|
||||||
|
- _fqdn = hostname()['fqdn']
|
||||||
|
- sockets = [(socket.AF_INET, '4')]
|
||||||
|
-
|
||||||
|
- if __opts__.get('ipv6', True):
|
||||||
|
- ret['ipv6'] = salt.utils.network.ip_addrs6(include_loopback=True)
|
||||||
|
- sockets.append((socket.AF_INET6, '6'))
|
||||||
|
+ ret['ipv6'] = salt.utils.network.ip_addrs6(include_loopback=True)
|
||||||
|
|
||||||
|
- for socket_type, ipv_num in sockets:
|
||||||
|
+ _fqdn = hostname()['fqdn']
|
||||||
|
+ for socket_type, ipv_num in ((socket.AF_INET, '4'), (socket.AF_INET6, '6')):
|
||||||
|
key = 'fqdn_ip' + ipv_num
|
||||||
|
if not ret['ipv' + ipv_num]:
|
||||||
|
ret[key] = []
|
||||||
|
@@ -1763,7 +1759,7 @@
|
||||||
|
# Provides:
|
||||||
|
# ip_interfaces
|
||||||
|
|
||||||
|
- if salt.utils.is_proxy() or not __opts__.get('ipv6', True):
|
||||||
|
+ if salt.utils.is_proxy():
|
||||||
|
return {}
|
||||||
|
|
||||||
|
ret = {}
|
||||||
|
@@ -1807,10 +1803,8 @@
|
||||||
|
return {}
|
||||||
|
|
||||||
|
resolv = salt.utils.dns.parse_resolv()
|
||||||
|
- keys = ['nameservers', 'ip4_nameservers', 'sortlist']
|
||||||
|
- if __opts__.get('ipv6', True):
|
||||||
|
- keys.append('ip6_nameservers')
|
||||||
|
- for key in keys:
|
||||||
|
+ for key in ('nameservers', 'ip4_nameservers', 'ip6_nameservers',
|
||||||
|
+ 'sortlist'):
|
||||||
|
if key in resolv:
|
||||||
|
resolv[key] = [str(i) for i in resolv[key]]
|
||||||
|
|
Loading…
Reference in new issue