Fix get_hostname to handle longer computer names

This commit is contained in:
twangboy 2017-01-18 11:19:22 -07:00
parent f3ae3cd5c8
commit 7ca3fd7484

View file

@ -448,10 +448,9 @@ def get_hostname():
salt 'minion-id' system.get_hostname
'''
cmd = 'wmic computersystem get name'
cmd = 'hostname'
ret = __salt__['cmd.run'](cmd=cmd)
_, hostname = ret.split("\n")
return hostname
return ret
def set_hostname(hostname):