Fix issue where id was only assigned if there was no fqdn
Fix issue where id was only assigned if there was no fqdn

Fix from #4422

saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt