Ask Your Question

Where do I specify the puppet agent name?

asked 2014-07-01 05:38:03 -0600

Narven gravatar image

updated 2014-07-01 05:39:18 -0600


I have some puppet agents running which are calling different nodes. But right now I have a problem because one of the agents e calling a different node on the puppet master.

Where do I in the agent specify the name that must match to the node where is getting the "blueprint"? In /etc/puppet/puppet.conf ?

PS: Really newbie at this puppet stuff, just trying to improve/fix some previous automation made by somebody else. Apologize for any technical word not applied correctly.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-07-01 06:25:53 -0600

Gary S gravatar image

The agent's hostname is given to the Puppet server when the agent calls in. This is what the Puppet server uses to decide which node classification should be applied to the node.

So, you don't specify an agent's (or client's) name in /etc/puppet/puppet.conf, you specify it by setting the correct hostname on the host itself.

edit flag offensive delete link more


the problem is that when i run "puppet agent --test --debug" it tells me: Could not find default node or by name with 'stagef' on node stagef

Narven gravatar imageNarven ( 2014-07-01 07:00:32 -0600 )edit

are you running the master and agent on the same node?? in only ask because "or by name with 'stagef' on node stagef" sounds as if you might be.. anyway, i don't think that really matters.. on the client try; hostname -f then look for the hostname you got, within your node definitions. assuming you are not using regular expressions to define a range of nodes, you will need to ensure that the problem hostname appears within your node definitions somewhere.

Gary S gravatar imageGary S ( 2014-07-01 07:28:39 -0600 )edit

in my client server when i run "hostname -f" i get "stagef"... on master... i get "ci" which is correct. no, im not using regular expressions. just basic: node 'stagef' { include repo include java include ant }

Narven gravatar imageNarven ( 2014-07-01 08:13:44 -0600 )edit

well then i'm not quite sure i'm afraid Narven. i can tell you that the error message in your first comment is normal when client does not have a node definition in a valid manifest file. perhaps the file containing the 'stagef' node definition is not being auto loaded.. try putting the 'stagef' node definition into a file containing definitions that are working. sorry i can't be of more assistance..

Gary S gravatar imageGary S ( 2014-07-02 17:33:32 -0600 )edit

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: 2014-07-01 05:38:03 -0600

Seen: 977 times

Last updated: Jul 01 '14