Generating manifests from a running system
While cft
generates Puppet manifests from a system administrator's console session, puppet resource generates Puppet manifests from the existing configuration of a system. For example, you can have puppet resource
generate a manifest that creates all the users found on the system. This is very useful for taking a snapshot of a working system and getting its configuration quickly into Puppet.
How to do it…
- To generate the manifest for a particular user, run:
# puppet resource user john user { 'john': password_min_age => '0', password_max_age => '99999', uid => '1002', password => '!', gid => '1001', groups => ['git'], ensure => 'present', comment => 'John Arundel', home => '/home/john', shell => ...
Get Puppet 2.7 Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.