Re: [Puppet Users] Re: Clarification on mount type behaviour

2017-03-30 Thread Stefan Schulte
Hi On 30.03.2017 14:57, jcbollinger wrote: mounted. But perhaps it doesn't have to be limited that way. Expanding its scope to cover the options with which the filesystem is actually mounted seems like a reasonable feature request. And if you don't want to wait, then very likely you can

Re: [Puppet Users] facters or Custom Facts

2017-03-30 Thread Rob Nelson
Warron, Hiera is a lot easier than it seems! If you join the puppet slack ( https://slack.puppet.com), I'm sure we could help you get it set up quickly and properly. It will probably solve a dozen other problems you didn't even know you had, too :) Rob Nelson rnels...@gmail.com On Thu, Mar 30,

Re: [Puppet Users] Spec testing and dalen-puppetdbquery

2017-03-30 Thread Erik Dalén
A bit late to the party here, but in my (rspec-puppet) tests I have created a mock version of the function in a before(:each) block in the unit test for the class, like this: before(:each) do Puppet::Parser::Functions.newfunction(:query_nodes, :type => :rvalue) { |_| ["foo.example.com",

[Puppet Users] removing "minimum_uid=1000" value from all my pam config files

2017-03-30 Thread Peter K
I'm trying to remove a specific configuration value, "minimum_uid=1000", from multiple lines in several files (currently 5 files) in /etc/pam.d/. A typical line looks like this: auth [success=1 default=ignore] pam_ldap.so use_first_pass minimum_uid=1000 I've tried exec and sed, but I

Re: [Puppet Users] how to pxe boot and preseed puppet-agent install in ubuntu from puppetlabs repo

2017-03-30 Thread Peter K
Thanks for the suggestion, Tom. I was working with a pre-existing environment but setting up cobbler is something I'll try next. -peter On Thursday, March 23, 2017 at 5:08:42 PM UTC-4, duke wrote: > > Hi Peter, > > ever thought about trying Cobbler? > > In our environment, we PXE boot servers

Re: [Puppet Users] Custom Facts using awk

2017-03-30 Thread Michael Watters
%x is a ruby method which captures command output. IMO you can do most of what you need using native ruby methods, there's no need to pipe output to grep/sed/awk since ruby has built in pattern matching functions and if you're using ruby you might as well do it the ruby way. For example, this

Re: [Puppet Users] Custom Facts using awk

2017-03-30 Thread Luke Bigum
On Thursday, 30 March 2017 16:11:35 UTC+1, Warron French wrote: > > Hi Luke, I have some questions for you. > > First, the link= > https://github.com/puppetlabs/puppetlabs-apache/blob/master/lib/facter/apache_version.rb > > didn't have any reference to awk at all, was this the file you intended

Re: [Puppet Users] Custom Facts using awk

2017-03-30 Thread warron.french
Hi Luke, I have some questions for you. First, the link= https://github.com/puppetlabs/puppetlabs-apache/blob/master/lib/facter/apache_version.rb didn't have any reference to awk at all, was this the file you intended to suggest? Secondly, the link=

Re: [Puppet Users] Custom Facts using awk

2017-03-30 Thread warron.french
Hey, thanks for the examples Luke! I am looking at them now. -- Warron French On Thu, Mar 30, 2017 at 8:31 AM, Luke Bigum wrote: > Puppet modules on Github are a good source. I've found a simple one: > >

Re: [Puppet Users] facters or Custom Facts

2017-03-30 Thread warron.french
Hi Rob, I am not quite (personally/professionally) ready for Hiera yet. I also need to learn more about ERB templates; which I did a little research on about 2 hours ago. Honestly, what you provided above to me, because I am not ready/fully understanding yet, has no context for me to implement

Re: [Puppet Users] facters or Custom Facts

2017-03-30 Thread Rob Nelson
You could create a parameter called `$manage_audispatch = false` and in hiera, set `profile::whatever::manage_audispatch: true` in hiera for qualified devices (probably osfamily of RedHat, os/release/major of 6). Your code conditional is very simple (`if $manage_audispatch { .. }`), abstract out

[Puppet Users] Re: Clarification on mount type behaviour

2017-03-30 Thread jcbollinger
On Wednesday, March 29, 2017 at 6:36:01 AM UTC-5, apgrif...@gmail.com wrote: > > Hi, > > From my testing it seems that when managing mount resources puppet only > compares the manifest against fstab and not mtab. For example if I have > > mount { '/tmp': > ensure => mounted, > options =>

Re: [Puppet Users] Custom Facts using awk

2017-03-30 Thread Luke Bigum
Puppet modules on Github are a good source. I've found a simple one: https://github.com/puppetlabs/puppetlabs-apache/blob/master/lib/facter/apache_version.rb And one of my own that's a little more complicated:

Re: [Puppet Users] Custom Facts using awk

2017-03-30 Thread warron.french
Joshua, thanks for this feedback. I don't really know ruby; can you offer some ideas of where I can find other Puppet Facts written in Ruby that don't look like my originally posted example? Thank you sir. -- Warron French On Tue, Mar 28, 2017 at 10:51 AM, Joshua

[Puppet Users] Re: Augeas-1.5.0 to edit file using Puppet

2017-03-30 Thread Peter Faller
Is there any reason you're not using the built-in 'host' type? For example, this adds an entry to /etc/hosts: host {'north.xyz.com': ip => '192.168.100.2', host_aliases => [ 'north', 'main-switch' ], } On Thursday, 30 March 2017 09:55:33 UTC+2, Shrawan Bhagwat wrote: > >

[Puppet Users] facters or Custom Facts

2017-03-30 Thread warron.french
I need to develop a conditional that will allow me to deploy audit.rules, auditd.conf, and *IF (and only if) the machine is a Server* audispatch configurations. The ausyscalls for RHEL6 are different from RHEL7, so I require the ability "deploy" audit.rules.el7 into the correct place, and

[Puppet Users] Augeas-1.5.0 to edit file using Puppet

2017-03-30 Thread Shrawan Bhagwat
Hi All, I have configured Puppet 3.8.1 and Augeas 1.5.0. I am trying to edit /etc/hosts file using augeas with following code: augeas{'host_file': context => "/files/etc/hosts", changes => [ "set ipaddr 192.168.0.1", "set canonical

[Puppet Users] Puppet Agent starting too soon

2017-03-30 Thread Игорь Тиунов
HI, I have the same issue for my Redhat 7 servers (immutable hypervisors). For some reasons ppuppet.servise unit is not network depended. I don't know what is it bug or feature. I override dependency for puppet unit to depend on network.service (I use lsb network service) -- You received