Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auto-generate puppet manifests?

Tags:

puppet

Is it possible to auto-generate Puppet manifests from an existing system?

For example, if we need to deploy a site to a pre-configured VPS or shared server, is there a tool which could query a server then generate puppet manifests to mirror what it found? (distro, app versions, etc)

like image 980
joemaller Avatar asked Oct 04 '22 20:10

joemaller


1 Answers

You can use puppet resource [type] for that, but be selective. You don't want a huge manifest, just manage what is important.

To get a list of installed packages:

puppet resource package

Get a specific package with version:

puppet resource package httpd

Files:

puppet resource file /etc/httpd/conf.d/example.conf
like image 133
Ger Apeldoorn Avatar answered Oct 07 '22 18:10

Ger Apeldoorn