Ask Your Question

Is there a way for puppetmaster to automatically detect a new machine in the environment and install agent on it?

asked 2016-03-04 12:44:38 -0600

shagone gravatar image

I am working on a pretty dynamic environment where machines are being frequently added and removed. So I would like to know if there is a way with any of the puppet versions to automatically detect a new machine in our environment and automatically install agent on it and on the same line, will it be able to detect a machine which is been pulled off the environment and delete the node from the master machine. Thanks.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2016-03-04 17:28:17 -0600

lavaman gravatar image

No. There is no way for the puppet master to be "aware" of anything that hasn't checked in (or had mcollective installed and configured).

edit flag offensive delete link more

answered 2016-03-04 21:54:43 -0600

DarylW gravatar image

If you are working in a cloud based environment, you would be able to utilize the API to periodically check the status of your account against the information in the puppet master.

We do something like this to clean up removed instances from a cron that runs on our puppet master.

We get a list of all the ec2 hosts in our account, and compare that against the list of certs from 'puppet cert list --all'. If the server isn't in our ec2 list of hosts, we remove it from the puppet master.

edit flag offensive delete link more

answered 2016-03-05 12:17:14 -0600

rjc gravatar image

Since puppet doesn't use 'push deployment', there is no such option - you will have to solve it in your own way, either by pre-installing agent on all of your clients at build time and then using pre-signed generic certificate ( or use certificate autosigning ( On an untrusted network, use the former.

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: 2016-03-04 12:44:38 -0600

Seen: 248 times

Last updated: Mar 05 '16