Re: [Puppet Users] ERB template issues in an xml document

2015-04-15 Thread Mark Rosedale
at 3:10:58 PM UTC-4, Neil - Puppet List wrote: >>> >>> Hello >>> >>> You have 3 newlines there which I've marked with Xs I expect you to get >>> N+2. >>> >>> But why do you care? Out of "I wonder why that is happening?" Is f

Re: [Puppet Users] ERB template issues in an xml document

2015-04-14 Thread Mark Rosedale
> > Hello > > You have 3 newlines there which I've marked with Xs I expect you to get > N+2. > > But why do you care? Out of "I wonder why that is happening?" Is fine. > Beyond that the XML is for a machine not you to spend your time reading. I > hope :)

[Puppet Users] ERB template issues in an xml document

2015-04-14 Thread Mark Rosedale
So I have an erb template. x.xml.erb Inside the file I iterate over an array to add some contents to the file. It looks like so. <%- @x_custom.each do |value| -%> <%= value %> <%- end -%> <%= key %> However, I'm having an issue when puppet actually updates that file. If I have an array

[Puppet Users] using heredoc in an erb template with hiera

2015-02-18 Thread Mark Rosedale
Hello, I'm using hiera with puppet 3.7. What I need to do is pass in a formatted string to puppet to be used inside an erb template. What I'd really like is to use heredoc, but it doesn't seem like that is going to work. Does anyone have information on this and whether it is possible or not?

[Puppet Users] Re: Module/Class ordering with contain()

2014-12-10 Thread Mark Rosedale
I generally don't use includes. I do class declarations. If you need to order classes within a module I tend to use the before or require and subscribe for ordering. So for instance for module foo if I need class first to run first and two to run second I could do either of the following. cla

[Puppet Users] Re: schedule metaparameter

2014-11-05 Thread Mark Rosedale
One other question. Can you apply schedules to classes? It seems that you cannot, but I just wanted to confirm that. On Friday, October 24, 2014 1:51:27 PM UTC-4, Mark Rosedale wrote: > > Hello, > > I'm looking to start to implement scheduling for certain resources within

[Puppet Users] Re: Puppet Environments with Hiera

2014-11-05 Thread Mark Rosedale
Sorry I guess I was confused I thought Hiera is an ENC...am I wrong about that? On Wednesday, November 5, 2014 9:28:42 AM UTC-5, jcbollinger wrote: > > > > On Tuesday, November 4, 2014 9:33:06 AM UTC-6, Mark Rosedale wrote: >> >> So I'm setting up puppet environmen

[Puppet Users] Puppet Environments with Hiera

2014-11-04 Thread Mark Rosedale
So I'm setting up puppet environments. This is what I have in my puppet.conf under the [master] section environmentpath = $confdir/environments Now if I set environment inside the puppet.conf it will grab the environment I have set up ($confdir/environments/test), but if I set it in hiera it

Re: [Puppet Users] Re: schedule metaparameter

2014-11-04 Thread Mark Rosedale
Tags are an interesting way to tackle this issue. Thanks for pointing that out. On Monday, October 27, 2014 5:34:06 PM UTC-4, Ramin K wrote: > > On 10/27/14 7:43 AM, jcbollinger wrote: > > > > On Friday, October 24, 2014 12:51:27 PM UTC-5, Mark Rosedale wrote:

[Puppet Users] schedule metaparameter

2014-10-24 Thread Mark Rosedale
Hello, I'm looking to start to implement scheduling for certain resources within puppet. My one question is this. If I have a schedule set on resource 'foo' does that prohibit that resource from being updated if I run puppet agent by hand? What I'm wondering is if I end up needing to do puppe

[Puppet Users] Custom fact that requires inifile

2014-10-17 Thread Mark Rosedale
Hello, I'm looking to implement a custom fact that tells my puppet config if a machine is configured a certain way. What I want to do is parse the configuration's ini file and see if a certain setting is turned on or off. I'm looking at using the ruby gem inifile

Re: [Puppet Users] Puppet Master Disk usage management

2014-10-16 Thread Mark Rosedale
wrote: > > On 10/15/14 9:11 AM, Mark Rosedale wrote: > > Hello, > > > > I'm running puppet with puppetdb and puppet-dashboard all on my master. > > > > I want to make sure that I don't get overrun with disk usage by either > > the master

Re: [Puppet Users] Puppet Master Disk usage management

2014-10-15 Thread Mark Rosedale
e f -print0 | xargs -0 -r rm > > /dev/null 2>&1 > > On 15 October 2014 9:41:36 pm IST, Mark Rosedale > wrote: >> >> Hello, >> >> I'm running puppet with puppetdb and puppet-dashboard all on my master. >> >> I want to make sure that I do

