Error: Could not find node statement with name 'default' or 'puppetserver.example.com, puppetserver.example, puppetserver, localhost' on node puppetserver.example.com

0 votes

i'm getting the above error when trying to apply site.pp on server.

my site.pp is as below:

node 'windows.example.com' {
$iis_features = ['Web-WebServer','Web-Scripting-Tools']
iis_feature { $iis_features:
  ensure => 'present',
}
}

the below snippet is puppet.conf

[master]
vardir = /opt/puppetlabs/server/data/puppetserver
logdir = /var/log/puppetlabs/puppetserver
rundir = /var/run/puppetlabs/puppetserver
pidfile = /var/run/puppetlabs/puppetserver/puppetserver.pid
icodedir = /etc/puppetlabs/code
dns_alt_names=puppetserver.example.com,puppetmaster,puppet
#environmenpath = /etc/puppet/environments
#basemodulepath = /etc/puppet/environments/production/modules:/opt/puppetlabs/puppet/modules
[main]
certname = puppetserver.example.com
server = puppetserver.example.com
environment = production
runinterval = 5s
Aug 5 in Puppet by Jessy
10 views

1 answer to this question.

0 votes
When you apply a catalog or a main manifest, a node definition that matches the client certificate is required. In this case, matching node definitions for your Puppet Master would be:

puppetserver.example.com, puppetserver.example, pupetserver, localhost

neither of these come in your node definition.

To resolve this, you can simply add a node definition for your Puppet Server. Since you are executing puppet apply on the server, the manifest is being applied locally.
answered Aug 5 by Sirajul
• 19,070 points

Related Questions In Puppet

0 votes
1 answer
0 votes
1 answer

Error: Could not find init script for 'puppet' - Puppet error

You need to be running your processes ...READ MORE

answered Mar 12 in Puppet by Haider
101 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
122 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Error: Could not find class git::config for xxxx on node xxxx

You should note that you cannot call include on git::config. git::config is a ...READ MORE

answered Jul 31 in Puppet by Sirajul
• 19,070 points
44 views