#puppet

/

      • lavaman
        only that the comparison matches
      • :)
      • rystic
      • lavaman
        yeah, but you cast the bool to a string
      • so changing it in hiera is not going to change your results
      • ssarah has quit
      • zerick has quit
      • zz_ryanneufeld is now known as ryanneufeld
      • friendly12345 joined the channel
      • kballou has quit
      • xorpaul has quit
      • rystic
        lavaman: any ideas?
      • alanwill joined the channel
      • lavaman
        have you tried scope.lookupvar instead?
      • a nil object wouldn't have an each method
      • h4rry_ joined the channel
      • wenlock has quit
      • jkt has left the channel
      • tilya has quit
      • elricsfate joined the channel
      • tobamai has quit
      • tilya joined the channel
      • tilya has quit
      • tilya joined the channel
      • rystic
        lavaman: i haven't. i'm also pretty unclear on why it would say i have a nil object in the first place.
      • RobertBirnie has quit
      • anthonysomerset has quit
      • zeroecco has quit
      • h4rry_ has quit
      • lavaman
        Because your variable reference is wrong or not scoped properly
      • t4ank
        hmm I am not sure what I am doing wrong. I have two places where I use the boolean flag. I use it in the erb template directly and in the pp file. But nothign seems to be picking up the value set in the var. I have tried it as a string and as a boolean. Here is my setup. http://pastebin.com/zVekwwcH
      • behrendsj has quit
      • SunTsu has quit
      • lavaman
        tried *what* as a bool and a var?
      • t4ank
        I do not understand that
      • lavaman
        as i said, changing hiera will not produce different results
      • xorpaul joined the channel
      • your code is wrong
      • t4ank
        ok.
      • torrancew
        lavaman: do you know offhand if hiera respects boolean types? Or will a value of true always come to puppet as "true"?
      • lazyfrosch_ joined the channel
      • lavaman
        so if you just changed hiera, you should expect to get the same reulsts
      • it certainly does
      • lazyfrosch has quit
      • jkt joined the channel
      • rystic
        lavaman: i see. that makes a lot of sense. looking into scope.lookupvar now
      • torrancew
        thought so, thanks
      • captain_linger_
        definitely does
      • lavaman
        that's why i'm telling you your code is wrong :)
      • you interpolate the response into a string
      • that's your problem
      • captain_linger_
        facter is the only one with that bool->string weirdness
      • jkt
        hmm, so I'm modifying that glance module which uses Ruby implementation along with a type/provider thingy
      • tilya has quit
      • lavaman
        type/provider is a ruby implementation :)
      • torrancew
        captain_linger_: tks
      • jsm has quit
      • jkt
        how do I set up an autorequire while diregarding any names?
      • croddy
        that burned me once with saz/ssh, in my hiera yaml i had PermitRootLogin: no, and ended up with 'false' in my sshd_config. had to use PermitRootLogin: 'no'
      • lavaman
        jkt no idea what you mean
      • jkt
        iow, similar to http://webcache.googleusercontent.com/search?q=... , but that sounds like too much inefficient code
      • Miguelzinho joined the channel
      • lavaman: I have a type glance_api_config and another type glance_index, both are implemented in ruby
      • SunTsu joined the channel
      • SunTsu has quit
      • SunTsu joined the channel
      • lavaman: I'd like to set up an autorequire where glance_index always happens after glance_api_config
      • lavaman: the ruby's autorequire appears to require a name of matching resources
      • tilya joined the channel
      • tilya has quit
      • tilya joined the channel
      • _buzz joined the channel
      • lavaman
        jkt oh, that link is what you need then
      • there's no cleaner way i know of doing that
      • teran_ joined the channel
      • the only other option is to do resource ordering in like site.pp but that's not clean either
      • jkt
        lavaman: iterating over *all* of the resources? isn't that going to be, like, terribly inefficient?
      • linux-ninja has quit
      • teran__ joined the channel
      • lavaman
        define inefficient :)
      • it won't take all that long :)
      • anthonysomerset joined the channel
      • nwolfe joined the channel
      • i mean, any way you do somethign like that there has to be catalog inspection
      • all the includes and whatnot make it impossible to know how to order things in any generic way
      • even ordering on a resource collector does the same thing basically
      • jkt
        lavaman: right, but I was hoping that the ~> operator would do something efficient, such as using some indexed lookup and not a foreach for each of these definitions
      • captain_linger_
        hey torrancew if I lean on cornfeed to update his branch can we get that pull in on the cron module? :)
      • rapture1 joined the channel
      • tilya has quit
      • lavaman
        I mean, a resource collector is bascially a catalog inspection in puppet code
      • teran has quit
      • jkt
        lavaman: ack; as I said, I was hoping that the ordering operator would result in something like resources_by_type['xyz'].add_dep(...)
      • tilya joined the channel
      • tilya has quit
      • tilya joined the channel
      • lavaman
        jkt the catalog is flat and has no indexes :)
      • rapture has quit
      • thumpba has quit
      • teran_ has quit
      • but again, resources_by_type iterates through the catalog :)
      • there's no separate index to query sadly
      • bmurt joined the channel
      • totally understand what you mean though
      • jkt
        I start to understand how come that puppet runs for minutes on a machine with several k of managed resources
      • bmurt has quit
      • bettycla1p has left the channel
      • nlew joined the channel
      • rystic
        lavaman: think i figured out the issue, but a bit unclear on how to resolve it. the issue is that i'm defining the template resource for inputs.erb.conf in forwarder.pp, but then i want to set different contents for the monitor_paths array depending on OS, so i'm doing it in darwin.pp, windows.pp and nix.pp
      • torrancew
        captain_linger_: I think so. Can't recall which pull is cornfeed's just yet
      • rystic
        i changed inputs.conf.erb to look like this, but it doesn't seem to have helped: https://gist.github.com/anonymous/2bcb966643336...
      • torrancew
        ah, encure => absent
      • yeah, I want that to work, very badly.
      • mmars has quit
      • captain_linger_: I'll add some notes to the ticket
      • TheOtherDude has quit
      • Most are stylistic, and not blockers (I can pull the thing in and change the style later)
      • lavaman has quit
      • nlew has quit
      • captain_linger_
        sweet, no worries, just the ensure absent requires command
      • torrancew
        captain_linger_: yep!
      • added some notes at long last there
      • anode joined the channel
      • writtenoff has quit
      • KiloNiner has quit
      • captain_linger_
        torrancew: hah, okay. Thanks much for making that, I've always made it a design pattern to keep crons in cron.d for clarity
      • torrancew
        :)
      • same here
      • bidari007 joined the channel
      • bidari007 has quit
      • captain_linger_
        torrancew: Excellent points, it's not like we need to wait on that stuff
      • I'll have him adjust accordingly after updating his branch to provide a clean pull
      • torrancew
        :) yeah, that's the biggest one
      • the rest is gravy in the boat
      • captain_linger_
        yeah, but do it right or don't do it :)
      • torrancew
        :)
      • flozano has quit
      • _2_gabybeckyg joined the channel
      • also, send cornfeedhobo my apologies for taking so long
      • _2_gabybeckyg
        hola
      • :D
      • torrancew
        finch: ^^^
      • _2_gabybeckyg
        como estas
      • (L)
      • captain_linger_
        hah, no worries, we've had some fun wondering :) we've been refactoring for weeks
      • no big deal
      • torrancew
        hahaha :)
      • _2_gabybeckyg
        bitch
      • captain_linger_ has quit
      • :'(