[Puppet Users] Puppet Master Disk usage management

2014-10-15 Thread Mark Rosedale
Hello, I'm running puppet with puppetdb and puppet-dashboard all on my master. I want to make sure that I don't get overrun with disk usage by either the master (storing reports) or the dbs for puppetdb (I'm running postgres) or puppet-dashboard (mysql). I'm wondering what some people do to

Re: [Puppet Users] custom function error undefined local variable

2014-10-10 Thread Mark Rosedale
? > Could you try using only the module with this custom function and see how > that goes? Don’t forget to restart the Puppetmaster if you are changing > functions. > > On 09 Oct 2014, at 22:10, Mark Rosedale > > wrote: > > Puppet 3.5.1 > ruby 1.8.7 > > Ou

Re: [Puppet Users] custom function error undefined local variable

2014-10-09 Thread Mark Rosedale
(main):012:2> hostname_array.first > > irb(main):013:2> end > > irb(main):014:1> end > > irb(main):015:0> Facter.value(:network_geo) > > My network is ["demo", "1"] > > => "demo" > > If you run your existi

Re: [Puppet Users] custom function error undefined local variable

2014-10-09 Thread Mark Rosedale
ay}" > > irb(main):012:2> hostname_array.first > > irb(main):013:2> end > > irb(main):014:1> end > > irb(main):015:0> Facter.value(:network_geo) > > My network is ["demo", "1"] > > => "demo" > > If you run

Re: [Puppet Users] custom function error undefined local variable

2014-10-06 Thread Mark Rosedale
Still haven't been able to hunt down the cause of this issue. Is there a way to test the code with the puppet wrapping on the cli? On Friday, October 3, 2014 3:41:57 PM UTC-4, Mark Rosedale wrote: > > Wil, > > Thanks for the reply. I will look up the module functions you ref

Re: [Puppet Users] custom function error undefined local variable

2014-10-03 Thread Mark Rosedale
day, October 3, 2014 2:00:27 AM UTC-4, Wil Cooley wrote: > > > On Oct 2, 2014 10:23 AM, "Mark Rosedale" > > wrote: > > > > I have the following custom function that I'm trying to write. > > > > Sorry this isn't an answer to your question

[Puppet Users] custom function error undefined local variable

2014-10-02 Thread Mark Rosedale
I have the following custom function that I'm trying to write. require 'resolv' module Puppet::Parser::Functions newfunction(:getIpAddr, :type => :rvalue) do |arguments| Resolv::DNS.open do |dns| ress = dns.getresources(arguments[0], Resolv::DNS::Resource::IN::A) if ress.any?

Re: [Puppet Users] Puppet/yum fails to install old packages

2014-09-03 Thread Mark Rosedale
Base}-libs": ensure => $postgresqlVersion, } -> package { $packageList: ensure => $postgresqlVersion, } And that works, it installs the one dependency I need ahead of time and does the rest in whatever order. Thank you, mjr On Wednesday, September 3, 2014 12:43:17 PM

Re: [Puppet Users] Puppet/yum fails to install old packages

2014-09-03 Thread Mark Rosedale
ensure => $postgresqlVersion, } So the short of the story was that it was both ordering *and* a missing package that was creating my problem. On Wednesday, August 13, 2014 1:20:43 PM UTC-4, jcbollinger wrote: > > > > On Friday, August 8, 2014 10:33:48 AM UTC-5, Mark Roseda

[Puppet Users] Using yaml to create custom array fact

2014-08-28 Thread Mark Rosedale
Hello, So I'm using stlib with the /etc/facter/facts.d/ to set up some custom facts of some of my nodes. What I want to do is use yaml to set an array in facter that will then get interpreted by Hiera. Let me give an example. I have the following hierarchy. :hierarchy: - "node/%{::fqdn}"

Re: [Puppet Users] Puppet/yum fails to install old packages

2014-08-08 Thread Mark Rosedale
system somehow in the > end... > > Also, in that output, puppet says that the server 8.1.23-10.el5_10 > package got installed, but it's not in your final "rpm -qa | grep > postgres" output, so I'm guessing you're not being completely honest > wi

[Puppet Users] Puppet/yum fails to install old packages

2014-08-07 Thread Mark Rosedale
Hello, So I'm specifying specific packages to install for some of my critical software. This is specifically related to centos/yum. When new packages are released I get errors when running puppet saying that yum has failed to install the specified package because a newer version is available, b