Why the `puppetmaster` check? You might be installing a new master, so it could well not have `puppetmaster` set. I think a `no-puppet` check is enough.