Re: [Puppet Users] lspci via facter

2017-01-10 Thread Cam Mac
Thanks John. That didn't work for me, not sure why, but this did: require 'facter' Facter.add("vgactrl") do confine :kernel => :linux ENV["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin" setcode do controllers = [] if Facter::Util::Resolution.which('lspci') output = Facter::Util::Resol

Re: [Puppet Users] lspci via facter

2017-01-06 Thread Cam Mac
output = Facter::Util::Resolution.exec('lspci') output.split.each {|s| if s =~ /VGA\s+compatible\s+controller/ controllers << s end } end controllers.join(',') end end On Friday, 6 J

Re: [Puppet Users] lspci via facter

2017-01-06 Thread Cam Mac
17 01:59:42 UTC, Garrett Honeycutt wrote: > > On 1/5/17 6:27 AM, Cam Mac wrote: > > Hi, > > > > I'm trying to get videocard information into facter for installation of > > drivers. I've been able to > > get to the point of getting it to work in ruby, but

[Puppet Users] lspci via facter

2017-01-05 Thread Cam Mac
Hi, I'm trying to get videocard information into facter for installation of drivers. I've been able to get to the point of getting it to work in ruby, but not in Puppet. One thing I need to do is remove non-word characters, such as brackets, hash symbols, etc, as I run a grep command in my Pupp

Re: [Puppet Users] elegant way to hash a line in a file, if present

2015-07-07 Thread Cam Mac
x27;root',# adjust as needed > }-> > file_line { 'hash_glamor': > path => '/usr/share/X11/xorg.conf.d/glamor.conf', > line => '# Load "glamoregl"', > match => 'Load "glamoregl"',

[Puppet Users] elegant way to hash a line in a file, if present

2015-06-29 Thread Cam Mac
Hi, I wanted to create a recipe for hashing a line in a file (I'd rather hash it than delete it), if the file is present and that particular line is present. I came up with a less than elegant solution and wondered whether someone knows of a better way. The file in question: /usr/share/X11/xorg

[Puppet Users] Password policy for creating users manifest for puppet windows

2013-07-01 Thread mac
Hi, I want to implement a password policy such as min_age & max_age users manifests for puppet windows. What will be the correct syntax for the same. Thanks -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and s