If there is no default config file, you want to put a default config file in
place, but otherwise, leave it alone?

If so, one way to do it would be to use "unless" or "onlyif" in your recipe.
Something like this should work (untested by me), although there may be a
"better" way to do it:

        file { "/etc/httpd/conf/httpd.conf":
                ensure => file,
                owner => root,
                group => root,
                mode => 0644,
                content => template("/var/lib/puppet/files/httpd.conf"),
                notify => Service[httpd],
                unless => "ls /etc/httpd/conf/httpd.conf"
        }


On Wed, Jul 1, 2009 at 10:47 AM, Tim Galyean <tim.galy...@gmail.com> wrote:

>
> The company I work for is getting ready to deploy a large puppet
> configuration into an existing environment. The majority of the
> servers that this will be deployed on are web servers, however some of
> them are configured different from the rest.
>
> We have a set of default config files for apache, mysql and so forth,
> however my quesiton is:
>
> Is there a way to "tell" puppet to do a sort of comparison on the
> files, so that if one does not match the default config it is ignored
> and or not replaced with the default.
>
> Any help with this is greatly appreciated, Thanks ahead of time.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to