Suppose I have a module that is to be installed on a large number of
clients, and one of the files it provides is /x/y/z. One a very small
number of clients, that file needs to be slightly modified. What I want to
do in the module, ideally, is something like:
file { "/x/y/z":
if (file puppet:///mymodule/$fqdn/z exists:
source => puppet:///mymodule/$fqdn/z
else:
source => puppet:///mymodule/z
Is there a way to achieve that?
Thanks,
Keith
from: http://reductivelabs.com/trac/puppet/wiki/TypeReference#file
under source:
"If you specify multiple file sources for a file, then the first
source that exists will be used. This allows you to specify what
amount to search paths for files:"
file { "/path/to/my/file":
source => [
"/nfs/files/file.$host",
"/nfs/files/file.$operatingsystem",
"/nfs/files/file"
]
}
this seems to be your solution.
cheets pete
ps: I couldn't live without that nice feature!
> from: http://reductivelabs.com/trac/puppet/wiki/TypeReference#file
> under source:
>
> "If you specify multiple file sources for a file, then the first
> source that exists will be used. This allows you to specify what
> amount to search paths for files:"
>
> file { "/path/to/my/file":
> source => [
> "/nfs/files/file.$host",
> "/nfs/files/file.$operatingsystem",
> "/nfs/files/file"
> ]
> }
>
>
> this seems to be your solution.
>
> cheets pete
>
> ps: I couldn't live without that nice feature!
YEAH ! This is the post of the week ! I was turning my head up & down to
find a way to put user & host specific authorized keys.
--
Nicolas Szalay
Administrateur systèmes & réseaux
-- _
ASCII ribbon campaign ( )
- against HTML email X
& vCards / \