Re: [Puppet Users] hiera hierarchy by network

2017-04-28 Thread Nick Fagerlund
Forgot to paste the docs link: https://docs.puppet.com/puppet/latest/hiera_config_yaml_5.html#specifying-file-paths -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an emai

Re: [Puppet Users] hiera hierarchy by network

2017-04-28 Thread Nick Fagerlund
I THINK the new mapped_paths feature in Puppet 4.10 can do this, when combined with the networking fact. Um, I think it'd look something like this: hierarchy: - name: "Network interface (tries all interfaces)" mapped_paths: [facts.networking.interfaces, interface, "networks/%{interface.

[Puppet Users] Re: hiera.yaml v5 and calling_module pseudo variable

2017-04-28 Thread Nick Fagerlund
On Friday, April 28, 2017 at 4:12:38 PM UTC-7, Nick Fagerlund wrote: > > > If so, use the `glob(s)` setting for a hierarchy level. Like this! > > Whoops, forgot to paste my docs link. More about `glob` and `globs` here: https://docs.puppet.com/puppet/latest/hiera_config_yaml_5.

[Puppet Users] Re: hiera.yaml v5 and calling_module pseudo variable

2017-04-28 Thread Nick Fagerlund
Hey Reinhard, On Monday, April 10, 2017 at 7:42:42 AM UTC-7, Reinhard Vicinus wrote: > We use the pseudo variable to set up a basic configuration for every > module we use when we need other default values then the ones set by the > module author. In the past we had the configuration in the glo

[Puppet Users] Re: Unpleasant puppetlabs experience

2013-12-06 Thread Nick Fagerlund
On Thursday, December 5, 2013 5:35:13 PM UTC-8, Philip Brown wrote: > > > Summary: > > (We dont need to improve our public documentation, because people can go > BUY documentation for puppet) > > I can understand changing it to low priority or something. > But *Rejecting* this issue? > > Hi all

[Puppet Users] Re: 2.7 Dynamic scoping warnings - which way should I jump?

2013-06-20 Thread Nick Fagerlund
Hey Dirk, Yeah, we need to re-write that page, sorry. Class parameters are absolutely the way to go -- they're easier to deal with in Puppet 3, and they DO work with include, as long as you back them up with Hiera. The key feature to learn about is automatic class parameter lookup: http://do

[Puppet Users] Re: Agent revoked and reinstalled, now can't get server to see its new cert

2013-06-14 Thread Nick Fagerlund
Is this the behavior we covered in this other thread? https://groups.google.com/forum/?fromgroups=#!topic/puppet-users/znlupoGbigM If an agent has an old file hanging around in certificate_requests, it will try to download a signed certificate without first asking to have one signed. On Frida

[Puppet Users] Re: cannot using LDAP nodes with site.pp together?

2013-06-11 Thread Nick Fagerlund
The wiki page is right, and the Pro Puppet page is wrong, I think. LDAP nodes and ENCs both use a feature of Puppet called the "node terminus." They use this feature in almost the same way -- Puppet asks the configured node terminus for a "node object," which may contain classes, extra variabl

[Puppet Users] Re: Running the same command (exec) multiple times?

2013-06-06 Thread Nick Fagerlund
The way Puppet is built today, you can't trigger the same exec resource multiple times in a single run. However, the exec resource type is kind of special: the value of the namevar ("command") doesn't have to be globally unique; only the title has to be unique. Basically, to deal with cases li

[Puppet Users] Re: simple running puppet module against a client

2013-06-06 Thread Nick Fagerlund
Yeah that section of the docs needs work. Sorry. I'll try and tell you what you need to know: * There's not a built-in way to interactively reach out to a remote node and apply just one class to it. That's not how Puppet thinks of the world: it thinks it's managing a complete steady state on ea

[Puppet Users] Re: optional defined type and dependencies

2013-06-03 Thread Nick Fagerlund
There's a third way, too. In the defined type's definition: define software::mydefinedtype { include software Package['software'] -> Software::Mydefinedtype[$title] ... ...etc. } That creates a relationship between the package and every resource in each instance of the defined type. Ever

[Puppet Users] Re: Puppet Tutorial: Learning - Manifests

2013-06-03 Thread Nick Fagerlund
Hi Alexandra, Attempt 2 is on the right track. The thing to keep in mind here is that the package and service types both rely on the platform's own naming conventions, so you'll often have to do a bit of research when you're first starting to automate a new service or whatever. In this case,

[Puppet Users] Re: What data on the server can a compromized host read

2013-05-30 Thread Nick Fagerlund
Hi Vlad, This is all more or less dictated by the auth.conf file, although the implications can take a little while to chase down. You can see http://docs.puppetlabs.com/guides/rest_auth_conf.html for the syntax of this file and its general capabilities. The default rules in Puppet 3.x are her

[Puppet Users] Re: How do I automagically remove old versions of jar files?

2013-04-25 Thread Nick Fagerlund
On Wednesday, April 24, 2013 2:24:08 PM UTC-7, Larry Fast wrote: > > > Is there a standard puppet pattern for removing older versions of jars > without explicitly naming each version? > > Yes! The tidy resource type. http://docs.puppetlabs.com/references/latest/type.html#tidy You'd want som

