mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
commit
1a4f244a88
1 changed files with 1 additions and 0 deletions
|
@ -461,6 +461,7 @@ def hostname():
|
|||
comps = grains['fqdn'].split('.')
|
||||
grains['host'] = comps[0]
|
||||
grains['localhost'] = socket.gethostname()
|
||||
grains['localfqdn'] = __salt__['cmd.run']('hostname -f').strip()
|
||||
if len(comps) > 1:
|
||||
grains['domain'] = '.'.join(comps[1:])
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue