Re: [Puppet Users] Auditing users (AD+local) and groups

2014-07-24 Thread Eduardo A Muñoz
Hi,  for this problem you would be better off with other tools.

Nevertheless you could create a facter thar list all the users in the
system and use that information in a class to check and save against a
centralized db.
On Jul 23, 2014 4:35 PM, "huhm4n"  wrote:

> I'm trying to audit local users and groups in linux and ad,local
> users,groups on windows using puppet? I looked over, all i can find is to
> audit permission of file, service status, package installation and all..is
> there a a way i can get the list of users and have module to see if there
> is new user or group added/deleted against the list? thanks in advance
>
> --
> 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/ce7c6e00-7e5a-4745-a5da-20b464b75eed%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAOA_E9JJuNSN_LvyAa2eeiqd%3D_Q7OFwFBv1%3DLnh%2BeiUUfP68cw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: [facter]Bug can't get : ipaddress_ethX

2012-11-28 Thread Eduardo A Muñoz
Haven"t read the code yet...

But cmd facter xx executes the xx plugin and print the return value. the
ipaddress_ethX are part of the ipaddress plugin that is the one that should
be executed. Nonetheless as the ipaddress plugin register the
ipaddress_ethX facters they would not show either.

On Wed, Nov 28, 2012 at 2:59 PM, Matthaus Owens wrote:

> Which facter version are you seeing this on? (`facter --version`)
>
> On Wed, Nov 28, 2012 at 9:14 AM, AnOnJoe  wrote:
> > sorry there is a typo :
> >
> > Le mercredi 28 novembre 2012 18:06:54 UTC+1, AnOnJoe a écrit :
> >>
> >> Hello,
> >> I have a problem with facter :
> >>
> >> eg:
> >>>
> >>> facter |grep ipaddress_eth1
> >>> ipaddress_eth1 => 192.168.0.254
> >>
> >> works
> >>
> >> but
> >>>
> >>> facter ipaddress_eth1
> >>
> >> return nothing
> >>
> >> Do you know how I can work with this ?
> >>
> >> thx
> >
> > --
> > 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/-/db0413060ncJ.
> >
> > 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.
>
>
>
> --
> Matthaus Owens
> Release Manager, Puppet Labs
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> 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.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
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.



Re: [Puppet Users] check if if file exists on client an master

2012-11-28 Thread Eduardo A Muñoz
I think you would want to create a fact that publish that state to the
master.

On Wed, Nov 28, 2012 at 3:26 PM, Romain Gales wrote:

> Hi pupper community,
>
> I am working with puppet on Windows and have an issue.
> I want to check what version of a package is installed.
> My idea was to add a file in the package package28112012.txt and while
> running the manifest check if that package28112012.txt exists on the agent?
> Can I define a variable reading this filename on the master?
>
> Regards and thanks in advance,
>
> Romain
>
>  --
> 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/-/tuum3dQXrYoJ.
> 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.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
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.



Re: [Puppet Users] Re: delete home directory rescurively

2012-11-26 Thread Eduardo A Muñoz
tidy puppet type works recursively too.

On Mon, Nov 26, 2012 at 2:19 PM, jcbollinger wrote:

>
>
> On Saturday, November 24, 2012 10:28:44 AM UTC-6, bluethundr wrote:
>>
>> Is there a way using puppet to delete the home directories recursively of
>> employees who have left the company?
>>
>> So far I've tried:
>>
>>file { "/export/home/user":
>> name => "$home_dir/user",
>> ensure => 'absent'
>>   }
>>
>> I also tried
>>
>>
>>
>> file{'export/home/user':
>>   name => "$home_dir/user",
>>   purge => true,
>>   recurse => true,
>>   force => true,
>>   backup => false,
>> }
>>
>> But neither worked. Is there a way to do this with puppet currently?
>>
>>
>
> If you don't want to or can't do this via User resources, then it ought to
> work to add "ensure => absent" in your second version.
>
> Alternatively, you can always resort to
>
> exec { "Remove ${user}'s Home":
>   command => "/bin/rm -rf ${home_dir}/${user}",
>   onlyif => "/usr/bin/test -e ${home_dir}/${user}"
> }
>
>
> 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/-/dDIVaCy8uOQJ.
>
> 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.
>



