On Jul 26, 12:20 am, David Schmitt <da...@dasz.at> wrote:
>
> Write instead:
>
> file {
>         "audit.rules":
>                 owner =>  "root",
>                 group =>  "root",
>                 mode  =>  "600",
>                 path  =>  $operatingsystem ? {
>                         default =>  "/etc/audit.rules",
>                 },
>
> }
>
> case $hardwaremodel {
>         "x86_64": { File["audit.rules"] { source =>
> "puppet:///modules/audit/audit.rules.64" } },
>         default:  { File["audit.rules"] { source =>
> "puppet:///modules/audit/audit.rules.32" } },
>
> }
>

I have to say I don't like this at all.  I think a far more clearer
definition would be like this:

file {
        "audit.rules":
                owner =>  "root",
                group =>  "root",
                mode  =>  "600",
                path  =>  "/etc/audit.rules,
                source => [
                    "puppet:///modules/audit/audit.rules.
$hardwaremodel",
                    "puppet:///modules/audit/audit.rules"
                ]
}

Then you just create a audit/files/audit.rules.x86_64 and anything
else will fall through to audit.rules.




> Best Regards, David
> --
> dasz.at OG              Tel: +43 (0)664 2602670     Web:http://dasz.at
> Klosterneuburg                                         UID: ATU64260999
>
>         FB-Nr.: FN 309285 g          FB-Gericht: LG Korneuburg

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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