Re: [Puppet Users] Getting server facts from a mysql server
On 28. mars 2012 05:27, Gino Lisignoli wrote: I'm rather new to puppet and taking over an existing work in progress installation of puppet. The problem I have at the moment is that we have a mysql database that contain some facts about our servers (what their ip address are supposed to be, who they relay mail to, etc) and I'm not sure how to access this data from puppet. Is there an easy way to use SQL queries in puppet? There's a couple of ways but none that works out-of-the-box (does Puppet come with a box?). If this was me I'd look at Hiera and this code https://github.com/crayfishx/hiera-mysql and see if I could make it fit. However, it depends. At this stage it will most likely take a while to learn Hiera and how to design around it. -- http://www.uib.no/personer/Jan.Ivar.Beddari -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: dsl check if port is open
Hi David, No problem, although there are few things to consider. For instance, I would avoid unneeded fork(), therefore no need to use netcat if you can achieve the same thing with pure Ruby (you can literally copy and paste code from the function I have created for you). Remember, that in terms of having a fact there, you have to maintain details about the remote port in the fact code, whereas in case of the functions you simply store this information inside a manifest. But, to be quite honest, if you have to resort to such active checks in order to determine state of your systems and therefore make an elaborated decision in the code about what to do, then I would say that you are doing something not necessary right. Well, in the end whatever works as Woody Allen would say :) KW On Wednesday, 28 March 2012 01:00:45 UTC+1, David Garvey wrote: Thanks Jeff and Krzysztof, I think I will write a facter using netcat or something then and catch it in the manifests. nc -z domain_name port Cheers, DGarvey On Tue, Mar 27, 2012 at 2:36 PM, Jeff McCune j...@puppetlabs.com wrote: On Tue, Mar 27, 2012 at 2:24 PM, Krzysztof Wilczynski krzysztof.wilczyn...@linux.com wrote: Ho David, On Tuesday, 27 March 2012 19:05:09 UTC+1, David Garvey wrote: Can I check if a port is open for DSL? I need to check if the box has an acl allowing the nagios server to connect via nrpe before writing nagios config. [...] Managing firewall using Puppet as well, as per what Jeff suggested, is of course the preferred way to solve this sort of problem, but if you need to check whether a port is open, then have a look: https://github.com/kwilczynski/puppet-functions/blob/master/lib/puppet/parser/functions/is_port_open.rb Jeff will probably not approve of that :-) Eh, I may surprise you... I don't think my approval matters much at all and I'm a fan of whatever works for the problem at hand given the tools we have today. I can totally see the value of a function that automatically figures out if a remote port is _actually_ open and listening, rather than _should_ be open and listening, from the perspective of the Puppet master. With that said, I'm more interested in the problem David is facing than I am in a specific solution solution because I'm pretty sure Puppet doesn't have the capability to solve this in a elegant, simple and easy way. We can solve it with a custom function or custom fact today, but I'd like to make this easier for everyone in the future. -Jeff -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- David Garvey -- 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/-/pzCRtD_gMD4J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] puppetd not checking in
We have set up Nagios to monitor the access time for /var/lib/puppet/state/state.yaml to ensure that puppetd is checking in in a timely manner. It appears as though it is not because state.yaml is over 39,000 seconds old. If I manually run puppet agent --test on the client then puppet does run and state.yaml is updated. I can see nothing in the logs to indicate that puppet is erroring out. puppet.conf has the following: runinetrval = 600 indicating that puppet should check in every 10 minutes (too often in my opinion, but not my call). Should state.yaml be updated every 10 minutes as implied here or should I check else where? Thanks, John John Kennedy -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Hash iteration order in a template not consistent
Hi, I did some basic googling, but didn't find an answer yet. I am sorry if this is a FAQ. In a manifest for creating an Apache config file, I define a hash like this: $aliases = { '/foo/' = '/home/foo/www/', '/bar/' = '/home/bar/www/', '/baz/' = '/home/baz/www//' } Then, in a template, I have: % aliases.each_pair do |key, val| -% Alias %= key % %= val % % end -% The result is mostly what I expect, but every once in a while, the order in which the Aliases are generated from the 'each_pair' loop changes, resulting in a different file. The Ruby docs state that hashes enumerate their values in the order that the corresponding keys were inserted., but is that not true for Puppet hashes? I did stumble across this post: http://serverfault.com/questions/368784/puppet-and-templates-how-to-loop-sequently-and-not-randomly which suggests to do something like % aliases.sort_by {|key, value| key}.each_pair do |key, val| -% % end -% Will it work? Is that a proper solution? Thanks! Martijn Grendelman -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Hash iteration order in a template not consistent
- Original Message - From: Martijn Grendelman mart...@iphion.nl snip http://serverfault.com/questions/368784/puppet-and-templates-how-to-loop-sequently-and-not-randomly which suggests to do something like % aliases.sort_by {|key, value| key}.each_pair do |key, val| -% % end -% Will it work? Is that a proper solution? ruby hashes are not stored in predictable order so this will happen, the proposed solution should work. But as always the best is just to test it and see how it goes, it wont bite :) -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Hash iteration order in a template not consistent
Hi, I did it something like that: % aliases.sort.each do |alias| -% Alias %= alias.first % %= alias.last % % end -% Regards. Hi, I did some basic googling, but didn't find an answer yet. I am sorry if this is a FAQ. In a manifest for creating an Apache config file, I define a hash like this: $aliases = { '/foo/' = '/home/foo/www/', '/bar/' = '/home/bar/www/', '/baz/' = '/home/baz/www//' } Then, in a template, I have: % aliases.each_pair do |key, val| -% Alias%= key % %= val % % end -% The result is mostly what I expect, but every once in a while, the order in which the Aliases are generated from the 'each_pair' loop changes, resulting in a different file. The Ruby docs state that hashes enumerate their values in the order that the corresponding keys were inserted., but is that not true for Puppet hashes? I did stumble across this post: http://serverfault.com/questions/368784/puppet-and-templates-how-to-loop-sequently-and-not-randomly which suggests to do something like % aliases.sort_by {|key, value| key}.each_pair do |key, val| -% % end -% Will it work? Is that a proper solution? Thanks! Martijn Grendelman -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Facts loading 4-5x
Is there any reason why my facts are loading 4-5x (I have even seen 6x) on puppet client runs? I am running 2.7.9, I remember running 2.6 and seeing usually 2x. Is there a known bug here or some configuration problem that could be causing this? Some of my facts collect/parse a bunch of data and can be time consuming. Adding an extra few seconds may not seem like a lot but when doing that across several 100 nodes at a time it adds up it seems a bit excessive. -Chris -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: Facts loading 4-5x
Hi, It is a known issue in older version. A quick search yields: http://projects.puppetlabs.com/issues/3741 http://projects.puppetlabs.com/issues/8341 And probably more could pop-up in results (citation needed). KW On Wednesday, 28 March 2012 14:51:03 UTC+1, Christopher Johnston wrote: Is there any reason why my facts are loading 4-5x (I have even seen 6x) on puppet client runs? I am running 2.7.9, I remember running 2.6 and seeing usually 2x. Is there a known bug here or some configuration problem that could be causing this? Some of my facts collect/parse a bunch of data and can be time consuming. Adding an extra few seconds may not seem like a lot but when doing that across several 100 nodes at a time it adds up it seems a bit excessive. -Chris -- 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/-/3ieOWQbCmqIJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Facts loading 4-5x
I am fairly certain that 2.7.12 fixes these issues. On Wed, Mar 28, 2012 at 6:58 AM, Krzysztof Wilczynski krzysztof.wilczyn...@linux.com wrote: Hi, It is a known issue in older version. A quick search yields: http://projects.puppetlabs.com/issues/3741 http://projects.puppetlabs.com/issues/8341 And probably more could pop-up in results (citation needed). KW On Wednesday, 28 March 2012 14:51:03 UTC+1, Christopher Johnston wrote: Is there any reason why my facts are loading 4-5x (I have even seen 6x) on puppet client runs? I am running 2.7.9, I remember running 2.6 and seeing usually 2x. Is there a known bug here or some configuration problem that could be causing this? Some of my facts collect/parse a bunch of data and can be time consuming. Adding an extra few seconds may not seem like a lot but when doing that across several 100 nodes at a time it adds up it seems a bit excessive. -Chris -- 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/-/3ieOWQbCmqIJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Problems with custom type and provider, resulting file doesn't get updated
Hello Everyone, I've implemented a custom type and provider to generate a file, but am having some trouble with getting it to work right. Googling, reading the docs and searching the group here haven't led to a solution, so I decided to ask for help. As I said I've created a custom type and provided, it's purpose is to generate a site specific Oracle tnsnames.ora. It allows you to specify a fully qualified path and an array of Oracle databases. As is, it works, but only during the first puppet run. If I make changes to either the path, or list of Oracle databases, the file doesn't get updated. Can anyone tell me what I'm doing wrong, or point me in the right direction? Any help will be appreciated. Thanx, Michael The type is implemented as follows: Puppet::Type.newtype(:tnsnames) do ensurable newparam(:path) do isnamevar validate do |value| raise ArgumentError, Empty values are not allowed if value == end end newparam(:dbnames, :array_matching = :all) do validate do |value| raise ArgumentError, Empty values are not allowed if value == end end end The provider looks like this: require 'fileutils' Puppet::Type.type(:tnsnames).provide(:tnsnames) do def create tnsnames_content= # code to fill tnsnames_content deleted to protect the innocent begin if tnsnames_content != : FileUtils.rm_rf resource[:path] f = File.new(resource[:path], 'w') f.write(tnsnames_content) f.close() end rescue Puppet::ExecutionFailure = detail raise Puppet::Error, Could not create tnsnames file: #{detail} end end def destroy FileUtils.rm_rf resource[:path] end def exists? File.file? resource[:path] end end -- 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/-/HfWXn2DEBlwJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: puppetd not checking in
On Mar 28, 5:09 am, John Kennedy skeb...@gmail.com wrote: We have set up Nagios to monitor the access time for /var/lib/puppet/state/state.yaml to ensure that puppetd is checking in in a timely manner. It appears as though it is not because state.yaml is over 39,000 seconds old. If I manually run puppet agent --test on the client then puppet does run and state.yaml is updated. I can see nothing in the logs to indicate that puppet is erroring out. puppet.conf has the following: runinetrval = 600 indicating that puppet should check in every 10 minutes (too often in my opinion, but not my call). Should state.yaml be updated every 10 minutes as implied here or should I check else where? I am not confident that you can rely on state.yaml being updated when nothing changes. Your master and agent logs show both show whether the agent has been checking in, so I suggest you look there next to better characterize the problem. John -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Database and user not created (Puppetlabs mysql module)
Moteo, did you get this issue resolved? I've used the Puppetlabs MySql module in the past, but I'm now getting these issues setting up a new machine with Ubuntu 11.10. I've used the same Puppet scripts on other Ubuntu 11.10 machines previously with no issues. On Thursday, 15 March 2012 10:51:04 UTC, Moteo wrote: I will try this module. Thank You Adam. 2012/3/14 Adam Heinz a...@metricwise.net: I don't know anything about that particular module, but I have been using github.com/camptocamp/puppet-mysql for over a year without much trouble. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- 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/-/ZwavJYd6jwMJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: Problems with custom type and provider, resulting file doesn't get updated
def exists? File.file? resource[:path] end end Michael. It looks like in your exists? method you are just checking that the tnsnames.ora file exists.So if that file is present the exists? method returns a true which is saying that the resource is present and accurate.In the exists? method you would need to parse the tnsnames.ora file and compare the contents against what is desired. If the contents of the tnsnames.ora are accurate then return true. I'm not an expert in types/providers so you may want to validate my input by inspecting existing types that kind of work the same way like host or ssh_authorized_keys. HTH. Derek. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: Problems with custom type and provider, resulting file doesn't get updated
Hello Derek, Thanks for the quick reply. I've been thinking along those lines as well, create a md5 sum or something of both the file and my newly created content string. Problem is: is this the correct way to do it? I've found multiple type provider examples on github which DO NOT do this. Are they all inherently broken? Could someone confirm or deny this? I'll have a look and see if I can find the types (host and ssh_authorized_keys) you are referring to. Many thanks, Michael -- 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/-/0v6WBJPdlqMJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Problems with custom type and provider, resulting file doesn't get updated
On Wed, Mar 28, 2012 at 8:42 AM, Michael K mkies...@googlemail.com wrote: Hello Derek, Thanks for the quick reply. I've been thinking along those lines as well, create a md5 sum or something of both the file and my newly created content string. Problem is: is this the correct way to do it? I've found multiple type provider examples on github which DO NOT do this. Are they all inherently broken? Could someone confirm or deny this? I'm not familiar with the format of this file, so I'm not sure why custom provider is preferable over a native file type in puppet or concat file using templates. self.exists? is correct. In this case you are just checking if the file exists to determine whether to invoke create/destroy method. If you ensure=present and the file does not exist it will invoke create, and if you ensure=absent, and the file exist it will invoke destroy. The reason the content of the file is not managed is because dbnames is a parameter and not a property. If you want to manage the content of the file you need specify dbnames as a property and implement def dbnames in the provider to retrieve the file content for comparison and def dbnames=(value) to update the content of the file if it no longer matches your desired content value. See Brice blog for more in depth explanation: http://www.masterzen.fr/2011/11/02/puppet-extension-point-part-2/ Thanks, Nan -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: Problems with custom type and provider, resulting file doesn't get updated
create a md5 sum or something of both the file and my newly created content I think what you would want to do is pull out the dbnames from the tnsname.ora file and then compare that list against what the resource is trying to set. If the desired dbnames list and the list currently in the tnsnames.ora file match then exists? would return true. If not then you would update the file content to match the desired results. If you think of the 'host' type which updates records in the systems hosts file. It's not going to tell you the resource is up to date if /etc/hosts is present. I think it pulls the hosts file into an array and then does a comparison of each host resource host/ip against what is in the array. For example this resource would check to see that loopback2 is in the hosts file and associated with 127.0.0.2. host { 'loopback2': ip = '127.0.0.2', } I can't comment on what's correct or not since I've no clue:) Good Luck! Derek. string. Problem is: is this the correct way to do it? I've found multiple type provider examples on github which DO NOT do this. Are they all inherently broken? Could someone confirm or deny this? I'll have a look and see if I can find the types (host and ssh_authorized_keys) you are referring to. Many thanks, Michael -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: Problems with custom type and provider, resulting file doesn't get updated
Hello Nan, Ok, the article by Brice gives me some pointers. I'll see if I can get it working using properties, and write back with my findings tomorrow. If it works, I'll provide a complete working example for others to learn from. Many thanks! Michael -- 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/-/xguWWhuKgYAJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] retrieving module directory
Hi everyone, I have a puppet master/client infrastructure setup with apache. When on the same datacenter I don't have any problem. I am trying to use another datacenter, so I setup the fileserver.conf as followed: # Files in the /path/to/files directory will be served # at puppet:///mount_point/. [modules] allow *.datacenter1 allow *.datacenter2 [plugins] allow *.datacenter1 allow *.datacenter2 The fqdn of the server is: [root@template]# facter fqdn template.datacenter2 The client is registered on the server: [root@puppetmaster]:/etc/puppet # puppet cert list --all | grep tem + template.datacenter2 (49:33:8A:66:D5:CA:B4:A8:F3:EE:8C:6D:0D:09:0E:FB) But when I trying to run puppet here is the error: [root@template puppet]# puppet agent -t --debug --trace debug: Failed to load library 'rubygems' for feature 'rubygems' debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does not exist debug: Puppet::Type::User::ProviderLdap: true value when expecting false debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl does not exist debug: Puppet::Type::User::ProviderPw: file pw does not exist debug: Failed to load library 'ldap' for feature 'ldap' debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/ssl/private_keys/template.datacenter2.pem]: Autorequiring File[/var/lib/puppet/ssl/private_keys] debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/clientbucket]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/state/graphs]: Autorequiring File[/var/lib/puppet/state] debug: /File[/etc/puppet/puppet.conf]: Autorequiring File[/etc/puppet] debug: /File[/var/lib/puppet/state/last_run_report.yaml]: Autorequiring File[/var/lib/puppet/state] debug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring File[/var/lib/puppet/ssl/certs] debug: /File[/var/lib/puppet/client_data]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/ssl/crl.pem]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/ssl/public_keys/template.datacenter2.pem]: Autorequiring File[/var/lib/puppet/ssl/public_keys] debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/state/last_run_summary.yaml]: Autorequiring File[/var/lib/puppet/state] debug: /File[/var/lib/puppet/ssl/certs/template.datacenter.pem]: Autorequiring File[/var/lib/puppet/ssl/certs] debug: /File[/var/lib/puppet/client_yaml]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/ssl/private]: Autorequiring File[/var/lib/puppet/ssl] debug: Finishing transaction 23702911873500 debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring File[/var/lib/puppet/ssl/certs] debug: /File[/var/lib/puppet/ssl/certs/template.datacenter2.pem]: Autorequiring File[/var/lib/puppet/ssl/certs] debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/ssl/private_keys/template.datacenter2.pem]: Autorequiring File[/var/lib/puppet/ssl/private_keys] debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/ssl/private]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring File[/var/lib/puppet/ssl] debug: /File[/var/lib/puppet/ssl/public_keys/template.datacenter2.pem]: Autorequiring File[/var/lib/puppet/ssl/public_keys] debug: /File[/var/lib/puppet/ssl/crl.pem]: Autorequiring File[/var/lib/puppet/ssl] debug: Finishing transaction 23702910393880 debug: Using cached certificate for ca debug: Using cached certificate for template.datacenter2 debug: Finishing transaction 23702909931920 info: Retrieving plugin debug: file_metadata supports formats: b64_zlib_yaml marshal pson raw yaml; using pson debug: Using cached certificate for ca debug: Using cached certificate for template.datacenter2 debug: Using cached certificate_revocation_list for ca debug: Finishing transaction 23702909767560 info: Loading facts in puppet_vardir info: Loading facts in meminbytes info: Loading facts in facter_dot_d info:
[Puppet Users] Strange behaviour of the exec / command function
Hi all, I am currently creating a java class to automate its installation. You can find the class definition is below. In a nutshell, it is creating a temp folder to put the .bin file, copy the .bin file in the folder then runs the installation. Since running the bin will create a couple of .rpm files, I wanted them to be in the temp folder and not in /. The line that caused me problems is: command = sh -c 'cd ${$path_java_tmp_folder} pwd yes | ./$ {bin_java_install_package} ', Originally, I tried command = sh -c 'cd ${$path_java_tmp_folder} yes | ./$ {bin_java_install_package} ', And at runtime, I received the following error message err: / Stage[main]/Java/Exec[install-java]/returns: change from notrun to 0 failed: sh: ./jdk-6u31-linux-x64-rpm.bin: No such file or directory Then I added: pwd and now it works... Whereas the pwd does not actually do anything ... Does anyone know about this? Would it be a bug? Thanks in advance for your help. Gael class java { $path_java_tmp_folder = '/opt/java/' $bin_java_install_package = 'jdk-6u31-linux-x64-rpm.bin' $path_java_tmp_install_package = ${path_java_tmp_folder}$ {bin_java_install_package} # 1 - create the folder # 2 - copy the jdk file in the folder # 3 - install the jdk rpm File['java-tmp-folder']-File['copy-java-install']- Exec['install-java'] file { # Create the folder to store the bin file 'java-tmp-folder': ensure = directory, path= $path_java_tmp_folder, owner = 'root', group = 'root', recurse = true ; # copy the jdk across 'copy-java-install': ensure = file , path = $path_java_tmp_install_package, source = puppet:///modules/java/$ {bin_java_install_package}, owner = 'root' , group = 'root' , mode = '0744' , } exec { install-java: path= [/usr/bin,/bin], command = sh -c 'cd ${$path_java_tmp_folder} pwd yes | ./${bin_java_install_package} ', unless = test -e /usr/bin/java; } } -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Puppet Enterprise 2.5 is here
As you may have seen by now, today marks the release of Puppet Enterprise 2.5. The new features are outlined by Luke Kanies in today's blog post[1]. Some feature highlights: * Puppet Module Tool is a completely new design, tightly integrated in the Puppet Forge, and available as puppet application (face). This replaces the rubygem puppet-module usage in the past. This feature will also be available in Puppet 2.7.13rc series, coming soon. * Windows support. Puppet Labs has invested heavily in listening to customer and user demand for support of Puppet on Windows. We now have full MSI packages available that include, ruby, facter, and puppet; everything you need to get going. There are a hand-full of modules on the forge with Windows support, and we're looking forward to many more contributions around Windows management on the Forge. Windows MSIs are available for PE, and available with Puppet 2.7.12 now.[2] * Big Data for Infrastructure - With the Puppet Data Library (PDL), you can access detailed inventory, state, and configuration change data produced by every server. If you've reached under the hood with Puppet before, you've seen the massive amounts of data available in structured format, available for parsing, processing and analytics. Puppet Enterprise 2.5 takes steps to bring this to the forefront. * Role-Based Access Control - Grant admin, read-only, and read-write access, and get a complete audit trail of changes made by users. Of course we have lots of options available when you want to learn more. * Register for one of three live webinars[3] * Download Puppet Enterprise 2.5 free now and manage up to 10 nodes [4] * Join us on Twitter at #puppetize for live QA (April 4th at 11am PT) [5] We also have videos available for the new features[6] If you have any questions, let me know, Michael Stahnke Community Manager [1] http://puppetlabs.com/blog/announcing-puppet-enterprise-2-5/ [2] http://docs.puppetlabs.com/windows/index.html [3] http://bit.ly/GNN8CU [4] http://bit.ly/GGVYGj [5] https://twitter.com/#!/puppetlabs [6] http://puppetlabs.com/puppet/whats-new/ -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Empty node definition mysteriously runs yum class!
I'm having an issue where every single puppet node included our yum class as part of the catalog. In all instances the nodes node definition was empty. Has anyone experienced something like this before? Is the yum class colliding with an internal class? We do not define a node default or use any node regex that would have caused this. No other rogue classes are being included except the yum class. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem
Hello, I'm having some trouble. I keep getting the following warnings when trying to run: $ puppet master --no-daemonize /usr/local/build/puppet-bundle/vendor/gems/ruby/1.9.1/gems/ puppet-2.7.12/lib/puppet/external/pson/pure.rb:7:in `module:PSON': iconv will be deprecated in the future, use String#encode instead. Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem [repeats a number of times] $ ruby -v ruby 1.9.3p0 (2011-10-30) [x86_64-linux] $ which ruby /usr/local/bin/ruby $ cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.7 (Tikanga) Thanks in advance. -LTH -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
RE: [Puppet Users] Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem
These are harmless: http://projects.puppetlabs.com/issues/11325 -Original Message- From: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] On Behalf Of lth Sent: Wednesday, March 28, 2012 2:08 PM To: Puppet Users Subject: [Puppet Users] Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem Hello, I'm having some trouble. I keep getting the following warnings when trying to run: $ puppet master --no-daemonize /usr/local/build/puppet-bundle/vendor/gems/ruby/1.9.1/gems/ puppet-2.7.12/lib/puppet/external/pson/pure.rb:7:in `module:PSON': iconv will be deprecated in the future, use String#encode instead. Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem [repeats a number of times] $ ruby -v ruby 1.9.3p0 (2011-10-30) [x86_64-linux] $ which ruby /usr/local/bin/ruby $ cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.7 (Tikanga) Thanks in advance. -LTH -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. This email communication and any files transmitted with it may contain confidential and or proprietary information and is provided for the use of the intended recipient only. Any review, retransmission or dissemination of this information by anyone other than the intended recipient is prohibited. If you receive this email in error, please contact the sender and delete this communication and any copies immediately. Thank you. http://www.encana.com -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem
Thanks for the quick response. However the agent is receiving an error and doesn't get the catalog. We're getting this: Ruby (Rack) application could not be started The application has exited during startup (i.e. during the evaluation of config/environment.rb). The error message can be found below. To solve this problem, please follow any instructions in the error message. Error message: /usr/local/build/puppet-bundle/vendor/gems/ruby/1.9.1/gems/ puppet-2.7.12/lib/puppet/external/pson/pure.rb:7:in `module:PSON': iconv will be deprecated in the future, use String#encode instead. Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/ operatingsystem Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem Could not load confine test 'operatingsystem': cannot load such file -- puppet/ provider/confine/operatingsystem Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/ operatingsystem Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem Could not load confine test 'operatingsystem': cannot load such file -- puppet/ provider/confine/operatingsystem Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/ operatingsystem Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem Application root: /usr/local/build/puppet-bundle -LTH On Mar 28, 4:13 pm, Kinzel, David david.kin...@encana.com wrote: These are harmless: http://projects.puppetlabs.com/issues/11325 -Original Message- From: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] On Behalf Of lth Sent: Wednesday, March 28, 2012 2:08 PM To: Puppet Users Subject: [Puppet Users] Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem Hello, I'm having some trouble. I keep getting the following warnings when trying to run: $ puppet master --no-daemonize /usr/local/build/puppet-bundle/vendor/gems/ruby/1.9.1/gems/ puppet-2.7.12/lib/puppet/external/pson/pure.rb:7:in `module:PSON': iconv will be deprecated in the future, use String#encode instead. Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem [repeats a number of times] $ ruby -v ruby 1.9.3p0 (2011-10-30) [x86_64-linux] $ which ruby /usr/local/bin/ruby $ cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.7 (Tikanga) Thanks in advance. -LTH -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. This email communication and any files transmitted with it may contain confidential and or proprietary information and is provided for the use of the intended recipient only. Any review, retransmission or dissemination of this information by anyone other than the intended recipient is prohibited. If you receive this email in error, please contact the sender and delete this communication and any copies immediately. Thank you. http://www.encana.com -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Empty node definition mysteriously runs yum class!
Hi, Grep your manifest for all 'yum' references (modules and manifest directories). If that doesn't show up anything please provide more detail on your manifests. Den On 29/03/2012, at 7:00, Ryan Bowlby rbowlb...@gmail.com wrote: I'm having an issue where every single puppet node included our yum class as part of the catalog. In all instances the nodes node definition was empty. Has anyone experienced something like this before? Is the yum class colliding with an internal class? We do not define a node default or use any node regex that would have caused this. No other rogue classes are being included except the yum class. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem
Hi, Is that a ruby 1.9.1 and 1.9.3 issue? Did you upgrade ruby on the host? Den On 29/03/2012, at 7:07, lth lthar...@gmail.com wrote: Hello, I'm having some trouble. I keep getting the following warnings when trying to run: $ puppet master --no-daemonize /usr/local/build/puppet-bundle/vendor/gems/ruby/1.9.1/gems/ puppet-2.7.12/lib/puppet/external/pson/pure.rb:7:in `module:PSON': iconv will be deprecated in the future, use String#encode instead. Could not load confine test 'operatingsystem': cannot load such file -- puppet/provider/confine/operatingsystem [repeats a number of times] $ ruby -v ruby 1.9.3p0 (2011-10-30) [x86_64-linux] $ which ruby /usr/local/bin/ruby $ cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.7 (Tikanga) Thanks in advance. -LTH -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] from= in ssh key
Fairly new to puppet here and trying to figure out a couple of issues with distributing ssh keys. First one is how can I distribute a public key with the from= field at the beginning. What I currently have working is ssh_authorized_key { brandon: user = brandon, ensure = present, type = ssh-rsa, key = B3NzaC1yc2E.. } which adds ssh-rsa B3NzaC1yc2E.. to my authorized_keys just fine. But how do I prepend that with from=1.1.1.1 ? Everything I've tried doesn't work. Thanks. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] from= in ssh key
I believe you need to add options = 'from=1.1.1.1' to your resource to do this. Cheers, Tim On Thursday, 29 March 2012 at 12:44 PM, Brandon wrote: Fairly new to puppet here and trying to figure out a couple of issues with distributing ssh keys. First one is how can I distribute a public key with the from= field at the beginning. What I currently have working is ssh_authorized_key { brandon: user = brandon, ensure = present, type = ssh-rsa, key = B3NzaC1yc2E.. } which adds ssh-rsa B3NzaC1yc2E.. to my authorized_keys just fine. But how do I prepend that with from=1.1.1.1 ? Everything I've tried doesn't work. Thanks. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com (mailto:puppet-users@googlegroups.com). To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com (mailto:puppet-users+unsubscr...@googlegroups.com). For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: from= in ssh key
On Wednesday, March 28, 2012 6:44:09 PM UTC-7, Brandon wrote: Fairly new to puppet here and trying to figure out a couple of issues with distributing ssh keys. First one is how can I distribute a public key with the from= field at the beginning. What I currently have working is ssh_authorized_key { brandon: user = brandon, ensure = present, type = ssh-rsa, key = B3NzaC1yc2E.. } which adds ssh-rsa B3NzaC1yc2E.. to my authorized_keys just fine. But how do I prepend that with from=1.1.1.1 ? Everything I've tried doesn't work. Thanks. Have you tried: options = ['from=...'], or even just: options = 'from=...' Wil -- 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/-/KPQan9SFtrIJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.