Re: [Puppet Users] passing more parameters to define

2014-03-24 Thread Peter Bukowinski
er, $key_type, $fqdn) { ... } You can also set defaults for the parameters where it makes sense: define my_type ($param1 = "foo" , $param2 = "bar", $param3) { ... } -- Peter Bukowinski -- You received this message because you are subscribed to the Google Groups "Pu

Re: [Puppet Users] Re: Announce: Puppet 3.5.0-rc2 Available.

2014-03-25 Thread Peter Bukowinski
t directory behavior? Instead of restarting the master, a just 'touch site.pp' to get puppet to see new node files. -- Peter Bukowinski -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop

Re: [Puppet Users] Re: How to handle multiple modules requiring the same packages

2014-03-28 Thread Peter Bukowinski
require. I suppose I should tag each package with the name of the application that requires it and use virtual resources to only realize the necessary packages, but I'm satisfied with the current solution since the overlap is pretty significant. -- Peter Bukowinski On Mar 28, 2014, at 11:

Re: [Puppet Users] Using a fact in "onlyif"

2014-04-22 Thread Peter Bukowinski
#x27; statement will suffice, but I encourage you to read the linked document to see what else is possible. if $::operatingsystemrelease == "10.04" { file { "/var/lib/nfs/rpc_pipefs" : ensure => "link" , target=> "/run/rpc_pipefs&q

Re: [Puppet Users] Revert configuration file to old state if content changes

2014-05-01 Thread Peter Bukowinski
p* creating the config.xml file. You'll get a notice like this: Notice: /Stage[main]/cmas/File[/etc/cmas/app_config/config.xml]/content: audit change: newly-recorded value absent If you want puppet to manage the content of that file and revert any changes, you'll need to stop auditin

Re: [Puppet Users] Revert configuration file to old state if content changes

2014-05-02 Thread Peter Bukowinski
On May 2, 2014, at 9:25 AM, jcbollinger wrote: > > > On Thursday, May 1, 2014 9:06:52 AM UTC-5, Peter Bukowinski wrote: > On May 1, 2014, at 9:29 AM, contactp...@gmail.com wrote: > > > Hi, > > > > I am using puppet enterprise 3.x . I have a manifest used

Re: [Puppet Users] Conditional Creates Attribute

2014-05-29 Thread Peter Bukowinski
On May 29, 2014, at 10:23 AM, Mark McFate wrote: > I'm probably going about this all wrong, but I have an instance where I've > employed a Puppet module and need to sometimes add a "creates" attribute to > one of the exec's defined there. My code (below) is probably all wrong, but > I think

Re: [Puppet Users] Facter unable to parse custom fact

2014-07-15 Thread Peter Bukowinski
are unable to run '/etc/facter/facts.d/services.rb' directly from the terminal and have it generate STDOUT in the form of 'factname=factvalue' then you must modify it so that it does. Check that you have a shebang line (like '#!/usr/bin/env ruby') at the top

Re: [Puppet Users] multiple VMs from a single node.pp file

2014-07-15 Thread Peter Bukowinski
I HAVE googled for > solutions, but I may just not be using the right terminology to search with; > because I keep coming up blank on how best to tackle this. My suggestion above isn't the best way to go about it, either. If you ever want to manage anything besides these VMs, you&#

Re: [Puppet Users] Duplicate Declarations - Puppet

2014-09-08 Thread Peter Bukowinski
rtual resource once, but you can realize it any number of times. This puppet doc should give you all the information you need: https://docs.puppetlabs.com/puppet/latest/reference/lang_virtual.html -- Peter Bukowinski -- You received this message because you are subscribed to the Google Groups

Re: [Puppet Users] My first module

2014-09-30 Thread Peter Bukowinski
; for the file resource's ensure parameter. That value only applies to package resources. Puppet will always ensure that the file on a client matches whatever version of file exists at the path specified in the manifest. You should use one of the following values for the ensure param

Re: [Puppet Users] Case Statement for setting IP addresses

