Fixed if to look for puppetmaster instead of puppet
explicit certname for puppetmaster