-- 
Eduardo A. Muñoz
GPG Key fingerprint = 175E 6AEB AD23 8EFE 0FC3 F558 9AB1 7885 40A4 ABBB
CCNA - CCNP

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
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.



Re: [Puppet Users] Unable to connect to master...

2012-11-26 Thread Eduardo A Muñoz
First.. chill pill..


Joking.

Plz copy ur puppetmasterd logging.

On Mon, Nov 26, 2012 at 5:41 AM, Rajeev Iyer wrote:

> Hi ,
>
>   I need help here. I am running my master on RHEL 64 bit and I am trying
> to connect my agent from Solaris running on Solaris 10.
> I have put the entries for both master and agent on /etc/hosts. I have
> also updated the /etc/puppet/puppet.conf for the master. When I ping the
> master the server, the connection is going through. But I am not able to
> telnet  8140 as connection to master is failing. Can someone help
> me here? I am a little desperate to get it right.
>
> Thanks in advance,
>
> Rajeev
>
> --
> 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/-/TFzFHpd2BJcJ.
> 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.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
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.



Re: [Puppet Users] Help writing a custom fact

2012-11-26 Thread Eduardo A Muñoz
Answering the requirement you could do something like.

Facter.add("websites_number") do
 setcode do
   websites = %x{/bin/ls $websitesdir}.split("\n")
   0.upto(websites - 1).each do |n|
 Facter.add("website_#{n}") do
   setcode do
   websites[n]
end
 end
 websites.size
 end
end

On Mon, Nov 26, 2012 at 2:48 AM, Michael Stahnke wrote:

> On Sun, Nov 25, 2012 at 11:00 PM, Walter Heck 
> wrote:
> > I think you might be using the wrong tool for the job, but we need a
> > little bit more information to determine that: What do you want to do
> > with these facts once you have them in puppet?
> >
> > If you are managing websites with puppet, you should probably manage
> > the folders themselves with puppet, removing your need for the fact.
> >
> > cheers,
> >
> > Walter
> >
> > On Sun, Nov 25, 2012 at 10:16 PM, frap  wrote:
> >> I'm trying to write a custom fact for Puppet, but I have next to no Ruby
> >> experience. I think what I'm trying to do is straightforward, but
> because of
> >> Facter's key => value pairs model, it's kind of difficult.
>
> Could you do something like website_count =>  ? Then you might not
> need to list them out.  Either way, you can comma separate strings and
> use things like split in Puppet (and maybe stdlib) to do some things.
> I used dozens of custom facts in my environment in the past, so I
> can't tell you if this is *wrong* way per say.  It's a way. Go for it
> until you find something better.
>
> Also note, if you're not really into writing ruby facts, you could use
> something in facts.d that is provided via stdlib. That just reads
> values from files.  You could write your fact in whatever language you
> want, run it in cron or something and then have it dump results from
> /etc/facter/facts.d or /etc/puppetlabs/facter/facts.d.
>
> stdlib: http://forge.puppetlabs.com/puppetlabs/stdlib
>
> >>
> >> Each hosts I want the fact for has websites in /var/www/html/ - I want
> to be
> >> able to do the following:
> >>
> >> Have a fact called "websites" that will tell me how many folders there
> are
> >> under /var/www/html
> >>
> >> Have a list of facts called website_1, website_2, website_3 which will
> tell
> >> me the names of these sites. Either that or have an array (if that's
> even
> >> possible) called website_names which will then list all the websites
> under
> >> that key.
> >>
> >> If possible, I'd like the fact to be able to figure out how many
> websites
> >> there are with the original "websites" fact and limit the number of
> websites
> >> underneath.
> >>
> >> Any help gratefully appreciated.
> >>
> >> --
> >> 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/-/XBkAAkifbZ4J.
> >> 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.
> >
> >
> >
> > --
> > Walter Heck
> >
> > --
> > Check out my startup: Puppet training and consulting @
> http://www.olindata.com
> > Follow @olindata on Twitter and/or 'Like' our Facebook page at
> > http://www.facebook.com/olindata
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> > 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.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> 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.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
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.