joemaller
joemaller

Reputation: 20556

Auto-generate puppet manifests?

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)

Upvotes: 5

Views: 2528

Answers (1)

Ger Apeldoorn
Ger Apeldoorn

Reputation: 1232

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

Upvotes: 4

Related Questions