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, 2019 in Puppet by Jessy
2,204 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, 2019 by Sirajul
• 59,230 points

Related Questions In Puppet

0 votes
1 answer

Error saying "Package[pacman]/ensure: change from absent to present failed: Could not find package pacman"

Hey @Dipti, Add --debug --verbose to see the command ...READ MORE

answered Feb 25, 2019 in Puppet by Nandita
883 views
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, 2019 in Puppet by Haider
2,655 views
+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,062 views
+2 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, 2019 in Puppet by Sirajul
• 59,230 points
1,119 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP