Scenario:
grains.host
breaksChecks:
salt 'minion' grains.item host
originally returned the hostname configured in /etc/hostname
(eg: minion)localhost
I tried restarting the minion (as I had to change the master url anyway), also tried the undocumented sanitized=True
, which only hides it away.
Any help is appreciated, couldn't find anything on the site.
I found recently that sometimes it does matter what are your settings in /etc/hosts
.
I had a set of hosts with FQDN like host01.company.com
. And despite the same settings, one of them was having the same issues like you have. I went to /etc/hosts
and removed record like
127.0.0.1 host01 host01.company.com
And after this and a minion restart, everything was fine immediately.
Looks like there is some kind of reverse-lookup happening to set some grains.
Hope this helps.