Am Freitag, 13. Januar 2017 18:23:31 UTC+1 schrieb Warron French:
>
> Hi, I need to understand how to properly write some puppet code that will 
> take files off of an NFS share on serverA and place them on my clients via 
> a puppet module.
>
> My NFS server is *serverA.home*, providing serverA:/some/path that mounts 
> on my clients
> my puppet master is *puppetmaster.home*,
>
> I believe (please correct me) that I can create a puppet file resource and 
> then use the attribute called *source*.
>
> I don't know how to properly implement the source attribute with respect 
> to my nfs server *serverA.home*.  Does the NFS mount need to be on the 
> client machines, or available to the *puppetmaster.home* host?
>


if the nfs share is mounted on all clients you could just reference it as a 
local file on the server:

file { '/bli/bla/blup':
  ...
  source => '/nfs/share/bli/bla/blup',
  ...
}

this '/nfs/share/bli/bla/blup' is not evaluated on the puppetmaster but 
only on the client.



if the share is mounted on the master only you might configure another 
fileserver.conf entry: 
https://docs.puppet.com/puppet/latest/config_file_fileserver.html

you then reference IMHO like this:


file { '/bli/bla/blup':
  ...
  source => 'puppet:///mount_point_name/bli/bla/blup',
  ...
}

I personally would not introduce a dependency on the nfs share on the 
puppet master. If the nfs server is not available I'd expect the whole 
puppet master to lock up. I'd at least would think about rsync'ing them 
locally or even creating something like a puppet module only containing the 
data.
 
- Thomas 

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/9b4f498a-d870-43b2-92a9-d194a0551b4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to