Re: [Puppet Users] Distributing user configs from a central host?
On Thu, 2011-02-17 at 06:37 -0800, Robin Lee Powell wrote: I have a central server, that happens to be the puppetmaster, that has various users on it. I would like to copy out their information (name, uid, password, .bashrc, etc) to all my other hosts, but I want to let the users change their stuff on that host, so I don't want to just stick it in puppet. My inclination is to just make a script that runs through the passwd file and generates puppet instructions out, and also copies the user files in question into a place in the puppetmaster directories. Is there a more-idiomatic way to do that? I'd be tempted to use Puppet to manage the user accounts (virtualise the resources and then realise them on each host/node-type as appropriate) then just mount /home on each server from the same NFS mountpoint. You could even use puppet to manage the mountpoint, and that way you're managing the things that you need to from a System Administrators Point of View and leaving the things such as ensuring consistency of ~ across multiple systems to a shared-storage device - exactly the task they were invented for! Kind regards, Matt (who often over-engineers a solution to things and sometimes thinks others are doing the same! ;) ) -- 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] Migrating from 0.25.4 to 2.6
OK, thanks, that answers the question about whether we can go backwards (we can't, we're using Regexes and a few other things!) Anyone know if a Puppet 2.6.2 client can talk to a 0.25.4 puppet master? M. On 3 February 2011 15:18, Adam Heinz a...@metricwise.net wrote: On Thu, Feb 3, 2011 at 2:39 AM, Matthew Macdonald-Wallace li...@truthisfreedom.org.uk wrote: I'm also wondering what impact the move would have on our puppet manifests. Are there any gotcha's that I need to be aware of that could prevent my current manifests working under 2.6.2 or 0.24.5? I personally have been bitten running 0.24.x when the mysql module I included used regexes (introduced in 0.25.x). http://docs.puppetlabs.com/guides/language_tutorial.html The Language Feature by Release should give you a good idea of other things missing in 0.24.x that your 0.25.x manifests need. I haven't used 2.6, so I can't speak to any forward migration issues. -- 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] Migrating from 0.25.4 to 2.6
Hi all, As part of a new project, we're thinking about moving from CentOS to Debian. One of the few concerns I have about doing this is that we currently run Puppet 0.25.4 on all our systems, yet the available versions for Debian appear to be 0.24.5 or 2.6.2 (backports). If I keep my puppetmaster at 0.25.4, will the 2.6.2 clients be able to talk to it? If not, can I install a puppetmaster running 2.6.2 and have the 0.25.4 clients talk to that instead? I'm also wondering what impact the move would have on our puppet manifests. Are there any gotcha's that I need to be aware of that could prevent my current manifests working under 2.6.2 or 0.24.5? Please understand that at the moment, I'm not interested in using the shiny new features of 2.6.2, I'm just thinking that as a 'future-proofing' exercise, it might be worth move to that now instead of waiting for the next stable release of Debian. Thanks in advance, Matt -- 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] Testing custom types
Hi all, I thought I'd put this in a different thread to avoid confusion. Is there a way to test custom types/providers without deploying them to a node? I'm thinking of something along the lines of puppet --parseonly or similar. How do others test what they've written, or do you just deploy to a staging environment? Cheers, M. -- 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] Yum Repos - Best Practice?
Hi all, I'm wondering how other people mange yum repositories using the yumrepo type. At the moment, we have a class called repos which has all of our repos defined in it. This class is included in our 'base' class which sets up things common to all servers such as puppet, mcollective, nrpe etc. The down side of this is that all of our repos are included on all of our servers, leading to a complete mess in /etc/yum.repos.d/ I'm now thinking that I need to only call in the various repos for the servers which require them, i.e. CentosBase and others would be included in the 'base' class, however those which provide things such as php 5.3 would only be included on webservers etc. What would be even nicer would be if there was a way to override certain aspects of existing repos, for example: class base{ # other yumrepo defines... ... ... # stick with the php 5.1 in Centos Base yumrepo{epel: excludepkgs=php*, } } class webserverphp52 { # include php5.2 from epel yumrepo{epel: excludepkgs = , } } Is this possible with 0.25 (we're installing from Epel and we're nowhere near ready to upgrade to 2.6!)? How are other people managing this kind of situation? Cheers, M. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] Appending to Variables in a global context
On Sun, 2010-12-19 at 01:51 -0600, Spenser Gilliland wrote: Yeap, I'm seeing that it doesn't exist yet either. I'm thinking maybe I can use exported resources or maybe just an exec that increments a counter on the host. Either way it's not very pretty. My use case is as follows: In Debian, Redmine has the option of being installed as several instances controlled by a single debconf variable. In order to utilize this feature, I need to supply debconf with the name of all instances of Redmine on the server. I've split this out into the following way: A class called Redmine which installs the Redmine package and should hold an array of all the instances of Redmine to feed to debconf using the responsefile parameter. So I think I've come up with a solution in my head but it involves me guaranteeing that the redmine class is instantiated before any of the redmine::instances are defined. Essentially, I'll use an environmental variable or file and clear it with the Redmine class and append to it for each redmine::instance. Maybe like below? class redmine { exec{rm /tmp/instances touch /tmp/instances} } define redmine::instance exec{echo $name /tmp/instances} } Can you read (from the file system or list the redmine databases in mysql/postgresql server?) a list of installed instances? If so, why not setup a custom fact which has all the instances listed as a csv string: == PSEUDO CODE!!! == instances = read_instances() # a class which connects to the db/file # system to read in the instances and converts them to CSV format # Facter.add redmine_instances do setcode do instances end end === and then template the /tmp/instances file using erb: == PSEUDO CODE!!! % redmine_instances.each do |instance| -% instance % end -% == Your manifest could then source this template onto the file system and feed the file to debconf. It's a bit more long winded, however it means that if you want to add instances, you just add an extra value to the fact. We use this technique to manage MySQL replication and it works really well! Cheers, M. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] Appending to Variables in a global context
On Sun, 2010-12-19 at 04:40 -0600, Spenser Gilliland wrote: Matthew, I'm a bit confused on your code, how does an instance get added to the db? Yeah, that's probably my fault... :D My thought was that if you have a known path to the redmine instances you could create a ruby class which iterates over the filesystem and pulls each directory/installation name into a CSV string. If you prefix your redmine database names with something obvious when you install them, then you should be able to connect to the database server and extract the table names that are relevant using use mysql;SELECT tableName from tables where tableName LIKE '%redmine_prefix %'; or similar. So the db which I spoke of is more of a datastore/list which contains the currently installed redmine instances - how you retrieve this data is left as an exercise for the reader... ;) Cheers, M. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] audit=content
On Fri, 2010-12-03 at 06:13 +0200, Paul Johnson wrote: Hi All, sorry if this was discussed before but I didn't find any solution for my problem. Test site.pp consists of 1 line: file { /tmp/bar: audit = content } exec { '/usr/bin/true': refreshonly = true, subscribe = File['/tmp/bar'] } and it produces this error every time: err: /Stage[main]//Node[localhost]/File[/tmp/bar]: Could not evaluate: Could not retrieve content for {md5}0d436949d23842605ecef4164ec54381 from filebucket: File not found at /etc/puppet/manifests/site.pp:1 notice: /Stage[main]//Node[localhost]/Exec[/usr/bin/true]: Dependency File[/tmp/bar] has failures: true warning: /Stage[main]//Node[localhost]/Exec[/usr/bin/true]: Skipping because of failed dependencies notice: Finished catalog run in 0.06 seconds I'm running latest versions of software: puppet-2.6.3-0.3.rc3.el5 and CentOS release 5.5 Does anyone have any thought what I'm doing wrong? Thanks in advance for any reply. Have you tried running puppet --parseonly against the manifest to see what it comes back with? Also, I'd recommend adding an 'ensure = file' to the File[] stanza to make sure the file is created if it doesn't exist - it looks like it's trying to find the file and failing. M. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] audit=content
On Fri, 2010-12-03 at 06:13 +0200, Paul Johnson wrote: Hi All, sorry if this was discussed before but I didn't find any solution for my problem. Test site.pp consists of 1 line: file { /tmp/bar: audit = content } exec { '/usr/bin/true': refreshonly = true, subscribe = File['/tmp/bar'] } and it produces this error every time: err: /Stage[main]//Node[localhost]/File[/tmp/bar]: Could not evaluate: Could not retrieve content for {md5}0d436949d23842605ecef4164ec54381 from filebucket: File not found at /etc/puppet/manifests/site.pp:1 notice: /Stage[main]//Node[localhost]/Exec[/usr/bin/true]: Dependency File[/tmp/bar] has failures: true warning: /Stage[main]//Node[localhost]/Exec[/usr/bin/true]: Skipping because of failed dependencies notice: Finished catalog run in 0.06 seconds I'm running latest versions of software: puppet-2.6.3-0.3.rc3.el5 and CentOS release 5.5 Does anyone have any thought what I'm doing wrong? Thanks in advance for any reply. Have you tried running puppet --parseonly against the manifest to see what it comes back with? Also, I'd recommend adding an 'ensure = file' to the File[] stanza to make sure the file is created if it doesn't exist - it looks like it's trying to find the file and failing. M. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] Using custom facts in Puppet
On Tue, 2010-11-16 at 07:33 -0800, JWBoerma wrote: Right now i am at a loss, since i cannot see what I'm doing wrong Does anyone have any experience with this? thanx in advance. Can you send the output from the following command: puppetd --test --verbose --no-daemonize And also the source code of your custom fact? Thanks, Matt -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] Pre-auth of nodes?
Hi all, I'm trying to work out the best way to ensure that my systems run puppet at first boot without having to run puppetca --sign or have wildcards in my auth file. All nodes are stored in an external database so what I want to tell puppet is if it's in the database, authenticate it, othwise ignore it. Is this possible using the external-node classifier? Thanks in advance, Matt -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] Accessing Facter in other languages than Ruby?
On Fri, 2010-10-22 at 08:54 -0700, Nigel Kersten wrote: On Fri, Oct 22, 2010 at 8:41 AM, Matt Wallace li...@truthisfreedom.org.uk wrote: Hi all, We're writing a few scripts at the moment that could really make use of Facter, however the vast majority of them team (including my self!) are not proficient in Ruby, however they are highly proficient in other languages such as (dare I say it!) Python. Is there (or are there any plans to!) release bindings for other languages to enable facts to be used in scripts other than puppet. This is on the Facter roadmap, but I don't have a rough date for you. http://projects.puppetlabs.com/issues/2157 is the bug you should watch if you want to help out or just keep up to date on progress. Feedback in that bug log more than appreciated. Hi Nigel, I'm not sure I've explained myself fully here, so apologies for that. I'm after a way to access the facts in a language other that Ruby, not create them. For example a python script that went something along the lines of: import facter proc1 = facter.facts['processor_0'] print u'The first processor in this system is %s' % proc1 === That's a vary basic example, however as I've already got a script that creates custom facts from the metadata in our provisioning system, I'm not worried about creating the facts, I just want to be able to access this incredible wealth of information across my various scripts (most of which are/will be in python) regardless of language. I love ruby, and I'm trying to learn it, but the truth is that me and my team don't really have time to learn another language on top of our day jobs! Thanks in advance, Matt -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] Accessing Facter in other languages than Ruby?
On Fri, 2010-10-22 at 12:22 -0400, Darren Chamberlain wrote: * Richard Crowley r at rcrowley.org [2010/10/22 08:57]: We're writing a few scripts at the moment that could really make use of Facter, however the vast majority of them team (including my self!) are not proficient in Ruby, however they are highly proficient in other languages such as (dare I say it!) Python. Many of the facts already fork so wiring in the command-line facter tool might not be a bad idea and is certainly possible right now. I was thinking that, too: import os facts = {} for fact in os.popen(facter).readlines(): n, v = fact.split( = ) facts[ n ] = v.rstrip() That gives you the facts as a dictionary. I was afraid someone would suggest that... ;) :P I'm really looking for bindings that are built into the language (in the same way that I can do a require 'facter' for my mcollective agents!) but for Python etc. If all else fails, I guess I could write a wrapper around the above to create a facts class, but if it was a native pypi module or egg, that would be ace! I'll take a look at the sourcecode for Facter and see how easy it would be to translate it into Python. M. Thanks in advance, Matt -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] Accessing Facter in other languages than Ruby?
On Sun, 2010-10-24 at 00:44 -0700, Yushu Yao wrote: Any reason you can't use facter the command line? E.g. call in python commands.getstatusoutput(facter) Because it's a dirty hack? ;) We've inherited a system where loads of stuff that could be done with shared libraries in various languages (PHP and python mainly) is done using using the appropriate Shell out to the command line and run this program, that I'm desperately trying to make sure that all our new scripts don't do this. I realise that the vast majority of libraries are actually wrappers around this kind of 'shell out' process, however it strikes me (and admittedly I'm incredibly paranoid!) that if you're shelling out to the command line, all it takes is an attacker to send the correct string to the script and they've immediately got access to a lot more on the system. Kind regards, Matt -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] Accessing the puppet configuration settings from an external script?
Hi all, I'm working on a ext-node script that will use oauth to authenticate against the node database and I'm wondering if it is possible to read the puppet.conf file easily in this script so I can place the oauth key/secret into this file (and basically avoid maintaining my own config file!) Is there an easy way of doing this, or do I need to read in a parse the file myself? Thanks, Matt -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] First boot with Puppet
On Thu, 2010-10-14 at 23:47 +1300, Michal Ludvig wrote: Hi guys, I'm installing Puppet on RHEL5 systems using KickStart but struggle with the first boot. As Stephen says, use cobbler (we do as well!) and put it into your kickstart. Here's ours: == sample.ks = #platform=x86, AMD64, or Intel EM64T # System authorization information auth --useshadow --enablemd5 # System bootloader configuration bootloader --location=mbr # Partition clearing information clearpart --all --initlabel # Use text mode install text # Firewall configuration - switch this off as we will apply it using # puppet firewall --disabled # Run the Setup Agent on first boot firstboot --disable # System keyboard keyboard uk # System language lang en_GB # Use network installation url --url=$tree # If any cobbler repo definitions were referenced in the kickstart # profile, include them here. $yum_repo_stanza # Network information $SNIPPET('network_config') # Reboot after installation reboot #Root password rootpw --iscrypted $default_password_crypted # SELinux configuration selinux --disabled # Do not configure the X Window System skipx # System timezone timezone Europe/London # Install OS instead of upgrade install # Clear the Master Boot Record zerombr # setup the default patitioning part /boot --fstype=ext3 --size=256 part swap --size=2048 part pv.01 --size=1 --grow volgroup vg_root pv.01 logvol / --vgname=vg_root --size=8192 --name=lv_root logvol /var --vgname=vg_root --size=10240 --name=lv_var logvol /tmp --vgname=vg_root --size=10240 --name=lv_tmp logvol /home --vgname=vg_root --size=10240 --name=lv_home %pre $SNIPPET('log_ks_pre') $kickstart_start $SNIPPET('pre_install_network_config') # Enable installation monitoring $SNIPPET('pre_anamon') %packages $SNIPPET('func_install_if_enabled') @Base vim-enhanced puppet acpid -sendmail %post --nochroot # THIS IS THE PUPPET STUFF! # # It registers the puppet client with the server and then it will # run on firstboot # Copy netinfo, which has our FQDN from DHCP, into the chroot test -f /tmp/netinfo amp;amp; cp /tmp/netinfo /mnt/sysimage/tmp/ %post /sbin/chkconfig --level 345 puppet on # Figure out the FQDN if [ -f /tmp/netinfo ] ; then FQDN=`(source /tmp/netinfo; [ -n $DOMAIN ] amp;amp; echo $HOSTNAME.$DOMAIN || echo $HOSTNAME)` # Run puppet, just to get the certs; the actual config update happens # on the next reboot hostname $FQDN /usr/sbin/puppetd -o -v --tag no_such_tag --waitforcert 60 fi $SNIPPET('log_ks_post') # Start yum configuration $yum_config_stanza # End yum configuration $SNIPPET('post_install_kernel_options') $SNIPPET('post_install_network_config') $SNIPPET('func_register_if_enabled') $SNIPPET('download_config_files') $SNIPPET('koan_environment') $SNIPPET('redhat_register') $SNIPPET('cobbler_register') # Enable post-install boot notification $SNIPPET('post_anamon') # Start final steps $kickstart_done # End final steps == END Sample.ks = All the $SNIPPET stuff is cobbler specific, but the Puppet config stuff should work as part of any kickstart. HTH, Matt. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] for each in puppet templates
Doh! I knew it would be something obvious. Thanks M. On 6 Sep 2010 20:55, Thomas Bellman bell...@nsc.liu.se wrote: li...@truthisfreedom.org.uk wrote: % mysql_repl_dbs.split[','].each do | dbname | -% replicat... Function calls in Ruby use round parenthesis or none at all, not square parenthesis. Square parenthesis are used for indexing. Your code means: call the 'split' method on mysql_repl_dbs with no parameters, and then index the result with the string ','. The split method will return an array of strings (and since you didn't pass any parameters to split, it will probably only be one element long, that element being the original string you tried to split). And arrays can only be indexed by integers. What you want is mysql_repl_dbs.split(',').each() do. /Bellman -- You received this message because you are subscribed to the Google Groups Puppet Users group... -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] Using FACTER in other ruby code
Hi all, I'm trying to write a ruby script to setup MySQL replication base on facts that we can distribute at runtime. I have two facts(mysql_master and mysql_repl_dbs) that show up when I run facter --puppet, however they do not appear to be imported in the following script: = #!/usr/bin/ruby # # mysql-replication.rb # # This script uses facter to setup mysql replication based upon the facts mysql_master and mysql_repl_dbs # # It is currently in beta # # 1) Require the relevant libraries require 'rubygems' require 'facter' require 'mysql' # 2) Get the relevant facts and echo them to the screen puts Getting facts begin Facter.mysql_master puts Facts received rescue Facter.loadfacts() puts running rescue end mysql_master = Facter.value('mysql_master') mysql_repl_dbs = Facter.value('mysql_master') puts Master Server: #{mysql_master}\nDatabases: #{mysql_repl_dbs} == The output from the script is as follows: Getting facts running rescue Master Server: Databases: where as facter --puppet mysql_master shows the correct hostname. Am I missing a trick here? Thanks, Matt -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] Using FACTER in other ruby code
On 2 September 2010 13:52, R.I.Pienaar r...@devco.net wrote: add around here: ENV['FACTERLIB'] = /var/lib/puppet/lib/facter:/var/lib/puppet/facts substitute with wherever your pluginsync is putting the facts Works a treat. (as always!) Thanks for the heads-up. How do I get this into the puppet/facter documentation? Matt -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] Using FACTER in other ruby code
On 2 September 2010 14:14, R.I.Pienaar r...@devco.net wrote: not sure where would be appropriate, I just got that from the facter code - looked what it does for --puppet :) Doh! M. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] Optionally ensuring a service is running
On Wed, 2010-08-11 at 14:49 -0400, Marc Zampetti wrote: Thanks all for the suggestions so far. A little more info to make it clear what I'm trying to do. Basically, I don't want to stop Puppet from running and managing the rest of the system, I just don't want it changing the state of the service itself. For example, an Apache http server is in maintenance mode because someone is troubleshooting an issue or something like that. I want to be able to have apache running, or not, but I don't want apache to be started or stopped while I'm working on it. For example, debugging some dynamic pages or something like that. I know I can turn off puppet, and in some cases that is the better way to go. But for some things, like say a dev or qa server, where I have other things running that need to be kept up to date, I want the option of controlling the service itself. Once out of maintenance, I want Puppet to resume controlling the running state. Check out mcollective - R.I.'s written quite a few agents that will push you in this direction already: http://code.google.com/p/mcollective/ http://www.devco.net/archives/2010/08/05/rapid_puppet_runs_with_mcollective.php http://www.devco.net/archives/2010/03/17/scheduling_puppet_with_mcollective.php Hope that's of some use, Matt -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] Help with setting facts for MySQL replication
Hi all, I'm trying to work on a solution to setting up mysql in a semi-automated fashion using facts to populate a puppet template. I'm using Cobbler as my build system and I was hoping to pass the values needed for replicate_do_db and server_id as ksmeta information, however it's looking increasingly unlikely that will work. Can anyone share how they configure MySQL for this kind of thing using puppet given that multiple servers may be replicating different databases and all servers require a unique ID? Thanks in advance, Matt -- Matthew Macdonald-Wallace li...@truthisfreedom.org.uk http://www.threedrunkensysadsonthe.net/ -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] Deploying Splunk using Puppet
Hi all, We're looking at deploying Splunk using puppet - can anyone give any guidance on the best way to do this? We need to setup light-forwarders and an indexing service via puppet manifests however it looks like we're going to have to maintain a custom yum repo - how do other people do it? Kind regards. Matt -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] Deploying Splunk using Puppet
Thanks Dan, I'll take a look at this and see if it needs adjusting. I've just been told that there is an RSS feed for versions that I can subscribe to so I can keep my own Yum Repo updated (we use Centos here... :( ) M. On 13 July 2010 11:48, Dan Carley dan.car...@gmail.com wrote: On 13 July 2010 11:23, Matthew Macdonald-Wallace mattmacw...@gmail.com wrote: We're looking at deploying Splunk using puppet - can anyone give any guidance on the best way to do this? We need to setup light-forwarders and an indexing service via puppet manifests however it looks like we're going to have to maintain a custom yum repo - how do other people do it? I opted for syslog-ng TCP/SSL forwards, instead of Splunk's own light forwarders, because I wasn't keen on adding the additional proprietary dependency on each frontend node. Each node configures itself to send the relevant logs back to a central host and Splunk indexes from a pattern of directories therein. I also wrapped the web service up with Nginx for some additional security. You can find my modules here: http://github.com/dcarley/puppet/tree/master/modules/service_splunk/ http://github.com/dcarley/puppet/tree/master/modules/service_syslog/ I suspect that you will almost certainly need to roll your own package if you want to play with the latest and greatest Splunk 4.1. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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-us...@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] Managing RPM Repositories
On Wed, 2010-06-02 at 10:45 -0700, Patrick wrote: On Jun 2, 2010, at 10:42 AM, Patrick wrote: On Jun 2, 2010, at 7:11 AM, Matt Wallace wrote: Hi all, I'm trying to write a module to manage yum repositories but before I re-invent the wheel I was wondering if anyone out there had existing code I could adapt! I think there was a resource type built into puppet called yumrepos on the types page. I don't know if it was just removed from the documentation during the port, or actually removed from puppet though. I found it at http://docs.puppetlabs.com/references/stable/type.html#yumrepo . For some reason I just didn't see it before. Awesome, thanks for that! I've got it working on a stand-alone manifest with puppet, however the following manifest doesn't appear to work when placed into a puppet manifest on the server: yumrepo{ atrpms-stable: name = atrpms, baseurl = http://dl.atrpms.net/el\$releasever-\ $basearch/atrpms/stable, descr = atrpms for exim etc, enabled = 1, includepkgs = exim-* dovecot* libspf2*, gpgkey = http://atrpms.net/RPM-GPG-KEY.atrpms;, gpgcheck = 1 } == I'm trying to setup a scenario similar to the following: site-module | |---repository modules | | | |---atrpms | |---email-server | |---package{exim:ensure=installed} The version of exim I want to install is in atrpms, however I want to be able to use this repo for other things (I'm also using Dovecot from this repo in another module) without getting a conflict because the repo has already been defined elsewhere! Thanks in advance, Matt -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] Checking for files on the client?
Hi all, I'm looking for a way to run an exec statement if a file does not exist on the server is this possible? Example code: define yumrepo(srcpkg = ,name = ) if(!exists(/etc/yum.repos.d/${name}.repo)) { if($srcpkg != ) { exec{rpm -Uh ${srcpkg}}, } } else { file { '/etc/yum.repos.d/${name}.repo': source = puppet:///modules/yumrepos/${name}.repo, } } == The idea is that if a repo is requested but the appropriate file does not exist it is installed from the repo's RPM (where possible) otherwise a file is pushed from the puppetmaster. What I want to avoid is the repo RPM being installed at every puppet run whilst also avoiding the need to push GPG keys (some of which are only available via the repo's RPM as far as I can tell...) If someone could give me some pointers, that would be great! Thanks in advance, Matt -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] Simple issue with templates.
Hi all, My brain is now officially dead! I have a series of modules that have a tree layout as documented in the best practice guide. One of the directories I have is templates and in this directory I have placed a template.erb file, however no matter how I refer to the path in my init.pp, I cannot get it to include. I've even set templatedir to /usr/share/puppet/modules (the module dir) in /etc/puppet/puppet.conf but I keep getting the following error: debug: Scope(Yumrepository[mcollective]): Retrieving template puppet:///yumrepositories/templates/repo.template.rb err: Puppet::Module::InvalidName at /usr/share/puppet/modules/yumrepositories/manifests/init.pp:22 The relevant file stanza is: file { /etc/yum.repos.d/$title.repo: owner = root, group = root, mode= 644, content = template(puppet:///yumrepositories/templates/repo.template.rb), } Do I _really_ have to place the templates in /var/lib/puppet/template/ ? I'm hoping to package a number of these manifests as moduels in git and I really want to be able to deploy direct from git rather than cloning and then having to copy the template into place. Thanks in advance, Matt -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] Checking for files on the client?
On Mon, 2010-05-03 at 07:23 +0100, Matthew Macdonald-Wallace wrote: Hi all, I'm looking for a way to run an exec statement if a file does not exist on the server is this possible? I've been thinking about this some more as I've been developing this module for easy install of RPM repos. Would it work if I pushed out a custom fact with the repo that I then called in the manifest? Example (pseudo-code!): == if(!fact-$repoName){ install repo from rpm } else { check repo config against file } I'm not convinced that this fixes everything but I think it might do the trick. Thoughts? M. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] Ukuug 2010
So who else is going to this next week? Anyone want to meet up? Matt. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] Issues with reporting to foreman under puppet-server 0.25.4 (installed from Epel)
I've had a thought about this overnight (my brain seems to work better when I'm asleep!) Is there a newer version of the foreman.rb report intended for use with puppetmaster 0.25.x? I know the config.ru changed for the RACK application, I'm wondering if I need to make further changes. Thanks, M. On 4 March 2010 21:33, Matthew Macdonald-Wallace mattmacw...@gmail.com wrote: Yup, it's definitely there and it's definitely got the right name. :( M On 4 March 2010 21:09, Andrew Dickson d...@number88.com wrote: are you sure foreman-report.rb is in your lib directory and named foreman.rb? This caught me, but I think you would see error messages about not being able to find a report named foreman. If you copied it into a version specific location, and then updated your puppet gem to a new version, puppet might not be able to find the report. -drew On Thu, Mar 4, 2010 at 6:09 AM, Matthew Macdonald-Wallace mattmacw...@gmail.com wrote: Hi all, After troubleshooting my foreman installation on the Foreman mailing list (thanks Ohad!) I've come to the conclusion that the reason why reports aren't being generated is that since I upgraded puppet master from 0.24.x to 0.25.4, the foreman report is not running correctly (if at all!). -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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-us...@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] Issues with reporting to foreman under puppet-server 0.25.4 (installed from Epel)
Um, yeah, so that's completely different to what I've got... :( I'll get a copy of that script and install it now. On 5 March 2010 10:38, Matt mattmora...@gmail.com wrote: On 5 March 2010 10:11, Matthew Macdonald-Wallace mattmacw...@gmail.com wrote: I've had a thought about this overnight (my brain seems to work better when I'm asleep!) Is there a newer version of the foreman.rb report intended for use with puppetmaster 0.25.x? I know the config.ru changed for the RACK application, I'm wondering if I need to make further changes. Are you running Foreman 0.1.3? My foreman.rb on a x86_64 box is in :- /usr/lib/ruby/site_ruby/1.8/puppet/reports/foreman.rb And consists of:- $foreman_url=http://your.foreman.url; require 'puppet' require 'net/http' require 'uri' Puppet::Reports.register_report(:foreman) do Puppet.settings.use(:reporting) desc Sends reports directly to Foreman def process begin Net::HTTP.post_form(URI.parse(#{$foreman_url}/reports/create?format=yml), {'report'= to_yaml}) rescue Exception = e raise Puppet::Error, Could not send report to Foreman: #{e} end end end /etc/puppet/puppet.conf [puppetmasterd] reports=log, foreman -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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-us...@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] Issues with reporting to foreman under puppet-server 0.25.4 (installed from Epel)
Hi all, After troubleshooting my foreman installation on the Foreman mailing list (thanks Ohad!) I've come to the conclusion that the reason why reports aren't being generated is that since I upgraded puppet master from 0.24.x to 0.25.4, the foreman report is not running correctly (if at all!). The puppetmasterd is running as a Rack application and despite the fact that puppetmasterd has the following in /etc/puppet/puppetmasterd.conf [puppetmasterd] reports = log,foreman storeconfigs = true And that the report appears to be configured correctly (the actual hostname is obscured but it resolves via DNS without issue): [root@host reports]# pwd /usr/lib/ruby/1.8/puppet/reports [root@host reports]# ls foreman.rb log.rb rrdgraph.rb store.rb tagmail.rb and that foreman.rb appears to be correct: # copy this file to your report dir - e.g. /usr/lib/ruby/1.8/puppet/reports/ # add this report in your puppetmaster reports - e.g, in your puppet.conf add: # reports=log, foreman # (or any other reports you want) # URL of your Foreman installation $foreman_url=http://foreman.host:3000 require 'puppet' require 'net/http' require 'uri' Puppet::Reports.register_report(:foreman) do Puppet.settings.use(:reporting) desc Sends reports directly to Foreman def process begin uri = URI.parse($foreman_url) http = Net::HTTP.new(uri.host, uri.port) if uri.scheme == 'https' then http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE end req = Net::HTTP::Post.new(/reports/create?format=yml) req.set_form_data({'report' = to_yaml}) response = http.request(req) rescue Exception = e raise Puppet::Error, Could not send report to Foreman at #{$foreman_url}/reports/create?format=yml: #{e} end end end and that the config.ru has been updated for puppetmaster 0.25.4: # a config.ru, for use with every rack-compatible webserver. # SSL needs to be handled outside this, though. # if puppet is not in your RUBYLIB: # $:.unshift('/opt/puppet/lib') $0 = puppetmasterd require 'puppet' # if you want debugging: # ARGV --debug ARGV --rack require 'puppet/application/puppetmasterd' # we're usually running inside a Rack::Builder.new {} block, # therefore we need to call run *here*. run Puppet::Application[:puppetmasterd].run I am not even seeing an attempt to run the foreman report. Foreman is working fine and is serving web pages, it was also working fine with the reports up until the puppetmaster upgrade. Can anyone help? I can provide more information if required. PF -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] Puppet 0.24.8 RPM (0.25.4 client not backwards compatible)
SSL works fine, I'm just having real issues with Foreman reports at the moment. The ruby file exists, the rack server is running, foreman works fine (apart from reporting) and so does puppet but the puppet reporting into Foreman is broken and it appears to be an issues with Puppet rather than Foreman. The issue that we had was that the manifest that ensures puppet is centrally configured had ensure = latest and therefore the client updated on all nodes, the server didn't and everything broke. It's taken me the best part of a day to make sure that it is all working again correctly. We've learnt a lesson from this: * Don't use ensure=latest unless you have complete control over the packages that will be installed. I am concerned that Epel jumped a major version that enforced so many major changes, but I guess that's our fault for trusting that things would stay the same! :P Kind regards, Matt On 4 March 2010 19:55, Douglas Garstang doug.garst...@gmail.com wrote: All I can is Ugh. I'm avoiding 0.25 like the plague. The last time I tried to use it, I simply couldn't the SSL keys to work, and from what I read, others did too. Were those problems fixed? Doug. On Thu, Mar 4, 2010 at 11:36 AM, Nigel Kersten nig...@google.com wrote: On Thu, Mar 4, 2010 at 11:27 AM, Douglas Garstang doug.garst...@gmail.com wrote: Does anyone know where I can get the puppet 0.24.8 RPM? We had been getting it from the public EPEL Repo, but it looks like they just decided to upgrade the version in their repository to 0.25.4. So... since our server is running 0.24.8, any other systems we install from this point on end up getting 0.25 and then fail to talk to the server. The clients come up with... Could not retrieve catalog from remote server: Error 405 on SERVER: Method Not Allowed I researched, and found out that this happens when the client is newer than the server (or to be more specific the server is running 0.24.8 and the client is running 0.25.4) To whoever decided not to make the client backward compatible, good one! Puppet clients are *never* backwards compatible across major versions. You always upgrade the server first. -- nigel -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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. -- Regards, Douglas Garstang http://www.linkedin.com/in/garstang Email: doug.garst...@gmail.com Cell: +1-805-340-5627 -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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-us...@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] Puppet 0.24.8 RPM (0.25.4 client not backwards compatible)
On 4 March 2010 20:19, James Turnbull ja...@lovedthanlost.net wrote: I am concerned that Epel jumped a major version that enforced so many major changes, but I guess that's our fault for trusting that things would stay the same! :P I'll let the EPEL guys respond here but they only increment releases after extensive testing. Yeah, please don't misunderstand me, I'm not blaming EPEL on this one at all. We should have checked that we were pinned to a version on Puppet that we knew worked. Another one to add to the Somebody else should learn from my mistakes list! :D M. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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] Issues with reporting to foreman under puppet-server 0.25.4 (installed from Epel)
Yup, it's definitely there and it's definitely got the right name. :( M On 4 March 2010 21:09, Andrew Dickson d...@number88.com wrote: are you sure foreman-report.rb is in your lib directory and named foreman.rb? This caught me, but I think you would see error messages about not being able to find a report named foreman. If you copied it into a version specific location, and then updated your puppet gem to a new version, puppet might not be able to find the report. -drew On Thu, Mar 4, 2010 at 6:09 AM, Matthew Macdonald-Wallace mattmacw...@gmail.com wrote: Hi all, After troubleshooting my foreman installation on the Foreman mailing list (thanks Ohad!) I've come to the conclusion that the reason why reports aren't being generated is that since I upgraded puppet master from 0.24.x to 0.25.4, the foreman report is not running correctly (if at all!). -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-us...@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-us...@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: new release of puppetsurvey
Philip wrote: Thank you for the clue with the max integer Size. Yes i develop on a 64bit System and had no problems converting. Will test it on 32Bit Systems and provide a Patch. Hi, If you need someone to test the patch, let me know as at the moment puppetsurvey is picking up all the nodes I'm using but always gives the following error: An error occurred Application error Exception information: Message: Failed to open file: fopen(/var/lib/puppet/reports/nodeName/2147483647.yaml) [function.fopen]: failed to open stream: No such file or directory Stack trace: #0 /var/www/html/puppetsurvey/application/models/PuppetHost.php(157): Horde_Yaml::loadFile('/var/lib/puppet...') #1 /var/www/html/puppetsurvey/application/models/PuppetHost.php(115): Default_Model_PuppetHost-parsePuppetReports() #2 /var/www/html/puppetsurvey/application/models/Report.php(55): Default_Model_PuppetHost-__construct('nodeName...') #3 /var/www/html/puppetsurvey/application/controllers/ReportController.php(59): Default_Model_Report-__construct('nodeName...') #4 /var/lib/php/ZendFramework-1.9.5/library/Zend/Controller/Action.php(133): ReportController-init() #5 /var/lib/php/ZendFramework-1.9.5/library/Zend/Controller/Dispatcher/Standard.php(262): Zend_Controller_Action-__construct(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http), Array) #6 /var/lib/php/ZendFramework-1.9.5/library/Zend/Controller/Front.php(946): Zend_Controller_Dispatcher_Standard-dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #7 /var/lib/php/ZendFramework-1.9.5/library/Zend/Application/Bootstrap/Bootstrap.php(77): Zend_Controller_Front-dispatch() #8 /var/lib/php/ZendFramework-1.9.5/library/Zend/Application.php(358): Zend_Application_Bootstrap_Bootstrap-run() #9 /var/www/html/puppetsurvey/public/index.php(26): Zend_Application-run() #10 {main} Request Parameters: array ( 'controller' = 'report', 'action' = 'index', 'hostname' = 'nodeName', 'module' = 'default', ) == (I've removed the actual node name and replaced it with nodeName in the error above.) It would be great if we could get this working. Cheers, M. --~--~-~--~~~---~--~~ 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: new release of puppetsurvey
Hi, I changed line 147 in application/models/PuppetHosts.php and removed the (int) reference - now it works! The new line is as follows: $reportdate = basename($file, '.yaml'); instead of: $reportdate = (int) basename($file, '.yaml'); Kind regards, Matt 2009/11/17 Matthew Macdonald-Wallace mattmacw...@gmail.com: Philip wrote: Thank you for the clue with the max integer Size. Yes i develop on a 64bit System and had no problems converting. Will test it on 32Bit Systems and provide a Patch. Hi, If you need someone to test the patch, let me know as at the moment puppetsurvey is picking up all the nodes I'm using but always gives the following error: An error occurred Application error Exception information: Message: Failed to open file: fopen(/var/lib/puppet/reports/nodeName/2147483647.yaml) [function.fopen]: failed to open stream: No such file or directory Stack trace: #0 /var/www/html/puppetsurvey/application/models/PuppetHost.php(157): Horde_Yaml::loadFile('/var/lib/puppet...') #1 /var/www/html/puppetsurvey/application/models/PuppetHost.php(115): Default_Model_PuppetHost-parsePuppetReports() #2 /var/www/html/puppetsurvey/application/models/Report.php(55): Default_Model_PuppetHost-__construct('nodeName...') #3 /var/www/html/puppetsurvey/application/controllers/ReportController.php(59): Default_Model_Report-__construct('nodeName...') #4 /var/lib/php/ZendFramework-1.9.5/library/Zend/Controller/Action.php(133): ReportController-init() #5 /var/lib/php/ZendFramework-1.9.5/library/Zend/Controller/Dispatcher/Standard.php(262): Zend_Controller_Action-__construct(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http), Array) #6 /var/lib/php/ZendFramework-1.9.5/library/Zend/Controller/Front.php(946): Zend_Controller_Dispatcher_Standard-dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #7 /var/lib/php/ZendFramework-1.9.5/library/Zend/Application/Bootstrap/Bootstrap.php(77): Zend_Controller_Front-dispatch() #8 /var/lib/php/ZendFramework-1.9.5/library/Zend/Application.php(358): Zend_Application_Bootstrap_Bootstrap-run() #9 /var/www/html/puppetsurvey/public/index.php(26): Zend_Application-run() #10 {main} Request Parameters: array ( 'controller' = 'report', 'action' = 'index', 'hostname' = 'nodeName', 'module' = 'default', ) == (I've removed the actual node name and replaced it with nodeName in the error above.) It would be great if we could get this working. Cheers, M. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---