On Mon, 28 Jun 2010, Mohamed Lrhazi wrote:
> file { "/etc/ldap.conf":
>         owner   => root,
>         group   => nscd,
>         mode    => 640,
>         content => template("gu_auth/ldap.conf.rb"),
>         onlyifnot => "grep -E '^PUPPET ME NOT' '/etc/ldap.conf'",
>     }

"onlyif" doesn't work on file resources, but see bug #651.
For now, you can fake it like this:

file { "/etc/ldap.conf.puppet":
        owner   => root,
        group   => nscd,
        mode    => 640,
        content => template("gu_auth/ldap.conf.rb"),
}
exec { "update /etc/ldap.conf":
        command => "cp /etc/ldap.conf.puppet /etc/ldap.conf",
        unless =>  "grep -E '^PUPPET ME NOT' /etc/ldap.conf",
}

--apb (Alan Barrett)

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

Reply via email to