2014-12-11 Thread Peter Bukowinski
> On Dec 11, 2014, at 2:23 PM, James Taylor wrote: > > default:{ > > notice { "Vendor item in hostname is out of scope."}, > err { "Vendor item in hostname is out of scope."}, Using parentheses for the notice and err functions instead of braces should get yo

Re: [Puppet Users] inherits deprecated in puppet 4.x

2015-01-09 Thread Peter Bukowinski
> On Jan 9, 2015, at 2:52 PM, Jason Price wrote: > > This doesn't make me happy, but fine. Major versions let you have breaking > changes. > > My question is this: What do I replace it with? > > My use case is as follows: > > > node default { >class{ '

Re: [Puppet Users] Have Facter always return a result

2015-01-30 Thread Peter Bukowinski
> On Jan 30, 2015, at 12:02 PM, Brian Morris wrote: > > Hello all, > > I cannot seem to get Facter to always return a value. In this instance I am > pulling the Java version from our systems, but would like there to be an > entry that says "null" within the facts of systems that don't have any

Re: [Puppet Users] Basic syntax and learning problems

2016-06-17 Thread Peter Bukowinski
Hi Edward, With puppet 3.7, all facts are "stringified" by default, meaning hashes are flattened to strings. If you've got facter 2.0 or greater, you can change this behavior do you can access hash keys individually. https://docs.puppet.com/puppet/3.7/reference/lang_facts_and_builtin_vars.html#

Re: [Puppet Users] Basic syntax and learning problems

2016-06-17 Thread Peter Bukowinski
>> On Jun 17, 2016, at 9:50 AM, Edward Ned Harvey (puppet) >> wrote: >> >> From: puppet-users@googlegroups.com [mailto:puppet- >> us...@googlegroups.com] On Behalf Of Peter Bukowinski >> >> Hi Edward, >> >> With puppet 3.7, all

Re: [Puppet Users] Custom Facts using awk

2017-03-22 Thread Peter Bukowinski
Hi Warron, I'd consider using an external, executable fact to avoid ruby altogether. https://docs.puppet.com/facter/3.6/custom_facts.html#executable-facts-unix Basically, you can write a bash script (or use any language you want), drop it into '//facts.d/' on your puppet server, and it wil

Re: [Puppet Users] Custom Facts using awk

2017-03-27 Thread Peter Bukowinski
> sh scriptname.sh > > Thanks for the feedback, > > -- > Warron French > > >> On Wed, Mar 22, 2017 at 7:07 PM, Peter Bukowinski wrote: >> Hi Warron, >> >> I'd consider using an external, executable fact to avoid

Re: [Puppet Users] Puppet hiera variable

2018-04-03 Thread Peter Bukowinski
Jagga, It’s a simple error. You need to remove the square brackets from around your conditional test. Puppet is evaluating it as an array, and since puppet treats all non-boolean values (other than undef) as true, you will never get to the else block. — Peter > On Apr 3, 2018, at 10:13 PM, Ja

Re: [Puppet Users] forcing a variable to be lower case?

2015-02-25 Thread Peter Bukowinski
> On Feb 25, 2015, at 3:20 PM, Peter Bukowinski wrote: > > >> On Feb 25, 2015, at 2:26 PM, Peter Berghold wrote: >> >> I have a situation where there is an uppercase letter in a client's host >> name. When Puppet creates the certificate for the host th

Re: [Puppet Users] forcing a variable to be lower case?

2015-02-25 Thread Peter Bukowinski
> On Feb 25, 2015, at 2:26 PM, Peter Berghold wrote: > > I have a situation where there is an uppercase letter in a client's host > name. When Puppet creates the certificate for the host the resultant name for > the is in all lower case as I'd expect. > > The trouble comes in where I am manag

Re: [Puppet Users] Running a daemon only during certain hours of the day

2015-04-08 Thread Peter Bukowinski
On Apr 9, 2015, at 1:26 AM, Gabriel Filion wrote: > > Hello, > > A client of mine needs to be able to control which hours during the day > a certain daemon is running and which hours it is not. > > So far I can think of hiera for controlling the on/off periods + some > math magic to determine i

Re: [Puppet Users] puppet link and automount

2015-04-23 Thread Peter Bukowinski
> On Apr 23, 2015, at 6:44 AM, Arnau Bria wrote: > > Hello all, > > we had some NFS mounts in /nfs/mount1. Then we created a link > from /nfs/mount1 to /mount1. Both resources were defined using puppet > (mount and file). As the mounts were defined in fstab, the file > resource was applied ever

Re: [Puppet Users] puppet cron jobs overwhelming host

2015-05-01 Thread Peter Bukowinski
v 664 {} \; consider using the following command, which will exclude files that already have the correct permissions and will batch the found files into a single chmod command (note the plus sign instead of a semicolon): /bin/find /var/www -type f ! -perm 0644 -exec chmod -v 644 {} + The d

Re: [Puppet Users] file absent in config manifest fails

2015-10-14 Thread Peter Bukowinski
Tim, > On Oct 14, 2015, at 10:14 PM, Tim Dunphy wrote: > > Hey guys, > > On puppet server 3.8.2 here. And I have a file definition that I want to set > as 'absent'. For example, this is what I have: > > file { '/etc/newrelic/newrelic.cfg': > ensure => absent, > path=> '/etc/ne

Re: [Puppet Users] Custom facts in facter

2015-10-21 Thread Peter Bukowinski
> On Oct 21, 2015, at 12:56 PM, Hugo Deprez wrote: > > Hello, > > I created a custom fact with the following procedure : > > mkdir -p /etc/puppet/modules/facts/lib/facter > touch apache.rb > > Content of apache.rb file : > Facter.add('apache') do > setcode do > apache_package = Facter:

Re: [Puppet Users] Regex and Hyphen in node definitions

2015-11-17 Thread Peter Bukowinski
Is consider removing the ^ and $ anchors. I think I you'll find it works without them. -- Peter > On Nov 17, 2015, at 9:57 AM, Matt Shields wrote: > > If there are any other suggestions on how to regex the nodes, that would be > extremely helpful. We name our hosts like. > > {clientname}-{

Re: [Puppet Users] Puppet 101: How to make it go?

2015-12-01 Thread Peter Bukowinski
I suggest downloading the Learning VM and working through the tutorial. https://puppetlabs.com/download-learning-vm -- Peter Bukowinski > On Dec 1, 2015, at 9:42 AM, John Oliver wrote: > > I downloaded and installed the open-source puppet on a CentOS 6 virtual > machine. I do

Re: [Puppet Users] exec not executing

2016-02-21 Thread Peter Bukowinski
It looks like it's the quotes in your command. The entire command is wrapped in double quotes, and the actual mysql command should be wrapped in single quotes, but isn't. Also you have admin, localhost, and secret in single quotes that aren't escaped. You will need to escape all the single quote

<    1   2