mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Merge pull request #5012 from UtahDave/add_ip4_win
Add ip4 grain for Windows.
This commit is contained in:
commit
4ea70b9b85
@ -834,11 +834,7 @@ def ip4():
|
||||
Return a list of ipv4 addrs
|
||||
'''
|
||||
ips = []
|
||||
if salt.utils.is_windows():
|
||||
# TODO: Add windows ip addrs here
|
||||
pass
|
||||
else:
|
||||
ips = salt.utils.socket_util.ip4_addrs()
|
||||
ips = salt.utils.socket_util.ip4_addrs()
|
||||
return {'ipv4': ips}
|
||||
|
||||
|
||||
|
@ -276,6 +276,11 @@ def interfaces():
|
||||
'''
|
||||
Return a dictionary of information about all the interfaces on the minion
|
||||
'''
|
||||
if salt.utils.is_windows():
|
||||
from salt.modules.win_network import interfaces as win_interfaces
|
||||
ifaces = win_interfaces()
|
||||
return ifaces
|
||||
|
||||
ifaces = dict()
|
||||
if salt.utils.which('ip'):
|
||||
cmd1 = subprocess.Popen(
|
||||
|
Loading…
Reference in New Issue
Block a user