[Puppet Users] Re: defined function notparse order dependant

2013-04-23 Thread Nick Fagerlund
If the relevant code were just sitting there naked in your site manifest, I think you'd probably see a fairly simple parse-order dependency -- I think it's the fact that they're in defined types that's shifting things around. Actually, one of the core team surprised me the other week by telling

[Puppet Users] Re: Puppet 3.1, Hiera and a class parameter called "service"

2013-04-17 Thread Nick Fagerlund
Hey Matthias! It's a Puppet bug. Sorry. http://projects.puppetlabs.com/issues/17474 It's fixed in 3.2, which isn't quite out yet -- 3.2.0-rc1 is probably coming out this week. In the meantime, Keith is right: - Put quotes around "false" in your Hiera yaml files. - In your Puppet code, put a

[Puppet Users] Re: Announce: Hiera 1.2.0 Available

2013-04-04 Thread Nick Fagerlund
On Wednesday, April 3, 2013 9:42:12 PM UTC-7, Ellison Marks wrote: > > > > On a slightly related note, is the function documentation going to get an > update soon? All three hiera functions are still listed as "undocumented". > They do have fairly complete documentation in > http://docs.puppet

Re: [Puppet Users] Re: puppet 3 hiera configs hiding somewhere

2013-03-27 Thread Nick Fagerlund
On Wednesday, March 27, 2013 6:22:05 PM UTC-7, Philip Brown wrote: > > > nope, nothing. > I tried your suggestion of explicitly setting it. > It gets ignored. > > Oh wait, I just had another idea. File ownership/permissions? If you wrote it as root and it's only accessible to root, puppet mas

Re: [Puppet Users] Re: puppet 3 hiera configs hiding somewhere

2013-03-27 Thread Nick Fagerlund
On Wednesday, March 27, 2013 6:22:05 PM UTC-7, Philip Brown wrote: > > > > nope, nothing. > I tried your suggestion of explicitly setting it. > It gets ignored. > Weird. I'm out of ideas at this point. > Would be real nice if there was some way to strace the puppetmaster > demon doing its

[Puppet Users] Re: puppet 3 hiera configs hiding somewhere

2013-03-27 Thread Nick Fagerlund
On Wednesday, March 27, 2013 11:29:30 AM UTC-7, Philip Brown wrote: > > > I set up a /etc/puppet/hiera.yaml, pointing to a special hieradata > directory...but clients were not seeing the values I populated. > First off, check Puppet's hiera_config setting (http://docs.puppetlabs.com/references

[Puppet Users] Re: Parametrized classes and scope dilemma

2013-03-08 Thread Nick Fagerlund
It's defensive coding around a long-standing unwanted behavior of Puppet. See bug http://projects.puppetlabs.com/issues/2053 More information and explanation here: http://docs.puppetlabs.com/puppet/latest/reference/lang_namespaces.html#relative-name-lookup-and-incorrect-name-resolution David's

Re: [Puppet Users] Re: Boolean in hiera... problems again

