Re: [Puppet Users] require one file from several environments
Data like this should probably go into hiera. Then write modules to use the data via parameterized classes or hiera() lookups. For example we use the datadir directive in hiera to split out hiera lookups to become environments aware. This would simplify your data structure to where you are just specifying the data for each environment to use instead of having to code your manifests to understand the data structure in a environmentally aware state. Example in your prod environment hiera yaml: software::soft1::version: 0.0.6 Example in your test environment hiera yaml: software::soft1::version: 0.0.7 Then in your class: class software::soft1($version) { package { 'soft1': ensure = $version } Hiera would give your puppet clients the correct answer based on environment... However if you just want to use your data structure you referenced above you can place it into a module/class or even use import. However importing in a file like site.pp is not really recommended for various reasons. On Fri, Oct 4, 2013 at 10:52 AM, kay kay kay.d...@gmail.com wrote: I would like to create one file with array, i.e.: $pkg_versions = { soft1 = { prod = 0.0.6, test = 0.0.7 }, soft2 = { prod = 1.1.4, test = 1.1.5 }; } And require this file in several environments. I tried to use require /var/lib/puppet/somedir/etc/file.inc, but puppet can not find it. What solution should I use? Or maybe is it possible to put this array in puppet class, include it in parent classe and get its values? Thanks for help! -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Converting augeas snippet to puppet augeas resource
Ouch my eyes... Augeas can wreck your day sometimes. I have to ask though, why not use the Puppetlabs Firewall Module? It's here: https://forge.puppetlabs.com/puppetlabs/firewall Then you would do something like this: firewall { 'mayo_fw TCP/3': ensure = present, table = 'filter', chain = 'Mayo-Firewall-INPUT', proto = 'tcp', dport = 3, action = 'accept', } #End As far as your output above it looks like it errored out on the files iptables.save and iptables.orig? What's weird is you have incl commented out which would make me think it should only load the one path you specified. On Fri, Oct 4, 2013 at 7:13 AM, Patrick Spinler pspin...@gmail.com wrote: (apologies in advance for the line wrap) I have the following tidbit of augeas code, which inserts a rule into /etc/sysconfig/iptables as the first rule of a specifically named chain; # augtool insert append before /files/etc/sysconfig/iptables/table/append[. = 'Mayo-Firewall-INPUT'][1] # augtool match /files/etc/sysconfig/iptables/table/append[. = ''] # /files/etc/sysconfig/iptables/table/append[8] = (none) # augtool set /files/etc/sysconfig/iptables/table/append[. = ''] 'Mayo-Firewall-INPUT' # augtool set /files/etc/sysconfig/iptables/table/append[. = 'Mayo-Firewall-INPUT'][1]/protocol 'tcp' # augtool set /files/etc/sysconfig/iptables/table/append[. = 'Mayo-Firewall-INPUT'][1]/match 'tcp' # augtool set /files/etc/sysconfig/iptables/table/append[. = 'Mayo-Firewall-INPUT'][1]/dport '3' # augtool set /files/etc/sysconfig/iptables/table/append[. = 'Mayo-Firewall-INPUT'][1]/jump 'ACCEPT' # augtool print /files/etc/sysconfig/iptables/table/append[. = 'Mayo-Firewall-INPUT'][1] # /files/etc/sysconfig/iptables/table/append[8] = Mayo-Firewall-INPUT # /files/etc/sysconfig/iptables/table/append[8]/dport = 3 # /files/etc/sysconfig/iptables/table/append[8]/match = tcp # /files/etc/sysconfig/iptables/table/append[8]/protocol = tcp # /files/etc/sysconfig/iptables/table/append[8]/jump = ACCEPT I'd like to convert this to a puppet augeas define. So far, I've got this: define mayo_firewall_insert ($dport, $proto) { augeas { firewall_${title}: context = /files/etc/sysconfig/iptables/table, # incl = /etc/sysconfig/iptables, # lens = iptables.aug, onlyif = match append[dport='$dport'] size != 0, changes = [ insert append before append[. = 'Mayo-Firewall-INPUT'][1], set append[. = ''] 'Mayo-Firewall-INPUT', set append[. = 'Mayo-Firewall-INPUT'][1]/protocol '$proto', set append[. = 'Mayo-Firewall-INPUT'][1]/match '$proto', set append[. = 'Mayo-Firewall-INPUT'][1]/dport '$dport', set append[. = 'Mayo-Firewall-INPUT'][1]/jump 'ACCEPT', ], } However, when I declare a resource using the above define, I get augeas syntax errors, and I'm not sure how to track down the problem: (invoked as 'puppet apply --verbose --debug --detailed-exitcodes --execute include omnibus_node') ... Debug: Augeas[firewall_omnibus_tcp_4100](provider=augeas): Opening augeas with root /, lens path , flags 32 Debug: Augeas[firewall_omnibus_tcp_4100](provider=augeas): Augeas version 1.1.0 is installed Warning: Augeas[firewall_omnibus_tcp_4100](provider=augeas): Loading failed for one or more files, see debug for /augeas//error output Debug: Augeas[firewall_omnibus_tcp_4100](provider=augeas): /augeas/files/etc/sysconfig/iptables.save/error/pos = 115 Debug: Augeas[firewall_omnibus_tcp_4100](provider=augeas): /augeas/files/etc/sysconfig/iptables.save/error/line = 3 Debug: Augeas[firewall_omnibus_tcp_4100](provider=augeas): /augeas/files/etc/sysconfig/iptables.save/error/char = 0 Debug: Augeas[firewall_omnibus_tcp_4100](provider=augeas): /augeas/files/etc/sysconfig/iptables.save/error/lens = /shares/nfs/unixarch/share/augeas/lenses/dist/shellvars.aug:163.12-.99: Debug: Augeas[firewall_omnibus_tcp_4100](provider=augeas): /augeas/files/etc/sysconfig/iptables.save/error/message = Syntax error Debug: Augeas[firewall_omnibus_tcp_4100](provider=augeas): /augeas/files/etc/sysconfig/iptables.orig/error/pos = 64 Debug: Augeas[firewall_omnibus_tcp_4100](provider=augeas): /augeas/files/etc/sysconfig/iptables.orig/error/line = 2 Debug: Augeas[firewall_omnibus_tcp_4100](provider=augeas): /augeas/files/etc/sysconfig/iptables.orig/error/char = 0 Debug: Augeas[firewall_omnibus_tcp_4100](provider=augeas): /augeas/files/etc/sysconfig/iptables.orig/error/lens = /shares/nfs/unixarch/share/augeas/lenses/dist/shellvars.aug:163.12-.99: Debug: Augeas[firewall_omnibus_tcp_4100](provider=augeas): /augeas/files/etc/sysconfig/iptables.orig/error/message = Syntax error Debug: Augeas[firewall_omnibus_tcp_4100](provider=augeas): Closed the augeas connection ... I'm guessing the augeas tree isn't what I think it is by the time it goes to
[Puppet Users] storeconfigs
Hi guys! I need your help: I've installed SQL-Lite3 on my puppetmaster. I activated storeconfigs both on my puppetmaster and puppetagent. I'm trying to collect all SSH-public keys from all Agents: site.pp: class exporter { @@file {$fqdn: path = /var/lib/puppet/$fqdn, content = $ipaddress\n, tag = ip, } node agentx.domain1 { include exporter } node master.domain1 { File | tag == ip | } If i execute the following command, it works on the Puppetmaster: puppet agent --test but if I do that on the Agent agentx.domain1 then I get this error message: Info: ActiveRecord 2.1 or later required for StoreConfigs err: Cached facts for agentx.domain1 failed: Could'nt autoload active record: uninitialized constant ActiveRecord Can someone give me a hint? -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: storeconfigs
If I remove storeconfigs=true from the Agent's puppet.conf-file then there is no error on the Agent. But the desired files aren't created in the puppet-server's /var/lib/puppet-directory. No files are created. So where is the data collected? Can anyone help me? -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
[Puppet Users] Re: Installing Puppet on Windows: Error 1053
Same stuff for russian windows Please help us ) среда, 17 июля 2013 г., 20:27:05 UTC+4 пользователь Иван Кадочников написал: Hi all, I have trouble installing puppet open source 3.2.3 from the msi package on Windows 7 Home Basic. The error message is Service 'Puppet Agent' (puppet) failed to start. Verify that you have sufficient privileges to start system services. I am pretty sure it's not a privileges problem. If (without closing the installer, as that would roll back everything) I open Services and try to start Puppet Agent manually it fails to start with Error 1053: The service did not respond to the start or control request in a timely fashion. This may be a timeout problem (the hardware is a netbook), but I doubt it. 1) Is there a way to install Puppet without installing or auto-starting the service? A checkbox in the installer would be nice. 2) Is there a way to avoid rolling back the whole installation if the service failed to start? A yes/no dialog would be nice. Yes, I will start the service later manually, after I figure out what's wrong, thank you 3) What could be causing this, what can I do to work around this? I have tried adding registry key \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ServicesPipeTimeout = 12 (googling error 1053 led me to believe it might help, but it did not) Then I tried to run Puppet directly (still without closing the installer): C:\Program Files\Puppet Labs\Puppet\binpuppet.bat C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/gems/1.9.1/gems/win32-dir- 0.3.7/lib/win32/dir.rb:54:in `strip': invalid byte sequence in US-ASCII (Argumen tError) from C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/gems/1.9.1/ge ms/win32-dir-0.3.7/lib/win32/dir.rb:54:in `block in class:Dir' from C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/gems/1.9.1/ge ms/win32-dir-0.3.7/lib/win32/dir.rb:36:in `each' from C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/gems/1.9.1/ge ms/win32-dir-0.3.7/lib/win32/dir.rb:36:in `class:Dir' from C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/gems/1.9.1/ge ms/win32-dir-0.3.7/lib/win32/dir.rb:13:in `top (required)' from C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/site_ruby/1.9 .1/rubygems/custom_require.rb:60:in `require' from C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/site_ruby/1.9 .1/rubygems/custom_require.rb:60:in `rescue in require' from C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/site_ruby/1.9 .1/rubygems/custom_require.rb:35:in `require' from C:/Program Files/Puppet Labs/Puppet/facter/lib/facter/util/config.r b:44:in `top (required)' from C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/site_ruby/1.9 .1/rubygems/custom_require.rb:36:in `require' from C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/site_ruby/1.9 .1/rubygems/custom_require.rb:36:in `require' from C:/Program Files/Puppet Labs/Puppet/facter/lib/facter/util/resoluti on.rb:7:in `top (required)' from C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/site_ruby/1.9 .1/rubygems/custom_require.rb:36:in `require' from C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/site_ruby/1.9 .1/rubygems/custom_require.rb:36:in `require' from C:/Program Files/Puppet Labs/Puppet/facter/lib/facter/util/fact.rb: 2:in `top (required)' from C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/site_ruby/1.9 .1/rubygems/custom_require.rb:36:in `require' from C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/site_ruby/1.9 .1/rubygems/custom_require.rb:36:in `require' from C:/Program Files/Puppet Labs/Puppet/facter/lib/facter.rb:23:in `mo dule:Facter' from C:/Program Files/Puppet Labs/Puppet/facter/lib/facter.rb:19:in `to p (required)' from C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/site_ruby/1.9 .1/rubygems/custom_require.rb:36:in `require' from C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/site_ruby/1.9 .1/rubygems/custom_require.rb:36:in `require' from C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet.rb:6:in `top (required)' from C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/site_ruby/1.9 .1/rubygems/custom_require.rb:36:in `require' from C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/site_ruby/1.9 .1/rubygems/custom_require.rb:36:in `require' from C:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/util/command_ line.rb:12:in `top (required)' from C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/site_ruby/1.9 .1/rubygems/custom_require.rb:36:in `require' from C:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/site_ruby/1.9 .1/rubygems/custom_require.rb:36:in `require' from C:/Program Files/Puppet
Re: [Puppet Users] err: Could not retrieve catalog from remote server: Error 400 on SERVER: allocator undefined for Proc
Hi there, Just to report that I still see the same issue: Debug: catalog supports formats: b64_zlib_yaml dot pson raw yaml; using pson Error: Could not retrieve catalog from remote server: Error 400 on SERVER: allocator undefined for Proc /usr/lib/ruby/vendor_ruby/puppet/indirector/rest.rb:185:in `is_http_200?' /usr/lib/ruby/vendor_ruby/puppet/indirector/rest.rb:100:in `find' /usr/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:197:in `find' /usr/lib/ruby/vendor_ruby/puppet/configurer.rb:243:in `block in retrieve_new_catalog' /usr/lib/ruby/vendor_ruby/puppet/util.rb:351:in `block in thinmark' /usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime' /usr/lib/ruby/vendor_ruby/puppet/util.rb:350:in `thinmark' /usr/lib/ruby/vendor_ruby/puppet/configurer.rb:242:in `retrieve_new_catalog' /usr/lib/ruby/vendor_ruby/puppet/configurer.rb:67:in `retrieve_catalog' /usr/lib/ruby/vendor_ruby/puppet/configurer.rb:107:in `prepare_and_retrieve_catalog' /usr/lib/ruby/vendor_ruby/puppet/configurer.rb:159:in `run' /usr/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (5 levels) in run' /usr/lib/ruby/vendor_ruby/puppet/agent/locker.rb:20:in `lock' /usr/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (4 levels) in run' /usr/lib/ruby/1.9.1/sync.rb:227:in `sync_synchronize' /usr/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (3 levels) in run' /usr/lib/ruby/vendor_ruby/puppet/agent.rb:119:in `with_client' /usr/lib/ruby/vendor_ruby/puppet/agent.rb:42:in `block (2 levels) in run' /usr/lib/ruby/vendor_ruby/puppet/agent.rb:84:in `run_in_fork' /usr/lib/ruby/vendor_ruby/puppet/agent.rb:41:in `block in run' /usr/lib/ruby/vendor_ruby/puppet/application.rb:179:in `call' /usr/lib/ruby/vendor_ruby/puppet/application.rb:179:in `controlled_run' /usr/lib/ruby/vendor_ruby/puppet/agent.rb:39:in `run' /usr/lib/ruby/vendor_ruby/puppet/application/agent.rb:353:in `onetime' /usr/lib/ruby/vendor_ruby/puppet/application/agent.rb:327:in `run_command' /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block (2 levels) in run' /usr/lib/ruby/vendor_ruby/puppet/application.rb:456:in `plugin_hook' /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block in run' /usr/lib/ruby/vendor_ruby/puppet/util.rb:504:in `exit_on_fail' /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `run' /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run' /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:86:in `execute' /usr/bin/puppet:4:in `main' Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run Debug: report supports formats: b64_zlib_yaml pson raw yaml; using pson System info, as requested: root@ip-10-0-3-82:/etc/puppet/modules# lsb_release -irc Distributor ID:Debian Release:6.0.7 Codename:squeeze # root@ip-10-0-3-82:/etc/puppet/modules# ruby -v ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux] # root@ip-10-0-3-82:/etc/puppet/modules# puppet -V 3.1.1 Only workaround, for me, so far is to delete the node from the puppet database. Cheers!! On Thursday, November 29, 2012 2:34:50 PM UTC, John Lamb wrote: OS: Red Hat Enterprise Linux Server release 6.3 (Santiago) Ruby: ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux] Puppet: puppet-3.0.1-1.el6.noarch I can get the facter output to you later today. For what it's worth, I ran into this problem as I was developing a class within an already-existing service. I referenced one or several resources that didn't actually exist (via the require metaparameter - I tried to require Group['git'],) and after fixing this issue I was no longer able to get my puppet agent runs to work, even after commenting out all the changes I had made. I was able to fix this by trying puppet node clean broken.node.name, which failed, then I tested puppet node clean against a working node, which also failed, then on a whim I tried it against the broken node once more, at which point it worked. Since then puppet has worked as usual. The error I got from puppet node clean is: Error: uninitialized constant ActiveRecord::Base Error: Try 'puppet help node clean' for usage Interestingly, this morning our puppet deprecation report told us: 11 ActiveRecord-based storeconfigs and inventory are deprecated. We normally don't have any deprecated storeconfigs. We have a total of 25 machines. I don't know if this is related to the issue at large. On Wednesday, November 28, 2012 8:09:38 PM UTC-5, Jeff McCune wrote: On Wed, Nov 28, 2012 at 10:55 AM, John Lamb lam...@wfu.edu wrote: I am also seeing this bug on one of my nodes (worryingly, the puppet master itself!) The relevant output of puppet agent -t --debug --trace --verbose matches what Fabrice and Lee have also reported: OK, there's definitely a bug somewhere... I'm going to work on reproducing this issue tomorrow. Before then, could anyone affected by this allocator undefined for Proc error
Re: [Puppet Users] err: Could not retrieve catalog from remote server: Error 400 on SERVER: allocator undefined for Proc
Hi there, Just to report that I still see the same issue: Debug: catalog supports formats: b64_zlib_yaml dot pson raw yaml; using pson Error: Could not retrieve catalog from remote server: Error 400 on SERVER: allocator undefined for Proc /usr/lib/ruby/vendor_ruby/puppet/indirector/rest.rb:185:in `is_http_200?' /usr/lib/ruby/vendor_ruby/puppet/indirector/rest.rb:100:in `find' /usr/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:197:in `find' /usr/lib/ruby/vendor_ruby/puppet/configurer.rb:243:in `block in retrieve_new_catalog' /usr/lib/ruby/vendor_ruby/puppet/util.rb:351:in `block in thinmark' /usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime' /usr/lib/ruby/vendor_ruby/puppet/util.rb:350:in `thinmark' /usr/lib/ruby/vendor_ruby/puppet/configurer.rb:242:in `retrieve_new_catalog' /usr/lib/ruby/vendor_ruby/puppet/configurer.rb:67:in `retrieve_catalog' /usr/lib/ruby/vendor_ruby/puppet/configurer.rb:107:in `prepare_and_retrieve_catalog' /usr/lib/ruby/vendor_ruby/puppet/configurer.rb:159:in `run' /usr/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (5 levels) in run' /usr/lib/ruby/vendor_ruby/puppet/agent/locker.rb:20:in `lock' /usr/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (4 levels) in run' /usr/lib/ruby/1.9.1/sync.rb:227:in `sync_synchronize' /usr/lib/ruby/vendor_ruby/puppet/agent.rb:45:in `block (3 levels) in run' /usr/lib/ruby/vendor_ruby/puppet/agent.rb:119:in `with_client' /usr/lib/ruby/vendor_ruby/puppet/agent.rb:42:in `block (2 levels) in run' /usr/lib/ruby/vendor_ruby/puppet/agent.rb:84:in `run_in_fork' /usr/lib/ruby/vendor_ruby/puppet/agent.rb:41:in `block in run' /usr/lib/ruby/vendor_ruby/puppet/application.rb:179:in `call' /usr/lib/ruby/vendor_ruby/puppet/application.rb:179:in `controlled_run' /usr/lib/ruby/vendor_ruby/puppet/agent.rb:39:in `run' /usr/lib/ruby/vendor_ruby/puppet/application/agent.rb:353:in `onetime' /usr/lib/ruby/vendor_ruby/puppet/application/agent.rb:327:in `run_command' /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block (2 levels) in run' /usr/lib/ruby/vendor_ruby/puppet/application.rb:456:in `plugin_hook' /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `block in run' /usr/lib/ruby/vendor_ruby/puppet/util.rb:504:in `exit_on_fail' /usr/lib/ruby/vendor_ruby/puppet/application.rb:364:in `run' /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run' /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:86:in `execute' /usr/bin/puppet:4:in `main' Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run Debug: report supports formats: b64_zlib_yaml pson raw yaml; using pson System info, as requested: root@ip-10-0-3-82:/etc/puppet/modules# lsb_release -irc Distributor ID:Debian Release:6.0.7 Codename:squeeze # root@ip-10-0-3-82:/etc/puppet/modules# ruby -v ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux] # root@ip-10-0-3-82:/etc/puppet/modules# puppet -V 3.1.1 Only workaround, for me, so far is to delete the node from the puppet database. Cheers!! -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Puppet is always trying 'service start' instead of 'restart' - how to force restart?
Thanks Trevor! Although I was wondering about it but never thought that's actually causing this problem. On Debian/Ubuntu, the name of the init.d script (ganglia-monitor) is different than the daemon (gmond). Fixed now. Cheers!! -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Puppet.3.3.0.msi Package Failed to Install
Chengkai, I'm not seeing the error message. But let me ask this question - are you attempting to install on a non en-US machine? If so, we just fixed a nasty bug that had errors with starting the agent service (something that is done during installation). https://projects.puppetlabs.com/issues/22493 This just went into v 3.3.1-rc3 release. If your error was similar to the one in the link above, when 3.3.1 releases it should resolve this issue. If this is not your issue, please attach your error for further inspection. Thanks! On Fri, Oct 4, 2013 at 9:12 AM, chengkai liang ckm.li...@gmail.com wrote: I have download recent version puppet.3.3.0.msi from PuppetLab and trying to install it on Windows 7. The MSI package throws out the following error message, This also happen on Puppet enterprise MSI package. So I wonder if anybody encounter this problem, and what's the solution for it? Thanks, Chengkai -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- Rob Reynolds Developer, Puppet Labs Join us at PuppetConf 2014, September 23-24 in San Francisco -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Converting augeas snippet to puppet augeas resource
I'm not using the puppet firewall module because, if I read the docs correctly, I'd need to use that module to completely manage the firewall settings, and it seems to require a good bit of setup to get there, too. Unfortunately, due to political and organizational circumstance, I don't have the ability to subsume the system's setup in that fashion. Maybe someday. Until then, I can only add my extra stuff on top. Ergo, augeas. As far as commenting out the incl and lens settings; I wasn't sure they had the correct syntax and were working, or may even have been part of the problem. Ergo, simplify, and comment out until then. I'll try using them again, thanks. -- Pat On 10/6/13 4:09 AM, Cory Stoker wrote: Ouch my eyes... Augeas can wreck your day sometimes. I have to ask though, why not use the Puppetlabs Firewall Module? It's here: https://forge.puppetlabs.com/puppetlabs/firewall Then you would do something like this: firewall { 'mayo_fw TCP/3': ensure = present, table = 'filter', chain = 'Mayo-Firewall-INPUT', proto = 'tcp', dport = 3, action = 'accept', } #End As far as your output above it looks like it errored out on the files iptables.save and iptables.orig? What's weird is you have incl commented out which would make me think it should only load the one path you specified. On Fri, Oct 4, 2013 at 7:13 AM, Patrick Spinler pspin...@gmail.com wrote: (apologies in advance for the line wrap) I have the following tidbit of augeas code, which inserts a rule into /etc/sysconfig/iptables as the first rule of a specifically named chain; # augtool insert append before /files/etc/sysconfig/iptables/table/append[. = 'Mayo-Firewall-INPUT'][1] # augtool match /files/etc/sysconfig/iptables/table/append[. = ''] # /files/etc/sysconfig/iptables/table/append[8] = (none) # augtool set /files/etc/sysconfig/iptables/table/append[. = ''] 'Mayo-Firewall-INPUT' # augtool set /files/etc/sysconfig/iptables/table/append[. = 'Mayo-Firewall-INPUT'][1]/protocol 'tcp' # augtool set /files/etc/sysconfig/iptables/table/append[. = 'Mayo-Firewall-INPUT'][1]/match 'tcp' # augtool set /files/etc/sysconfig/iptables/table/append[. = 'Mayo-Firewall-INPUT'][1]/dport '3' # augtool set /files/etc/sysconfig/iptables/table/append[. = 'Mayo-Firewall-INPUT'][1]/jump 'ACCEPT' # augtool print /files/etc/sysconfig/iptables/table/append[. = 'Mayo-Firewall-INPUT'][1] # /files/etc/sysconfig/iptables/table/append[8] = Mayo-Firewall-INPUT # /files/etc/sysconfig/iptables/table/append[8]/dport = 3 # /files/etc/sysconfig/iptables/table/append[8]/match = tcp # /files/etc/sysconfig/iptables/table/append[8]/protocol = tcp # /files/etc/sysconfig/iptables/table/append[8]/jump = ACCEPT I'd like to convert this to a puppet augeas define. So far, I've got this: define mayo_firewall_insert ($dport, $proto) { augeas { firewall_${title}: context = /files/etc/sysconfig/iptables/table, # incl = /etc/sysconfig/iptables, # lens = iptables.aug, onlyif = match append[dport='$dport'] size != 0, changes = [ insert append before append[. = 'Mayo-Firewall-INPUT'][1], set append[. = ''] 'Mayo-Firewall-INPUT', set append[. = 'Mayo-Firewall-INPUT'][1]/protocol '$proto', set append[. = 'Mayo-Firewall-INPUT'][1]/match '$proto', set append[. = 'Mayo-Firewall-INPUT'][1]/dport '$dport', set append[. = 'Mayo-Firewall-INPUT'][1]/jump 'ACCEPT', ], } However, when I declare a resource using the above define, I get augeas syntax errors, and I'm not sure how to track down the problem: (invoked as 'puppet apply --verbose --debug --detailed-exitcodes --execute include omnibus_node') ... Debug: Augeas[firewall_omnibus_tcp_4100](provider=augeas): Opening augeas with root /, lens path , flags 32 Debug: Augeas[firewall_omnibus_tcp_4100](provider=augeas): Augeas version 1.1.0 is installed Warning: Augeas[firewall_omnibus_tcp_4100](provider=augeas): Loading failed for one or more files, see debug for /augeas//error output Debug: Augeas[firewall_omnibus_tcp_4100](provider=augeas): /augeas/files/etc/sysconfig/iptables.save/error/pos = 115 Debug: Augeas[firewall_omnibus_tcp_4100](provider=augeas): /augeas/files/etc/sysconfig/iptables.save/error/line = 3 Debug: Augeas[firewall_omnibus_tcp_4100](provider=augeas): /augeas/files/etc/sysconfig/iptables.save/error/char = 0 Debug: Augeas[firewall_omnibus_tcp_4100](provider=augeas): /augeas/files/etc/sysconfig/iptables.save/error/lens = /shares/nfs/unixarch/share/augeas/lenses/dist/shellvars.aug:163.12-.99: Debug: Augeas[firewall_omnibus_tcp_4100](provider=augeas): /augeas/files/etc/sysconfig/iptables.save/error/message = Syntax error Debug: Augeas[firewall_omnibus_tcp_4100](provider=augeas):
Re: [Puppet Users] Re: storeconfigs
It looks like you do not have all the Ruby gems installed. Storeconfigs requires Activerecord version 2.1 or later. On your system depending on how you install your Ruby gems, you should run: #see if Activerecord is installed gem list if you do not find it installed then you should install from pacjage manager or do a gem install activerecord. http://projects.puppetlabs.com/projects/1/wiki/using_stored_configuration Also it should be noted that storeconfigs has been replaced by puppetdb and if you are doing this for the first time you should use PuppetDB instead of storeconfigs. http://docs.puppetlabs.com/puppetdb/latest/ HTH -Cory On Sun, Oct 6, 2013 at 6:58 AM, ytmp123 tmp...@hotmail.de wrote: If I remove storeconfigs=true from the Agent's puppet.conf-file then there is no error on the Agent. But the desired files aren't created in the puppet-server's /var/lib/puppet-directory. No files are created. So where is the data collected? Can anyone help me? -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Puppet.3.3.0.msi Package Failed to Install
I will see if that version fix the problem. On Oct 6, 2013, at 11:16 AM, Rob Reynolds r...@puppetlabs.com wrote: Chengkai, I'm not seeing the error message. But let me ask this question - are you attempting to install on a non en-US machine? If so, we just fixed a nasty bug that had errors with starting the agent service (something that is done during installation). https://projects.puppetlabs.com/issues/22493 This just went into v 3.3.1-rc3 release. If your error was similar to the one in the link above, when 3.3.1 releases it should resolve this issue. If this is not your issue, please attach your error for further inspection. Thanks! On Fri, Oct 4, 2013 at 9:12 AM, chengkai liang ckm.li...@gmail.com wrote: I have download recent version puppet.3.3.0.msi from PuppetLab and trying to install it on Windows 7. The MSI package throws out the following error message, This also happen on Puppet enterprise MSI package. So I wonder if anybody encounter this problem, and what's the solution for it? Thanks, Chengkai -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- Rob Reynolds Developer, Puppet Labs Join us at PuppetConf 2014, September 23-24 in San Francisco -- You received this message because you are subscribed to a topic in the Google Groups Puppet Users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/kWt1ll3zYic/unsubscribe. To unsubscribe from this group and all its topics, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- 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 post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Converting augeas snippet to puppet augeas resource
For what it's worth, leaving the incl = and lens = statements in did the trick. Either that or cleaning up some of the iptables.save and other similar files ahead of time. I did have to figure out the correct format for the lens = statement, which is apparently to use a capitalized lens name with a '.lns' suffix, like 'Iptables.lns'. It wasn't clear from the documentation, and I had tried the actual file name containing the lens, 'iptables.aug', first. That's why I had initially commented these sections out. The lens name clearly comes from the 'module' statement inside the lens source file, iptables.aug, but where the '.lns' suffix comes from I have no idea. Anyway, thanks again, -- Pat On 10/6/13 3:24 PM, Patrick Spinler wrote: I'm not using the puppet firewall module because, if I read the docs correctly, I'd need to use that module to completely manage the firewall settings, and it seems to require a good bit of setup to get there, too. Unfortunately, due to political and organizational circumstance, I don't have the ability to subsume the system's setup in that fashion. Maybe someday. Until then, I can only add my extra stuff on top. Ergo, augeas. As far as commenting out the incl and lens settings; I wasn't sure they had the correct syntax and were working, or may even have been part of the problem. Ergo, simplify, and comment out until then. I'll try using them again, thanks. -- Pat On 10/6/13 4:09 AM, Cory Stoker wrote: Ouch my eyes... Augeas can wreck your day sometimes. I have to ask though, why not use the Puppetlabs Firewall Module? It's here: https://forge.puppetlabs.com/puppetlabs/firewall Then you would do something like this: firewall { 'mayo_fw TCP/3': ensure = present, table = 'filter', chain = 'Mayo-Firewall-INPUT', proto = 'tcp', dport = 3, action = 'accept', } #End As far as your output above it looks like it errored out on the files iptables.save and iptables.orig? What's weird is you have incl commented out which would make me think it should only load the one path you specified. On Fri, Oct 4, 2013 at 7:13 AM, Patrick Spinler pspin...@gmail.com wrote: (apologies in advance for the line wrap) I have the following tidbit of augeas code, which inserts a rule into /etc/sysconfig/iptables as the first rule of a specifically named chain; # augtool insert append before /files/etc/sysconfig/iptables/table/append[. = 'Mayo-Firewall-INPUT'][1] # augtool match /files/etc/sysconfig/iptables/table/append[. = ''] # /files/etc/sysconfig/iptables/table/append[8] = (none) # augtool set /files/etc/sysconfig/iptables/table/append[. = ''] 'Mayo-Firewall-INPUT' # augtool set /files/etc/sysconfig/iptables/table/append[. = 'Mayo-Firewall-INPUT'][1]/protocol 'tcp' # augtool set /files/etc/sysconfig/iptables/table/append[. = 'Mayo-Firewall-INPUT'][1]/match 'tcp' # augtool set /files/etc/sysconfig/iptables/table/append[. = 'Mayo-Firewall-INPUT'][1]/dport '3' # augtool set /files/etc/sysconfig/iptables/table/append[. = 'Mayo-Firewall-INPUT'][1]/jump 'ACCEPT' # augtool print /files/etc/sysconfig/iptables/table/append[. = 'Mayo-Firewall-INPUT'][1] # /files/etc/sysconfig/iptables/table/append[8] = Mayo-Firewall-INPUT # /files/etc/sysconfig/iptables/table/append[8]/dport = 3 # /files/etc/sysconfig/iptables/table/append[8]/match = tcp # /files/etc/sysconfig/iptables/table/append[8]/protocol = tcp # /files/etc/sysconfig/iptables/table/append[8]/jump = ACCEPT I'd like to convert this to a puppet augeas define. So far, I've got this: define mayo_firewall_insert ($dport, $proto) { augeas { firewall_${title}: context = /files/etc/sysconfig/iptables/table, # incl = /etc/sysconfig/iptables, # lens = iptables.aug, onlyif = match append[dport='$dport'] size != 0, changes = [ insert append before append[. = 'Mayo-Firewall-INPUT'][1], set append[. = ''] 'Mayo-Firewall-INPUT', set append[. = 'Mayo-Firewall-INPUT'][1]/protocol '$proto', set append[. = 'Mayo-Firewall-INPUT'][1]/match '$proto', set append[. = 'Mayo-Firewall-INPUT'][1]/dport '$dport', set append[. = 'Mayo-Firewall-INPUT'][1]/jump 'ACCEPT', ], } However, when I declare a resource using the above define, I get augeas syntax errors, and I'm not sure how to track down the problem: (invoked as 'puppet apply --verbose --debug --detailed-exitcodes --execute include omnibus_node') ... Debug: Augeas[firewall_omnibus_tcp_4100](provider=augeas): Opening augeas with root /, lens path , flags 32 Debug: Augeas[firewall_omnibus_tcp_4100](provider=augeas): Augeas version 1.1.0 is installed Warning: Augeas[firewall_omnibus_tcp_4100](provider=augeas): Loading failed for one or more files, see debug for /augeas//error output Debug: