mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Clean up hostname grain a bit
This commit is contained in:
parent
5c1f559ab6
commit
a09fc4584e
@ -129,9 +129,11 @@ def hostname():
|
||||
stdout=subprocess.PIPE).communicate()[0].strip()
|
||||
domain = subprocess.Popen(['dnsdomainname'],
|
||||
stdout=subprocess.PIPE).communicate()[0].strip()
|
||||
return {'host': host,
|
||||
'domain': domain,
|
||||
'fqdn': host + '.' + domain}
|
||||
grains = {'host': host}
|
||||
if domain:
|
||||
grains['domain'] = domain
|
||||
grains['fqdn'] = host + '.' + domain
|
||||
return grains
|
||||
|
||||
def path():
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user