On Wednesday, July 4, 2012 2:37:06 PM UTC-5, eduardo wrote:
>
> To be more clear about my first intend. it had init.pp  like : 
>
>   file { "/etc/puppet/whitelist": 
>          ensure => present, 
>          source => 'puppet:///files/whitelist', 
>        } 
>
>   $users_local =  split($localusers, '[,]') 
>
>
>
> ----- facter 
>  require 'etc' 
>
>  Facter.add("localusers") do 
>   setcode do 
>
>        # Whitelist users to exclude for checking valid ssh users 
>
>        whitelist = Array.new 
>
>        File.readlines("/etc/puppet/whitelist").each { |line| 
>
>            whitelist << line.chomp 
>        } 
> ----- 
>
>
>
> On 4 jul, 15:07, eduardo <erodr...@gmail.com> wrote: 
> > Dears all, 
> > 
> >  I was testing my localusers facter by puppetmaster fileserver but i'd 
> > got in error 
> > 
> >   Could not retrieve localusers: No such file or directory - /etc/ 
> > puppet/whitelist 
> > 
> >  I was pretending the file was served by fileserver of puppetmaster 
> > doing in init.pp : 
> > 
> >   file { "/etc/puppet/whitelist": 
> >        ensure => present, 
> > 
> >  Just before to call a facter. 
> > 
> >  I don't pretty sure but seems to me a issue about workflow 
> > 
> >   Client pluginsync -> Client discover system Facts -> Master 
> > compilation -> Client apply catalog -> Client report. 
> > 
> >   Is there any way to get a file from puppetmaster to be read it by a 
> > facter ?. 
> > 
> >   If it's not, I appreciate any suggestion about it. 
>
 

Facter runs after pluginsync (if enabled) and before any resources (such as 
your whitelist file) are synchronized.  It must be so because the master 
needs the node facts to compile a catalog, and the agent uses the catalog 
to synchronize resources.

What you are attempting to do sounds dubious, however.  If the master knows 
what users are supposed to be whitelisted (in order to provide the needed 
file) then it shouldn't need facter to tell it.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/1DOQXx9ya-IJ.
To post to this group, send email to puppet-users@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