|
Boolean expressions: msg#00297sysutils.puppet.user
I'm trying to write a wrapper definition for the file type to make it a bit smarter. I have a basic version working fairly well: define xfile($owner = root, $group = root, $mode = 644, $source, $backup = main, $recurse = false, $ensure = file) { file { $name: mode => $mode, owner => $owner, group => $group, backup => $backup, recurse => $recurse, ensure => $ensure, source => [ "puppet://$server/dist/$source.$host", "puppet://$server/dist/$source.$operatingsystem", "puppet://$server/dist/$source" } } The big hitch now is that FreeBSD, of course, doesn't do the "root" group. It wants "wheel". So I figure what I want to do is take a look at $group and $operatingsystem, and if need be translate "root" to "wheel". I really don't want to be specifying the group on every file. The docco is somewhat lacking in describing syntax for boolean expressions for "if" statements, so I've been trying to figure out how to express that. None of the obvious things I can think of work. Hint? Matt |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: user management: 00297, Thomas Underhill |
|---|---|
| Next by Date: | Re: Boolean expressions: 00297, Adrian Phillips |
| Previous by Thread: | openvpn recipe: comments, suggestions, helpi: 00297, Adrian Phillips |
| Next by Thread: | Re: Boolean expressions: 00297, Adrian Phillips |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |