简体   繁体   中英

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)

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM