[Puppet Users] What else in stead of using import keyword?
With *import* is being phased out, what's the equivalent? I did go through this deprecation notice http://docs.puppetlabs.com/puppet/latest/reference/lang_import.html#deprecation-notice but didn't really get it. Say, I've some side-wide global variables defines in *sites.pp*: *#/etc/puppet/manifests/sites.pp* $my_var1 = 'ThisIsMyVar-2' $my_var2 = 'ThisIsMyVar-2' $my_other_var1 = 'ThisIsMyOtherVar-1' $my_other_var2 = 'ThisIsMyOtherVar-2' And in my does *nodes.pp*, I want to use them: *#/etc/puppet/manifests/nodes.pp* node default { notify { This is my MY_VAR: ${my_var}: } } How do I do this? Doing above, yields variable not found. Any idea? Best! -- 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 email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/7d4860a9-b210-49ca-860a-2b6b24f7d52d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] What else in stead of using import keyword?
Hi, actually, the very link you shared advises: To keep your node definitions http://docs.puppetlabs.com/puppet/latest/reference/lang_node_definitions.html in separate files, specify a directory as your main manifest http://docs.puppetlabs.com/puppet/latest/reference/dirs_manifest.html. Have you done that and still face errors? Regards, Felix On 07/13/2014 12:53 PM, Sans wrote: How do I do this? Doing above, yields variable not found. Any idea? -- 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 email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/53C28080.1000700%40Alumni.TU-Berlin.de. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Checking a variable is not 'undef'
On 07/13/2014 03:36 AM, Henrik Lindberg wrote: falsey: empty string, false, undef truthy: everything else In Puppet 4.0.0 this will be: falsey: false, undef truthy: everything else Oops? Interesting. This will break O(50%) of my manifests. Good to know, seeing as there is likely no deprecation warning for you are apparently using an empty string in boolean context, right? -- 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 email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/53C28224.4000804%40Alumni.TU-Berlin.de. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Failed to find [host] via exec
The work around I went with is to just avoid the require 'puppet' line in my external node classifier so I can avoid this issue completely. I just ignore the first line of the YAML file in /var/lib/puppet/yaml/facts/ and do YAML.load rather than YAML.load_file. - Taylor On Saturday, July 12, 2014 5:23:19 PM UTC-7, Taylor Leese wrote: It's also worth mentioning that even if I chown and chgrp /root/.facter/facts.d to puppet I still receive the same error. That also doesn't seem like it should be the solution. I found two Puppet issues that may be related, but it's not entirely clear if they are exactly the same. https://tickets.puppetlabs.com/browse/FACT-176 https://tickets.puppetlabs.com/browse/PUP-2367 - Taylor On Saturday, July 12, 2014 5:06:22 AM UTC-7, Taylor Leese wrote: Jose - Ah, the puppet master itself is running as the puppet user. *root@puppet:/etc/puppet# ps -ef | grep puppet* *root 1362 1 0 10:55 ?00:00:02 /usr/bin/ruby /usr/bin/puppet agent* *puppet 20719 1 0 11:31 ?00:00:00 Passenger RackApp: /usr/share/puppet/rack/puppetmasterd* I tried the following and got an error: *root@puppet:/etc/puppet# sudo -u puppet ./bin/node_classifier * */usr/lib/ruby/vendor_ruby/facter/util/directory_loader.rb:75:in `open': Permission denied - /root/.facter/facts.d (Errno::EACCES)* I'm not sure if this is really indicative of the actual problem or not. - Taylor On Saturday, July 12, 2014 4:54:22 AM UTC-7, Jose Luis Ledesma wrote: The node classifier command is launched by the same user the runs puppet master, and normally it is the 'puppet' user. You should try running the node classifier command in the puppet master with the same user it runs. Regards El 12/07/2014 13:52, Taylor Leese tlee...@gmail.com escribió: I probably also should have mentioned I am using Ubuntu 14 and this is running locally via Vagrant and the Vagrant agent provisioner. I've tried running the puppet agent manually after the Vagrant provisioning fails and I receive the same error message. Jose - When you say the command what do you mean? The node classifier? My VM doesn't have a puppet user so I checked to see what user the agent was running under and it is root. root@nexus:/home/vagrant# ps -ef | grep puppet root 1480 1 0 11:01 ?00:00:01 /usr/bin/ruby /usr/bin/ *puppet* agent - Taylor On Saturday, July 12, 2014 4:41:16 AM UTC-7, Jose Luis Ledesma wrote: Have you tried to run the command with the same user the puppet master is running? (Usually puppet) Regards, El 12/07/2014 13:39, Taylor Leese tlee...@gmail.com escribió: Hi all, I'm trying to setup an external node classifier and I'm running into an error that I haven't been able to resolve. *Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed when searching for node puppet.myhost.com http://puppet.myhost.com: Failed to find puppet.myhost.com http://puppet.myhost.com via exec: Execution of '/etc/puppet/bin/node_classifier puppet.myhost.com http://puppet.myhost.com' returned 1: * This is the relevant part of my puppet.conf: *node_terminus = exec* *external_nodes = /etc/puppet/bin/node_classifier* The interesting thing is that if I run the classifier manually I get what appears (to me) to be correct output. I'm using Puppet 3.4.3. Any idea what I might be doing wrong? *root@puppet:/etc/puppet# ./bin/node_classifier puppet.myhost.com http://puppet.myhost.com* *--- * * classes: * *- apt* *- common* *- ntp* *- puppet* *- sudo* *- users* * parameters: * *puppetserver: puppet.myhost.com http://puppet.myhost.com* * environment: production* *root@puppet:/etc/puppet# * - Taylor -- 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 email to puppet-users...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/ msgid/puppet-users/d5056060-42ad-4807-8b47-7c9b204bc94e% 40googlegroups.com https://groups.google.com/d/msgid/puppet-users/d5056060-42ad-4807-8b47-7c9b204bc94e%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- 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 email to puppet-users...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/31cd8d4d-54bc-44dd-9ef6-73fc2409829d%40googlegroups.com https://groups.google.com/d/msgid/puppet-users/31cd8d4d-54bc-44dd-9ef6-73fc2409829d%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- You received this message
Re: [Puppet Users] Checking a variable is not 'undef'
On 2014-13-07 14:57, Felix Frank wrote: On 07/13/2014 03:36 AM, Henrik Lindberg wrote: falsey: empty string, false, undef truthy: everything else In Puppet 4.0.0 this will be: falsey: false, undef truthy: everything else Oops? Interesting. This will break O(50%) of my manifests. Good to know, seeing as there is likely no deprecation warning for you are apparently using an empty string in boolean context, right? Yes, no deprecation issued as that would create an avalanche of deprecations. Best approach is to test with --parser future. - henrik -- Visit my Blog Puppet on the Edge http://puppet-on-the-edge.blogspot.se/ -- 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 email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/lpuca7%249ap%241%40ger.gmane.org. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] What else in stead of using import keyword?
Thanks Felix! it worked. Some reason, I missed that directory as manifest thing when first time I read it. BTW, I'm actually back to square one again: Using Vagrant for the provisioning and it doesn't accept/understand the directory as main manifest, throwing in error: puppet provisioner: * The configured Puppet manifest is missing. Please specify a path to an existing manifest: Do you (/any one) know a workaround? Best! To keep your node definitions http://docs.puppetlabs.com/puppet/latest/reference/lang_node_definitions.html in separate files, specify a directory as your main manifest http://docs.puppetlabs.com/puppet/latest/reference/dirs_manifest.html. -- 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 email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/12aa040d-a179-402b-9599-66d430197440%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] What else in stead of using import keyword?
On 07/13/2014 10:42 PM, Sans wrote: puppet provisioner: * The configured Puppet manifest is missing. Please specify a path to an existing manifest: Do you (/any one) know a workaround? Best! I assume this is a Vagrant bug, and there is likely no workaround. I'll take a quick look, might be easy to fix. Cheers, Felix -- 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 email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/53C2F258.3080504%40Alumni.TU-Berlin.de. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Checking a variable is not 'undef'
From my point of view is better a warning when a empty string is taken as a false, than some configuration applied erroneously once upgraded to 4.0 El 13/07/2014 18:32, Henrik Lindberg henrik.lindb...@cloudsmith.com escribió: On 2014-13-07 14:57, Felix Frank wrote: On 07/13/2014 03:36 AM, Henrik Lindberg wrote: falsey: empty string, false, undef truthy: everything else In Puppet 4.0.0 this will be: falsey: false, undef truthy: everything else Oops? Interesting. This will break O(50%) of my manifests. Good to know, seeing as there is likely no deprecation warning for you are apparently using an empty string in boolean context, right? Yes, no deprecation issued as that would create an avalanche of deprecations. Best approach is to test with --parser future. - henrik -- Visit my Blog Puppet on the Edge http://puppet-on-the-edge.blogspot.se/ -- 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 email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/ msgid/puppet-users/lpuca7%249ap%241%40ger.gmane.org. For more options, visit https://groups.google.com/d/optout. -- 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 email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAF_B3dda_ij%2B8HCi%3DRMCv_e2gx-%2BMYraB7nPByddMZDpCL9Eyg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] What else in stead of using import keyword?
Just found the bug report and the fix is HERE https://github.com/schauer/vagrant/commit/8a45485de4f1c8158f07168b4f491ee38d22c8fc . JFI, on OS X, basically, you need to open the file: /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/provisioners/puppet/config/puppet.rb and replace the line 108, with: *if !expanded_manifest_file.file? !expanded_manifest_file.directory?* worked just find for me. Best! On Sunday, July 13, 2014 9:56:06 PM UTC+1, Felix.Frank wrote: On 07/13/2014 10:42 PM, Sans wrote: puppet provisioner: * The configured Puppet manifest is missing. Please specify a path to an existing manifest: Do you (/any one) know a workaround? Best! I assume this is a Vagrant bug, and there is likely no workaround. I'll take a quick look, might be easy to fix. Cheers, Felix -- 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 email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/62145129-c4e4-407b-bff5-18f0e9ac405f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] puppet modules export?
I get two puppetserver: A) Puppetserver: this is the old (I have got modules) B) Puppetserver: this is the new (I haven't got modules) I coppy the enviroments, moduls etc... But the agent nothing changed (catalog always finished). What shell I do? OS: Ubuntu -- 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 email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/40c03ea6-8652-4295-bbe8-fa7c70f3e604%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Best Practice - replacing /etc/passwd and +@netgroups
We're running primarily RHEL6, and Puppet Enterprise 3.2 In our non-puppetized world, we make heavy use of netgroups (stored in ldap, entered in /etc/passwd) to control access to servers. There's been much discussion and some confusion about the best way to control user access going forwards. The ldap netgroups are also used for sudoers permissions. It feels like this is a very vanilla way to use password files and netgroups. Does someone here have a good way to manage this, or a better idea? The primary puppet programmer in our group starting working with the forge accounts module, but fell down a rathole because RHEL6 default system accounts have multiple users with the same home directory and the forge module wouldn't accommodate that. I don't want to spend a huge amount of time and effort coding around accommodating RHEL system user accounts that never, ever, change. My gut instinct is that we should find some way (Augeas?) to assemble /etc/passwd accounts from a default set of text entries plus some custom lines for each server. If we don't come up with a better idea we're going to end up pushing password files out as *files*, which I understand is not the DevOps Puppet Way but it's better than what we're doing now. Is this, indeed, a Solved Problem? What is everyone else doing? thanks Betsy -- 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 email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAAVLHR0awkix5179S3bvjOGJ%2Bng-7aBg0FAXQQRApjfxr6Z0uw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: Puppet copy not working
Hey Nishantu, please share some output and at least the manifests content. On Friday, July 11, 2014 7:51:38 PM UTC+10, Nishantu Kumar wrote: Hello All, I have successfully configured puppet master and agent on two machines and i have created a file in manifest directory to copy a file from master server to agent machine but its not copying and throwing some error, can anyone tell me and share with me the procedure to copy file from master server to client machine. Thanks in advance Nishantu -- 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 email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/24c93720-1c4b-4610-b5df-8aeaaa06978f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Puppet Users] Re: Error to install java7
Hey Joni, what module are you exactly using (custom made or from the forge) ? I am guessing that you are missing the modulepath/java7/files/jdk-7us-linux-i586.tar.gz file in your module files directory, because usually you need to pre-download java, since you need to agree on their terms of condition. On Friday, July 11, 2014 7:41:18 PM UTC+10, Joni Silaban wrote: https://lh4.googleusercontent.com/-rytlgq-lXj4/U7-wgtJeP8I/ADs/IoUDhR3fY9Q/s1600/Capture.PNG Hello guys,, please help me to solve this error. What should I do? I have set the file mode is 777 [just for test] but the error was same. Thank you... -- 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 email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/559c69a3-044b-46d9-a0e8-89c0d7bcb604%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] What else in stead of using import keyword?
On 07/13/2014 11:12 PM, Sans wrote: Just found the bug report and the fix is HERE https://github.com/schauer/vagrant/commit/8a45485de4f1c8158f07168b4f491ee38d22c8fc. JFI, on OS X, basically, you need to open the file: /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/provisioners/puppet/config/puppet.rb and replace the line 108, with: *if !expanded_manifest_file.file? !expanded_manifest_file.directory?* worked just find for me. Best! Good find. Would have saved me 15 minutes ;) https://github.com/mitchellh/vagrant/pull/4185 -- 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 email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/53C30625.507%40Alumni.TU-Berlin.de. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Best Practice - replacing /etc/passwd and +@netgroups
On Sun, Jul 13, 2014 at 3:01 PM, Betsy Schwartz betsy.schwa...@gmail.com wrote: Is this, indeed, a Solved Problem? What is everyone else doing? thanks Betsy Disclaimer: I am not doing this. Yet. Have you looked at FreeIPA? -mz -- 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 email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAOLfK3W6wqS3QRwLHwCauXF59Oez2goRmDH5mZF%3DzTsf2u7g6Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Best Practice - replacing /etc/passwd and +@netgroups
Hi Matt, I've heard of FreeIPA, but that feels like a longer project (and would probably get tied into AD integration and another project we have going to combine multiple business units) For Phase One we're hoping to centralize and automate something close to what we have now. Thanks Betsy On Sun, Jul 13, 2014 at 8:31 PM, Matt Zagrabelny mzagr...@d.umn.edu wrote: On Sun, Jul 13, 2014 at 3:01 PM, Betsy Schwartz betsy.schwa...@gmail.com wrote: Is this, indeed, a Solved Problem? What is everyone else doing? thanks Betsy Disclaimer: I am not doing this. Yet. Have you looked at FreeIPA? -mz -- 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 email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAOLfK3W6wqS3QRwLHwCauXF59Oez2goRmDH5mZF%3DzTsf2u7g6Q%40mail.gmail.com . For more options, visit https://groups.google.com/d/optout. -- 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 email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAAVLHR0f8hCCVV0tM%3DJkKgQMSskhpDZGrARQoVja62TdDqD6rA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.