Ask Your Question

How do you run a manifest on Puppet Master to Puppet Agent?

asked 2015-06-07 00:32:39 -0600

Anthony57 gravatar image

updated 2015-06-07 08:59:12 -0600

csharpsteen gravatar image

I have a manifest that I want to run from puppet master. I have SSH set up between two Ubuntu servers (where one runs the Master and the other the Agent). I have ran one manifest successfully from the puppet master server to the puppet agent server. But I cannot run a second manifest that is slightly different. Here is what I try to do:

root@puppet:/home/ubuntu# puppet apply quitebasic.pp

Here is the output (which doesn't address the target node defined by its hostname in the .pp file):

Error: Could not find default node or by name with ',,, puppet' on node
Error: Could not find default node or by name with ',,, puppet' on node\

Why am I getting this output? The DNS name in the message is for the Puppet Master server. Maybe I don't need to run the puppet apply command. If that is the case,how do I get this manifest to get picked up when the Puppet Agent server runs this following command?

puppet agent -t --verbose

The above command has worked before to apply a manifest before. I ran it from the agent server.

I thought I had to compile the manifest into the catalog on the Puppet Master server.

Here is the content of quitebasic.pp:

node 'coolServer' {
user { 'bluemaid' :
        name => 'bluemaid',
        ensure => present,
        shell => '/bin/bash',
        password => '*',
        home => '/home/bluemaid/',
        system => true,
        managehome => true,
        comment => 'foo',
file { '/home/bluemaid/':
        ensure => directory,
        owner => root
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2015-06-07 09:15:50 -0600

csharpsteen gravatar image

updated 2015-06-07 09:16:10 -0600

Puppet uses the name recorded in the node's SSL certificate to match node definitions. Additionally, if strict_hostname_checking is set to false (the default), Puppet will also use the hostnames returned by DNS.

Thus, the following message lists all the names the Puppet compiler could use to match this node against a node definition:

Error: Could not find default node or by name with ',,, puppet' on node

The name coolServer is not in that list of names, so the compiler did not find a node definition to use.

Another thing to note is that SSL names are case-sensitive and the Puppet CA always downcases hostnames when issuing certificates in order to remove case sensitivity from the system. Therefore, camel cased node names like coolServer will be problematic and may never match any node's certname.

edit flag offensive delete link more

answered 2015-06-07 22:40:03 -0600

Anthony57 gravatar image

Thanks for the response.

I have passwordless SSH configured between my servers which now include one master and two puppet agents. I eliminated the camel case in the manifest. In my puppet.conf file, stricthostnamechecking wasn't a setting.

How do I add nodes to Puppet Master? I believe the catalog is where the nodes are stored. The certificates may come into play. I want to run manifests against other servers. I've successfully applied manifests to two Puppet Agent servers. But only on the initial time each Puppet Agent client connected to the Puppet Master host. I'm not even sure how I did it. I cannot get other manifests to run.

I ran into problems after that first time for both of the Puppet Agents. I want to compile additional manifests with specific nodes. But the first thing I need to do is enable the Puppet master to see more nodes (per your response). The manifests have all lower case DNS names for where the "node" is defined. The Puppet Master's /etc/hosts file is updated. I evidently haven't done enough. I keep getting my original error.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-06-07 00:32:39 -0600

Seen: 3,018 times

Last updated: Jun 07 '15