Re: [Puppet Users] Hiera - can't convert Array into String error

2012-06-25 Thread Michael Knox
]: { bool_to_be = true } default: { bool_to_be = false } } } On Jun 13, 2012, at 7:40 AM, Michael Knox wrote: Hi, I've been moving from extlookup to hiera, and it's generally gone fairly smoothly, but I've run into a problem with one of our defines

Re: [Puppet Users] Contributing pieces of a global value from multiple places

2012-06-13 Thread Michael Knox
Hi, I use an augeas resource that manages the FW_CONFIGURATIONS_$zone entry in etc/sysconfig/SuSEfirewall2. augeas {fwservice_${svc}-$zone: context = /files/etc/sysconfig/SuSEfirewall2, onlyif= match FW_CONFIGURATIONS_$zone/value[.='$svc'] size == 0, changes = [

Re: [Puppet Users] Hiera - can't convert Array into String error

2012-06-13 Thread Michael Knox
, 2012, at 7:40 AM, Michael Knox wrote: Hi, I've been moving from extlookup to hiera, and it's generally gone fairly smoothly, but I've run into a problem with one of our defines ... I get this error: err: Could not retrieve catalog from remote server: Error 400 on SERVER: can't convert

Re: [Puppet Users] Semi-architectural question - data inside code-tree.

2011-07-22 Thread Michael Knox
On 22/07/11 12:57 AM, John Hawkes-Reed wrote: Hello. As part of our Puppet rig, we manage a number of zonefiles with NSD. This means that there's a directory of datafiles under ../puppet/modules/nsd/files/zones/ (and something somewhat similar for the Postfix virtual domains). It seems to me

Re: [Puppet Users] nodes.pp in different environments

2011-07-12 Thread Michael Knox
Hi, On 13/07/11 2:03 PM, newguy wrote: Hi guys I have a small question, I have 3 environments in puppet.conf file: [development] modulepath=/etc/puppet/development/modules manifests=/etc/puppet/development/manifests/site.pp I have defined the site.pp path, my question is do I need to make a

Re: [Puppet Users] Re: how to do conditional check?

2011-06-13 Thread Michael Knox
Yes, Create a custom fact that checks for the existence of the directory. I have one that is as simple as ... Facter.add(apde_available) do setcode do if File::directory?(/usr/local/APDE) true else false end end end then in my manifest ...

Re: [Puppet Users] Unable to use types from modules

2011-06-06 Thread Michael Knox
David, Are you using environments? If so, you're probably hitting bug #4409 ( https://projects.puppetlabs.com/issues/4409 ) If not, have you restarted your puppet master? Cheers 2011/6/7 Davíð Steinn Geirsson da...@basis.is -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I'm

[Puppet Users] Augeas match Puppet

2011-06-06 Thread Michael Knox
Hi, I'm working on a type to undertake some very simple management of the SuSE firewall service (/etc/sysconfig/SuSEfirewall2), specifcally I need to manage the contents of the list FW_CONFIGURATIONS_EXT which is handled as a shell list. I've been able to use the shellvars_list.aug to manage the

Re: [Puppet Users] Augeas match Puppet

2011-06-06 Thread Michael Knox
dealing with Augeas. http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Augeas On Mon, Jun 6, 2011 at 3:45 PM, Michael Knox michael.knox...@gmail.comwrote: Hi, I'm working on a type to undertake some very simple management of the SuSE firewall service (/etc/sysconfig/SuSEfirewall2

Re: [Puppet Users] require? before? I need to have a dependency in place . . .

2011-06-03 Thread Michael Knox
Guy, To requery the facts during would, most likely, invalidate your catalogue for that run. I've handled this by doing the work over 2 puppet runs. I have a custom fact that requires an X display (thanks to an install app that requires X display, even when using command line options and silent

Re: [Puppet Users] Facter with a gem

2011-05-17 Thread Michael Knox
I extend this a bit in some of my facts to check that the gem is available before using it. That way if the gem can't be loaded (normally because it isn't installed), it will still return a value that I can use in the manifests. Facter.add(ibmim_installed_version) do setcode do

Re: [Puppet Users] Re: Deleted zypper repo not re-created on subsequent puppetd runs

2011-04-19 Thread Michael Knox
Hi, That seems ok, but I'm still not seeing anything from zypprepo in the debug output which leads me to think it's being included for some reason. I just tried removing the repos on SLED and SLES test systems and the repo files were recreated without any intervention. I'm wondering about

Re: [Puppet Users] Deleted zypper repo not re-created on subsequent puppetd runs

2011-04-18 Thread Michael Knox
Hi, For checking that a resource exists Zypprepo (and yumrepo) simply check for the presence of the repo file. Is your zypprepo defined using the name SUSE-Linux-Enterprise-Server-11? zypprepo {SUSE-Linux-Enterprise-Server-11: } This causes zypprepo to look for

Re: [Puppet Users] Re: Deleted zypper repo not re-created on subsequent puppetd runs

2011-04-18 Thread Michael Knox
No problem, Are you sure that the manifest is being included? I don't see any mention of zypprepo in the debug output below. Perhaps try something like puppet agent --test --debug --tags zypprepo so you only see what zypprepo is doing. Also could you post the relevant section of your

Re: [Puppet Users] Passenger

2011-03-19 Thread Michael Knox
Hi, However, apache is giving me errors such as # mkdir -p /usr/lib/ruby/gems/1.8/gems/passenger-3.0.5/ext/ruby/native # cd /usr/lib/ruby/gems/1.8/gems/passenger-3.0.5/ext/ruby/native # /usr/bin/ruby '/usr/lib/ruby/gems/1.8/gems/passenger-3.0.5/ext/ruby/ extconf.rb' # make make: gcc: Command

Re: [Puppet Users] convert yum repos into manifest

2011-02-10 Thread Michael Knox
on it. On 11/02/11 2:27 AM, Ashley Gould wrote: hey Michael, Where did you get zypprepo type? Did you write it? Can you post it? On Wed, Feb 09, 2011 at 11:30:25AM +1100, Michael Knox wrote: Try ralsh yumrepo Just discovered that ralsh can even use custom types out of my modules ... cool $ ralsh

Re: [Puppet Users] Set client environment on master

2011-01-18 Thread Michael Knox
On 19/01/11 1:41 PM, Bostjan Skufca wrote: Hi again! Is there any way to override client-specified environment in puppet master? I would like my puppetmaster node definition to set the real environment the node is in. I don't think there is directly ... I work around this by setting a

Re: [Puppet Users] Problem restarting the agent

2011-01-13 Thread Michael Knox
On 14/01/11 7:20 AM, Wesley Wu wrote: Just installed Puppet 2.6.4 on Ubuntu 10.10 I was trying to restart the puppet agent but got the following error and the agent didn't run: $ sudo puppetd --server server.domain.com --waitforcert 60 --test err: Could not retrieve catalog from remote server:

Re: [Puppet Users] Problem restarting the agent

2011-01-13 Thread Michael Knox
/pupept/ssl or /etc/puppet/ssl on the Puppet master (assuming 2.6) puppet cert --clean fqdn On Thu, Jan 13, 2011 at 4:46 PM, Michael Knox michael.knox.au http://michael.knox.au@gmail.com http://gmail.com wrote: On 14/01/11 7:20 AM, Wesley Wu wrote: Just installed Puppet 2.6.4

Re: [Puppet Users] Supporting tar.gz as file source

2011-01-06 Thread Michael Knox
On 6/01/11 12:52 PM, Nigel Kersten wrote: On Wed, Jan 5, 2011 at 2:52 PM, Michael Knox michael.knox.au http://michael.knox.au@gmail.com http://gmail.com wrote: It would be neat if puppet could use tar.gz's as a source, instead of just bare directory trees. So I've lodged a feature

[Puppet Users] Supporting tar.gz as file source

2011-01-05 Thread Michael Knox
It would also keep the contents in sync with .tar.gz. Expand is a new option for file, but perhaps this could be inferred (and the option not needed) as ensure = directory and source is a file. -- Michael Knox Systems Administrator, DEK Technologies P/L Email:michael.k...@dektech.com.au

Re: [Puppet Users] Supporting tar.gz as file source

2011-01-05 Thread Michael Knox
On 6/01/11 10:48 AM, Patrick wrote: On Jan 5, 2011, at 2:52 PM, Michael Knox wrote: It would be neat if puppet could use tar.gz's as a source, instead of just bare directory trees. So I've lodged a feature request: https://projects.puppetlabs.com/issues/5786 Many of my manifests

Re: [Puppet Users] Facts in 2.6.4

2010-12-30 Thread Michael Knox
Martin, The 'external_hostname' fact is in the file /etc/puppet/testing/modules/facts/files/ec2_public_hostname.rb I assume facts is the name of your module, so it should be: /etc/puppet/testing/modules/facts/lib/facter/ec2_public_hostname.rb Cheers Mike -- You received this message

Re: [Puppet Users] exec a command if return value from exec'ing another command is non-zero

2010-10-04 Thread Michael Knox
Aaron, unless is probably the param you need for exec. require and before are for defining dependencies between items defined in puppet. See below in your example. Cheers On 5/10/10 11:11 AM, Aaron wrote: Hi puppet experts, I'm pretty new to puppet and am having some trouble finding the

Re: [Puppet Users] vcsrepo type

2010-09-16 Thread Michael Knox
Alaric, I've just made a fix to the svn provider (and a related tidy up to the vcsrepo type) That change is available at: http://github.com/mikeknox/puppet-vcsrepo Cheers On 17/09/10 5:44 AM, Alaric wrote: Hi, I've been playing with the vcsrepo type and for the most part it works pretty

Re: [Puppet Users] Puppet/OpenSUSE 11.3 and packages

2010-08-11 Thread Michael Knox
On 11/08/10 6:31 PM, Jose Marques wrote: The other hassle which I've just been dealing with is repo definitions, you can use yumrepo but I think that process is fairly awkward on SuSE/OpenSuSE when you could use yast repo definitions. The yumrepo type seems interesting, as it doesn't use

Re: [Puppet Users] Puppet/OpenSUSE 11.3 and packages

2010-08-10 Thread Michael Knox
Jose, rug disappeared from OpenSuSE about 11.1/11.2. zypper as a package provider should be fully (thanks to patches #3802 #1223) supported in puppet 2.6. I'm using 0.25.5 with those patches. The other hassle which I've just been dealing with is repo definitions, you can use yumrepo but I

Re: [Puppet Users] vcsrepo type, svn, ensure = latest

2010-07-16 Thread Michael Knox
Well to wrap this up, I've created a diff and submitted to the puppet-dev list (https://groups.google.com/group/puppet-dev/browse_thread/thread/6f6735933f362892?hl=en#). Code is available at http://github.com/mikeknox/puppet-vcsrepo/tree/bug/svn-update.

Re: [Puppet Users] vcsrepo type, svn, ensure = latest

2010-07-15 Thread Michael Knox
ok, So I think I now have it sorted ... I've added an insync? method to the type to override the inherited method, as well as making some tweaks in the svn provider. Seems to work correctly now with svn so I'll tidy up my code and submit a patch/diff. Cheers On 12/07/2010, at 11:12 PM,

Re: [Puppet Users] vcsrepo type, svn, ensure = latest

2010-07-14 Thread Michael Knox
Thanks Corey, On 15/07/10 10:35 AM, Corey Ralph wrote: Hi Michael, On 13/07/2010, at 4:12 PM, Michael Knox wrote: exec {/bin/date: subscribe = Vcsrepo[/tmp/repo], } Does anyone have any suggestions on how I can get this to only refresh when the repo is updated? You need to add

[Puppet Users] vcsrepo type, svn, ensure = latest

2010-07-13 Thread Michael Knox
Hi all, We have some data in SVN repos and I'd like puppet to ensure that a) the latest copy is checked out, and b) reload a service if it is updated. So I've configured the vcsrepo type (http://forge.puppetlabs.com/puppetlabs/vcsrepo). However when I subscribe to the vcsrepo resource, it is

Re: [Puppet Users] vcsrepo type, svn, ensure = latest

2010-07-13 Thread Michael Knox
James, On 14/07/10 1:13 AM, James Turnbull wrote: Michael Can you provide logs so I can see what's happening --debug please. Client debug log attached. There was nothing on the puppetmaster (also --debug). Thanks James Turnbull On 12/07/2010, at 11:12 PM, Michael