2013-03-07 Thread Nick Fagerlund
OH, I should mention: the str2bool function is from puppetlabs/stdlib (http://forge.puppetlabs.com/puppetlabs/stdlib) On Thursday, March 7, 2013 3:16:32 PM UTC-8, Pete wrote: > > Awesome! > I was attempting to think of a quick fix for the problem but hadn't gotten > around to it. > My solution

Re: [Puppet Users] Re: Boolean in hiera... problems again

2013-03-07 Thread Nick Fagerlund
On Thursday, March 7, 2013 11:28:23 AM UTC-8, Jakov Sosic wrote: > > On 03/07/2013 02:41 PM, llowder wrote: > > > > > > On Thursday, March 7, 2013 6:38:52 AM UTC-6, Ahmed Kamal wrote: > > > > I'm on 3.1, and I'm finding that "true" works as expected, but > > "false" does not! I thin

Re: [Puppet Users] Retrieving the name of the module where a define is used

2013-02-25 Thread Nick Fagerlund
calling_module isn't a puppet variable. It's something special from the Puppet backend to Hiera, and I'm not entirely sure how it works or even whether it currently works. $caller_module_name is a legit puppet variable, though. On Monday, February 25, 2013 6:10:37 AM UTC-8, nikolavp wrote: > >

[Puppet Users] Re: Puppet apply and send reports?

2013-02-24 Thread Nick Fagerlund
Yes, you can definitely rig puppet apply to send reports. The trick is that it works like a puppet master, not like a puppet agent, so you need to configure the nodes to talk directly to the dashboard server; they can't go through the puppet master. (It also means that by default, puppet apply h

Re: [Puppet Users] Re: defining hosts regex

2013-02-22 Thread Nick Fagerlund
/option notation doesn't work in puppet. However, (?option:...) notation does work. http://docs.puppetlabs.com/puppet/3/reference/lang_datatypes.html#regex-options So use /(?i:^pos-(a|b)-www-\d\d$)/ and see if that does what you want. On Friday, February 22, 2013 6:51:48 AM UTC-8, Felix.Frank

[Puppet Users] Re: how to co-exist ENC and standard node definitions in site.pp?

2013-02-21 Thread Nick Fagerlund
You are almost doing it right. But: "If site.pp contains at least one node definition, it must have one for * every* node; compilation for a node will fail if one cannot be found." From http://docs.puppetlabs.com/puppet/3/reference/lang_node_definitions.html#behavior So if you have ANY node sta

[Puppet Users] Re: Using a variable in another variable name

2013-02-21 Thread Nick Fagerlund
Other options: <%= scope.lookupvar("macaddress_#{my_lan1}") %> Also, the stdlib module has a function useful for doing this outside of templates: https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/lib/puppet/parser/functions/getvar.rb On Thursday, February 21, 2013 8:51:15 AM UTC-8

Re: [Puppet Users] Facter & Puppet disagree on RHEL 6?

2013-02-20 Thread Nick Fagerlund
On Wednesday, February 20, 2013 5:08:27 PM UTC-8, LenR wrote: > > CaSe SenSitiVe? RedHat vs. redhat? > > > Puppet's == operator is case-insensitive. http://docs.puppetlabs.com/puppet/3/reference/lang_expressions.html#equality If it's a case issue, it's a horrible compatibility-breaking bug

[Puppet Users] Re: ruby versions and puppet 3

2013-02-20 Thread Nick Fagerlund
I've never tried this, but it SHOULD be okay. Puppet is reasonably standoffish about its interfaces, with everything going as yaml or json over HTTP, and part of the goal of that was to eventually do exactly this. We expect this setup to work, and if it doesn't it's a bug. (That's also part of

Re: [Puppet Users] Certificate nightmares

2013-02-11 Thread Nick Fagerlund
On Monday, February 11, 2013 4:24:34 AM UTC-8, Luke Bigum wrote: > > Nick that's a pretty awesome explanation of the handshake and > corresponding REST calls. Is that written down anywhere official? Perhaps > with corresponding Puppet Master / Agent log entries? > Good call, especially since

Re: [Puppet Users] Certificate nightmares

2013-02-08 Thread Nick Fagerlund
If a brand new never-seen-before agent starts up, it goes like this: * Do I have a private key? Nope? Better generate one. * Okay, do I have a certificate? Nope? See if the master already has one for me. This looks like a GET request to /certificate/. * If it gets one, it's good to go. * Master

[Puppet Users] Re: puppet client 0.22.1-1 unable to communicate with master on 3.0.2-1

2013-02-01 Thread Nick Fagerlund
You're in a gnarly situation. DistroWatch is telling me that you're probably running Ruby 1.8.4, which, damn. I think your best bet is: * Find or build a newer Ruby, preferably 1.8.7. * Either install Puppet from source (http://docs.puppetlabs.com/guides/from_source.html) or force apt to ins

[Puppet Users] Re: Mcollective

2013-02-01 Thread Nick Fagerlund
You've gotta: - Set a fact source - Configure that fact source - Make sure that fact source has access to good data By default, mcollective is using the 'yaml' fact source, which is looking for a file that may not exist and which may not have good data in it. Check the instructions her

Re: [Puppet Users] installing puppet via rubygems (not recommended?)

2012-12-20 Thread Nick Fagerlund
On Thursday, December 20, 2012 1:18:30 PM UTC-8, Nick Fagerlund wrote: > > Also keep in mind that Ruby 1.9.2 can be problematic! 1.9.3 works great > with puppet 3, 1.9.2 has some kind of complicated known issues with puppet > 2.7. > (reference: http://docs.puppet

Re: [Puppet Users] installing puppet via rubygems (not recommended?)

2012-12-20 Thread Nick Fagerlund
Also keep in mind that Ruby 1.9.2 can be problematic! 1.9.3 works great with puppet 3, 1.9.2 has some kind of complicated known issues with puppet 2.7. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit

[Puppet Users] Re: Puppet 3.0: Not authorized to call find on /file_metadata, more issues?

2012-11-12 Thread Nick Fagerlund
On Saturday, November 10, 2012 5:43:48 PM UTC-8, Felipe Salum wrote: > > Is this related to the same error I have when I run the puppet agent on my > nodes ? > Nov 11 01:40:09 squeeze puppet-agent[8683]: Could not send report: Error 403 on SERVER: Forbidden request: puppetdb1.puppet.test(192.16

[Puppet Users] Re: Puppet 3.0: Not authorized to call find on /file_metadata, more issues?

2012-11-09 Thread Nick Fagerlund
On Friday, November 9, 2012 2:34:38 PM UTC-8, Forrie wrote: > > > However, is /this/ necessary, too? > > path ~ ^/file_(metadata|content)/ > auth yes > allow /^(.+\.)?harvard.edu$/ > allow_ip 127.0.0.0/8 > allow_ip 10.0.0.0/8 > > No. And it might interfere with some things. (For example, it would

[Puppet Users] Re: Puppet 3.0: Not authorized to call find on /file_metadata, more issues?

2012-11-07 Thread Nick Fagerlund
On Tuesday, November 6, 2012 2:44:25 PM UTC-8, Forrie wrote: > > > path ~ ^/file_(metadata|content)/files/etc/ > path /file > auth yes > allow /^(.+\.)?ourdomain.com$/ > allow_ip 10.0.0.0/8 > > This path is still wrong. The path in auth.conf needs to refer to the LOGICAL path that you set up wi

Re: [Puppet Users] Re: Managing home directory on Windows

2012-11-07 Thread Nick Fagerlund
On Tuesday, November 6, 2012 2:22:25 PM UTC-8, Josh Cooper wrote: > > > > That said, would it perhaps be worth putting a note/warning in the > > documentation for managehome that it will delete the user's home > > directory and any data therein? The removal is mentioned under the > > 'Feature

[Puppet Users] Re: Class dependencies

2012-11-05 Thread Nick Fagerlund
Yup, this is the classes-can't-contain-classes problem. It sucks, everyone runs into it eventually, and it's explained in detail here: http://docs.puppetlabs.com/puppet/3/reference/lang_containment.html#known-issues http://projects.puppetlabs.com/issues/8040 You'll need to use the "anchor patt

[Puppet Users] Re: Puppet 3.0: Not authorized to call find on /file_metadata, more issues?

2012-10-31 Thread Nick Fagerlund
Hey, Danielt, I notice that you ONLY have allow_ip directives for that mountpoint. Is it possible that the agent you're running is connecting on a different network, or from the loopback address? You might consider adding an " allow /^(.+\.)mydomain.com " directive to the rules, and see if th

[Puppet Users] Re: Puppet 3.0: Not authorized to call find on /file_metadata, more issues?

2012-10-31 Thread Nick Fagerlund
Hi, Forrie, I see a handful of problems here: * First, you can't comment out the "path /file allow *" rule in auth.conf, because Puppet actually uses that for pluginsync and for files in modules! What you have to do is have BOTH the new rule I gave you AND the old one, but make sure the new on

[Puppet Users] Re: Puppet 3.0: Not authorized to call find on /file_metadata, more issues?

2012-10-24 Thread Nick Fagerlund
HMMM, this actually sounds like you've got a slightly larger problem, since can't get its own node object or its plugins. Any chance we could get a look at your whole auth.conf? On Wednesday, October 24, 2012 3:41:32 PM UTC-7, Forrie wrote: > > No, I didn't leave *example.com* in my config

Re: [Puppet Users] Re: Puppet 3.0: Not authorized to call find on /file_metadata, more issues?

2012-10-24 Thread Nick Fagerlund
On Wednesday, October 24, 2012 11:39:50 AM UTC-7, Jeff McCune wrote: > > > > Please note, I think Nick's original suggestion is slightly incorrect > because it should now contain the "allow *.example.com" statement, as > this would allow all agents who poses a signed certificate with a CN endin

[Puppet Users] Re: Puppet 3.0: Not authorized to call find on /file_metadata, more issues?

2012-10-22 Thread Nick Fagerlund
Hi everybody, This is a bug, and we're working on it. I'm about to update the auth.conf docs with info about allow_ip. Additionally, have a complete workaround for anyone being affected by this today. This offers complete equivalence to the fileserver.conf behavior that worked in 2.x and broke

Re: [Puppet Users] dynamic data in hiera

2012-10-18 Thread Nick Fagerlund
On Thursday, October 18, 2012 11:39:05 AM UTC-7, pdcleyn wrote: > > ... endless loop when specifying meaningful regex characters (like $,+,?) > in your lookup variables. > > > Oh! That's probably exactly what happened when I was experimenting w/ interpolating members of hash and array vars recei

Re: [Puppet Users] Re: Puppet 3.0.0 and Hiera

2012-10-15 Thread Nick Fagerlund
On Monday, October 15, 2012 1:45:12 PM UTC-7, jcbollinger wrote: > > > Indeed, I have taken a second look, and a third, and maybe more. I love > the hiera integration with parametrized classes. It was a fabulous idea, > as it makes it reasonable and safe to use existing parametrized classes

Re: [Puppet Users] Re: Wrapper classes, ordering & anchors

2012-10-11 Thread Nick Fagerlund
Also, for sake of concision, I should point out that chaining arrows can accept both resource declarations and multi-resource references (https://docs.puppetlabs.com/puppet/3/reference/lang_relationships.html#operands), which gives you the option of a one-liner workaround: class wrapper { i

Re: [Puppet Users] Re: Puppet 3.0.0 and Hiera

2012-10-08 Thread Nick Fagerlund
things to the new >> "parameter" based lookup and a disk based hierarchy anyway, but it's good >> to know that my setup probably won't break immediately upon upgrading. ^_^ >> >> >> On Friday, October 5, 2012 12:44:41 PM UTC-7, Nick Fagerlund

[Puppet Users] Re: Puppet 3.0.0 and Hiera

2012-10-05 Thread Nick Fagerlund
On Friday, October 5, 2012 10:47:58 AM UTC-7, Ellison Marks wrote: > > I've been using Hiera and Hiera-Puppet with Puppet 2.7 for a while now, > and I've been quite enjoying it. I just noticed the available update for > Puppet and saw that Hiera was now part of core Puppet. However, I've been

[Puppet Users] Re: Puppet 3 docs are live

2012-10-04 Thread Nick Fagerlund
eb-server-changes > >>This needs to be changed to Puppet::Util::CommandLine > but also the require seems to have changed > from require 'puppet/application/master' > to require 'puppet/util/command_line' > > Op donderdag 4 oktober 2012 03:14:12 UTC+2

[Puppet Users] Puppet 3 docs are live

2012-10-03 Thread Nick Fagerlund
Puppet 3 docs are now posted at http://docs.puppetlabs.com/puppet/3/reference/ . We apologize for the delay! This update adds release notes and a Puppet 3 language reference with all of the relevant updated. Next on deck is improved Hiera documentation. -- You received this message because y

[Puppet Users] Re: Puppet not picking up manifests

2012-08-28 Thread Nick Fagerlund
Could you please link me to these tutorials, so I may destroy them. Okay, anyway, here's how Puppet works: The master has ONE manifest file that it ALWAYS reads, called /etc/puppet/manifests/site.pp. (use puppet master --configprint manifest to confirm its location. You can set the 'manifest'

Re: [Puppet Users] The rewritten Puppet 2.7 language reference is live

2012-08-27 Thread Nick Fagerlund
On Monday, August 27, 2012 1:20:53 PM UTC-7, jcbollinger wrote: > > > D:< EWW. "Problematic" is putting it mildly, especially since behavior is >> inconsistent between arrays and hashes. (Both can add, only arrays can >> reassign to existing indexes.) But I'd better document it anyhow. >> > >

Re: [Puppet Users] The rewritten Puppet 2.7 language reference is live

2012-08-27 Thread Nick Fagerlund
On Monday, August 27, 2012 11:55:23 AM UTC-7, Trevor Vaughan wrote: > > I get it, but it would be nice to explicitly tell people to be careful > about this when talking about variables and pitfalls. > Okay, fair point. I'll put a note. -- You received this message because you are subscribed

Re: [Puppet Users] The rewritten Puppet 2.7 language reference is live

2012-08-27 Thread Nick Fagerlund
On Monday, August 27, 2012 7:09:39 AM UTC-7, Trevor Vaughan wrote: > > Just to make this extra fun > > You CAN change variables after they've been assigned. > > If you assign a new value to the variable in a template, it will pick > up the new value. > > Ah ha, but templates are not part

Re: [Puppet Users] The rewritten Puppet 2.7 language reference is live

2012-08-27 Thread Nick Fagerlund
On Sunday, August 26, 2012 6:44:25 PM UTC-7, Henrik Lindberg wrote: > > I just tested on puppet 2.7.14... > > puppet apply -e '$x = 1 $y =2 $b="x${$x+$y}x" notice($b)' > notice: Scope(Class[main]): x3x > notice: Finished catalog run in 0.01 seconds > > And > > puppet apply -e '$x = 1 $y =2

Re: [Puppet Users] How can MCollective replace "puppet kick"?

2012-08-25 Thread Nick Fagerlund
On Saturday, August 25, 2012 11:44:57 AM UTC-7, Sandra Schlichting wrote: > > > How can MCollective replace "puppet kick"? >> >> >> http://projects.puppetlabs.com/projects/mcollective-plugins/wiki/AgentPuppetd >> >> > > I don't know what MCollective is, and that link doesn't say anything that

Re: [Puppet Users] The rewritten Puppet 2.7 language reference is live

2012-08-24 Thread Nick Fagerlund
Yeah that reply isn't coming back. Anyway, I was totally hoping you'd chime in with some holes you found. :) On Friday, August 24, 2012 6:33:01 AM UTC-7, Henrik Lindberg wrote: > > - How do I create strings that span multiple lines? (Since there is no > string concatenation operator 'x' + 'y' d

Re: [Puppet Users] The rewritten Puppet 2.7 language reference is live

2012-08-24 Thread Nick Fagerlund
on can clarify if this is a supported feature or should be > avoided. i.e. $a = [1,2,3] $a[0] = 10. (IMO, this is problematic as any > logic can refer to the variable and assign to an entry - at least last I > tried). > > > Again, an excellent language reference! > R

[Puppet Users] Re: Manually creating class resource in site.pp works, calling same class from ENC silently fails

2012-08-23 Thread Nick Fagerlund
Oh wait, also! On Thursday, August 23, 2012 1:12:03 PM UTC-7, Jon McKenzie wrote: > > > Is there a way on the server side to validate the ENC -> class > transformation for clients? I can see in the logs when the ENC script gets > run, but there's not much other detail > > > Yeah, get the node ob

[Puppet Users] Re: Manually creating class resource in site.pp works, calling same class from ENC silently fails

2012-08-23 Thread Nick Fagerlund
On Thursday, August 23, 2012 1:12:03 PM UTC-7, Jon McKenzie wrote: > > --- > classes: >foobar: {} > > > That looks wrong. Cf. http://docs.puppetlabs.com/guides/external_nodes.html#puppet-265-and-higher It should be: --- classes: foobar: ...without the curlies. Does it work if you kil

Re: [Puppet Users] The rewritten Puppet 2.7 language reference is live

2012-08-23 Thread Nick Fagerlund
On Thursday, August 23, 2012 12:47:16 PM UTC-7, Aaron Grewell wrote: > > In > http://docs.puppetlabs.com/puppet/2.7/reference/lang_datatypes.html#hashes > it would be helpful to have a hash example that contains multiple keys > each with multiple subkeys. > You're right, I'll put one in. (Al

Re: [Puppet Users] The rewritten Puppet 2.7 language reference is live

2012-08-23 Thread Nick Fagerlund
On Thursday, August 23, 2012 1:55:15 AM UTC-7, Erik Dalén wrote: > But I'm wondering about the section on "Reserved Variable Names" that > says that reusing fact names as variables in a local scope may cause > malfunctions. This is something I've done quite a lot without any > problem, is it

Re: [Puppet Users] Duplicate definition : Merging arrays

2012-08-22 Thread Nick Fagerlund
Whoops, collision! Reassuring that we both did the same thing though. :) -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/IsnRDusKXDoJ. To post to this group

Re: [Puppet Users] Duplicate definition : Merging arrays

2012-08-22 Thread Nick Fagerlund
You can see inline docs for every stdlib function by reading the code: https://github.com/puppetlabs/puppetlabs-stdlib/tree/master/lib/puppet/parser/functions Install the module with: $ sudo puppet module install puppetlabs-stdlib And probably use unique and flatten to do what you're trying to

[Puppet Users] Re: newish puppet on RHEL4 and/or SLES9?

2012-08-22 Thread Nick Fagerlund
The advice above is generally pretty good -- for best results build your own Ruby packages, etc. etc. One thing I can add: Given that even RHEL 5 has a pretty ancient Ruby, you might want to run puppet agent via cron jobs (with --splay) instead of as a daemon. The daemon is generally okay on R

[Puppet Users] Re: how to connect agent to the master through a different user to execute a command through puppet module

2012-08-22 Thread Nick Fagerlund
I don't understand what you're doing. But it sounds like you might need the "user" attribute of the exec type? exec {'some command': user => 'admin', } See http://docs.puppetlabs.com/references/latest/type.html#exec and scroll down a bit. On Wednesday, August 22, 2012 2:50:28 AM UTC-7, Pro

[Puppet Users] Re: Puppet equivilent to "adduser [user] [group]"

2012-08-21 Thread Nick Fagerlund
You need to use the "groups" (not to be confused with "group"!) attribute to set a list of supplementary groups, and set the "membership" attribute to "minimum". Docs here: http://docs.puppetlabs.com/references/latest/type.html#user On Tuesday, August 21, 2012 2:12:55 PM UTC-7, David Bell wrote

[Puppet Users] List of every core fact is live

2012-08-21 Thread Nick Fagerlund
There's another brand new document today: A master list of every fact in Facter 1.6 core. We hope it's helpful! http://docs.puppetlabs.com/facter/1.6/core_facts.html This is a bit rough, and some of the facts are still undocumented, but it's got pretty much everything. Huge thanks to Ben Hughe

[Puppet Users] The rewritten Puppet 2.7 language reference is live

2012-08-21 Thread Nick Fagerlund
Hi all, I've finished the all new Puppet 2.7 language reference. EXCITING! Well, exciting to me, at least. Table of contents: http://docs.puppetlabs.com/puppet/2.7/reference/ Visual index (for when you know what you're looking for but you don't know what it's called): http://docs.puppetlabs.c

[Puppet Users] Re: What data to restore an existing Puppet Master?

2012-08-01 Thread Nick Fagerlund
Hey, Mitchell, HMM. Sounds like the docs team needs to get on this. (<-- is 1/2 the docs team) I'm going to name some special directory or file names below. These are all puppet config settings, and you can get the current value for them on any machine by running puppet master --configprint .

Re: [Puppet Users] Possible to push changes to nodes?

2012-07-31 Thread Nick Fagerlund
On Tuesday, July 31, 2012 6:03:37 AM UTC-7, Jakov Sosic wrote: > > > ... And maybe try to put this: > > [puppetrunner] > allow * > > to your client's /etc/puppet/namespace.auth? > > > Don't use namespaceauth.conf; it's vestigial code and does nothing. Patrick and I proved last week that

Re: [Puppet Users] Possible to push changes to nodes?

2012-07-27 Thread Nick Fagerlund
On Friday, July 27, 2012 9:41:28 AM UTC-7, Stephen J. wrote: > For lots of nodes, MCollective is definitely the way to go. For smaller > environments where you need one-off server initiated puppet runs, there's > also 'puppet kick' > > http://docs.puppetlabs.com/man/kick.html > > Note that get

[Puppet Users] Re: Weird "cannot reassign variable name on node" error when I try to use standalone

2012-07-26 Thread Nick Fagerlund
On Thursday, July 26, 2012 6:23:39 AM UTC-7, jcbollinger wrote: > > Hmm. I just realized that you are using Puppet in "apply" mode rather > than "agent" mode. The problem may simply be that puppet apply doesn't > want to handle node declarations. I don't use Puppet in "apply" mode, so > I'

[Puppet Users] Re: Custom providers/types correct location

2012-07-24 Thread Nick Fagerlund
On Tuesday, July 24, 2012 9:33:28 AM UTC-7, ZJE wrote: > > I'm using Puppet 3.0.0rfc3, so your YMMV, but for me it's > /lib/puppet/provider/ > and /lib/puppet/type > Note both "type" and "provider" are both singular - there's no trailing > 's'. > What ZJE said. The docs are here: http://doc

[Puppet Users] Re: Documentation Requirements

2012-07-20 Thread Nick Fagerlund
Manually generating module docs is kind of a drag. It'd be cool to have them served dynamically directly from the modulepath, with some kind of simple web app. (I think Nigel has already mentioned this internally, but I wanted to get it out in the public thread too.) -- You received this mess

[Puppet Users] Re: Can't create pdf from puppet doc

2012-07-20 Thread Nick Fagerlund
Here's your problem: puppet doc is actually TWO tools, both of which have major problems right now. You're mixing up invocations of the two. Which is a perfectly reasonable mistake and not really your fault. Anyway, the upshot is that you CAN'T generate PDFs from your module documentation. The

[Puppet Users] Re: Query functions for PuppetDB

2012-07-19 Thread Nick Fagerlund
On Thursday, July 19, 2012 10:02:32 AM UTC-7, Erik Dalén wrote: > It also supports getting facts for an array of hosts at once. As an > example if you want the IPs of all hosts with Apache class you could > do this: > > $hosts = pdbfactquery(pdbresourcequery([ 'and', [ '=', [ 'node', > 'acti

[Puppet Users] Re: Anyway to get the $name or $title of the resource being called?

2012-07-13 Thread Nick Fagerlund
You may be doing something weird, because $name and $title inside a defined type definition should definitely still refer to the instance's title. In fact, I just tested it to be sure: define my_file ($message) { notify {$title: message => "$message, and the title is still $title", } }

Re: [Puppet Users] class invocation instead of 'include'

2012-06-28 Thread Nick Fagerlund
On Tuesday, June 26, 2012 6:13:21 AM UTC-7, jcbollinger wrote: > I sympathize and agree in principle with the view that it should be > possible to re-declare the same parameterized class provided the parameters > are all the same. Nevertheless, that has never been possible with Puppet > 2.x'

Re: [Puppet Users] Re: Correct way to handle node-specific variable values in puppet 2.7

2012-06-21 Thread Nick Fagerlund
On Wednesday, June 20, 2012 6:00:04 AM UTC-7, jcbollinger wrote: > > > - oh, and don't ever use node inheritance. >> > > Why not? I mean, is that just to avoid the known issues with dynamic > scope, or does node inheritance introduce special problems in this > context? > Well... because ine

Re: [Puppet Users] Problem dealing with multi role servers/manifests. resource already declared.

2012-06-21 Thread Nick Fagerlund
On Thursday, June 21, 2012 7:24:59 AM UTC-7, trey85stang wrote: > > Actually, one more question to spawn off this... Is there a way in my > nagios/repo class to say if you have this class go ahead and assign > yourself to my new services:httpd class? Can that be done with > inheritance? I

[Puppet Users] Re: Custom facts and hyphens

2012-06-20 Thread Nick Fagerlund
What R.I. said. Hyphens in variable names and class names are a no-no, although they kinda work in some versions of Puppet. Use underscores instead. (Why are hyphens a problem? Well, partly because you can subtract variables in expressions. The ambiguity turned out to be a problem.) -- You r

[Puppet Users] Re: Puppet Configuration - Running --configprint generates long list of values

2012-06-20 Thread Nick Fagerlund
On Wednesday, June 20, 2012 12:38:58 PM UTC-7, Mike Reed wrote: > > My question is where do these parameters and values come from? I've > taken a look at my puppet.conf file... Defaults! Even if you only SET a few settings in puppet.conf, all of the POSSIBLE settings still have values. Thes

Re: [Puppet Users] Re: Correct way to handle node-specific variable values in puppet 2.7

2012-06-19 Thread Nick Fagerlund
On Tuesday, June 19, 2012 7:19:20 AM UTC-7, jcbollinger wrote: > > > Have I missed a change in plan for node variables, so that in Puppet 3 > they remain accessible outside node declarations? Does that form of > dynamic scoping live on? > > Yeah, they're effectively a tiny island of dynamic sc

Re: [Puppet Users] Re: Correct way to handle node-specific variable values in puppet 2.7

2012-06-19 Thread Nick Fagerlund
On Tuesday, June 19, 2012 1:24:42 PM UTC-7, Jon Schewe wrote: > > > So what I'm currently doing is perfectly valid and should continue to work > with 2.8, I've just got a version that's giving me extra warnings. Correct? > > Yup! ...sorry about that. Implementing those warnings correctly turned

Re: [Puppet Users] Puppet and Ruby 1.9

2012-06-19 Thread Nick Fagerlund
The official word from us is documented here: http://docs.puppetlabs.com/guides/platforms.html#ruby-versions Basically: you should try to stick with 1.8.7 through the 2.7 series, but 3.0 (which is in RC now) and higher will fully and unconditionally support 1.9.3. - To my knowledge, the whole

Re: [Puppet Users] Re: Correct way to handle node-specific variable values in puppet 2.7

2012-06-19 Thread Nick Fagerlund
On Tuesday, June 19, 2012 11:02:55 AM UTC-7, Jon Schewe wrote: > > > Am I getting this right that instead of just leaving the functionality in > puppet I should now call out to another application to have node-specific > variables? This seems like a step in the wrong direction. It's really nice

[Puppet Users] Re: using hiera for node classification

2012-06-18 Thread Nick Fagerlund
On Monday, June 18, 2012 12:18:51 PM UTC-7, jon wrote: > > If so, is it possible to pass in parameterized classes this way, like: > > user@host$ cat openstackall.yaml 2012-06-18 14:56:01 jon pts/13 > --- > classes: > - openstack::all: { > public_address: %{ipaddress_eth0}, > public_in

[Puppet Users] Re: File attributes inside template

2012-06-14 Thread Nick Fagerlund
On Thursday, June 14, 2012 12:43:48 PM UTC-7, Trunet wrote: > > Hi, > > I would like to know if I can use a File attribute inside a template. Is > it possible? > > No, you can't query resource attributes like that. Instead, you should extract the string into a variable, then use the same vari

[Puppet Users] Re: Can Puppet detect if a user has changed a *.conf file and not do anything to that *.conf file?

2012-06-14 Thread Nick Fagerlund
On Thursday, June 14, 2012 6:00:21 AM UTC-7, PorkCharSui wrote: > > ... can Puppet detect if a user has changed a *.conf file him(her)self and > NOT do anything to that *.conf file? > Nope! Puppet has no good way to tell the difference between: - A user using sudo to deliberately change a

[Puppet Users] Re: Setting up puppetmaster

2012-06-13 Thread Nick Fagerlund
On Wednesday, June 13, 2012 1:26:17 PM UTC-7, repoman wrote: > err: Could not retrieve catalog from remote server: hostname was not match > with the server certificate > Hey, repoman, This is a dns_alt_names problem. (Setting info: http://docs.puppetlabs.com/references/latest/configuration.

[Puppet Users] Re: override parameter within base class?

2012-05-30 Thread Nick Fagerlund
Probably use a class parameter. You're gonna want something like this, I think: class base ($kind = "normal") { $mpmtype = $kind ? { 'special' => 'prefork', default => 'worker', } class {'apache': mpm => $mpmtype } } On your normal nodes, you'd just "include base" or "class {'base'

Re: [Puppet Users] Learning Puppet Virtual Machine vs. Parallels Desktop = linux kernel panic

2012-05-25 Thread Nick Fagerlund
Ygor, Stefan, thanks so much for tracking this down. I will add these instructions to the Learning Puppet front page. On Friday, May 25, 2012 11:32:18 AM UTC-7, Stefan Lasiewski wrote: > > Thank you Ygor, this works! > > Now that you mention it, I remember that the Parallels virtual SCSI and >

Re: [Puppet Users] Re: Announce: PuppetDB 0.9.0 (first release) is available

2012-05-18 Thread Nick Fagerlund
On Friday, May 18, 2012 10:09:01 AM UTC-7, replicant wrote: > > I noticed it can't use MySQL, where as Puppet Dashboard can only use > MySQL. Does the dashboard plan on moving to something else or am I > going to have to run to separate DB providers in order to use PuppetDB > and Dashboard?

[Puppet Users] Re: Using backreferences from node name regex match

2012-04-26 Thread Nick Fagerlund
Yeah, I'm pretty sure that's not supported. But you could implement whatever you're trying to do with a regular regex match, if you need to. Use the built-in $clientcert variable, which contains the node's certname. (This assumes you're doing the default behavior of using the certname as the node

[Puppet Users] Re: Using templates

2012-02-12 Thread Nick Fagerlund
Delete that "include ssh" line in the default node! That should make it work the way you expect. (You don't have a class named "ssh", which is what include is looking for; instead, you have a defined type called "ssh." The way nodes.pp is written now, it's trying to declare both class ssh and an i

[Puppet Users] Re: Error 400 on SERVER: No support for http method POST

2012-02-08 Thread Nick Fagerlund
And if you suspect this, you can test which version the agents are ACTUALLY talking to by using a notify resource to log a message containing the magic $serverversion variable. (http:// docs.puppetlabs.com/guides/faq.html#are-there-variables-available- other-than-those-provided-by-facter) On Feb 8

  1   2   >