Re: [Puppet Users] Hiera - can't convert Array into String error
On 25/06/2012, at 11:48 PM, Kelsey Hightower wrote: On Thursday, June 14, 2012 1:51:45 AM UTC-4, Mike wrote: Thanks, It appears to be something internal to the hiera function, so I'll have to go digging in there to find out what's going on. Cheers Are you in position to **test** the 1.0rc branches of hiera and hiera-puppet? Just tried them, unfortunately I got exactly the same error…. err: Could not retrieve catalog from remote server: Error 400 on SERVER: can't convert Array into String at --trace on the client (using puppet agent) hasn't given me anything useful. I can extract the data using on the server using hiera, so it would seem to be something in the puppet functions. Hopefully I'll be able to spend some time and look at the functions in a bit more detail soon. On 14/06/2012, at 1:06 AM, Wolf Noble wrote: I had some issues with using boolean logic with data being fed to me by hiera. I went for a slightly hacky option of: might help you, might be a BadIdea(™) (untested) class foo::params{ bool_to_be_tempname = hiera('some_TorF_key_as_a_string') case bool_to_be_tempname { [tT][rR][uU][eE]: { 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 ... I get this error: err: Could not retrieve catalog from remote server: Error 400 on SERVER: can't convert Array into String at ... The define uses an exec to install Perl CPAN modules and sets log output based on a hiera lookup. exec{cpan_load_${title}: cut … logoutput = hiera('cpan_logoutput'), } If I remove that line, everything runs through fine. The yaml for hiera: --- cpan_logoutput: true Any ideas on what could be triggering this error? -- 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 message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See http://www.datapipe.com/legal/email_disclaimer/ for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you. -- 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/-/2GdyZeaN6DoJ. 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] Contributing pieces of a global value from multiple places
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 = [ set FW_CONFIGURATIONS_$zone/value[.='$svc'] $svc, ], load_path = $augeas::params::lense_path, require = Augeas::Lense['shellvars_list.aug'], notify= Service[firewall], } Each service adds a config file to /etc/sysconfig/SuSEfirewall2.d/services/ For example, in svn (the svn pkg supplies it own services file) … firewall::service{svnserve: allow = true, require = Package[${svn::params::svn_apache_pkg}], } Cheers On 12/06/2012, at 5:49 AM, Michael Smith wrote: Hi, I'm using Puppet to configure SuSEfirewall2. I have a class that lets me set a list of ports to open in a variable in /etc/sysconfig/SuSEfirewall2. It's just a wrapper around an Augeas resource. How can I make it so multiple classes can contribute a list of ports to my firewall class? For example: class class1 { firewall::tcp { '123': } } class class2 { firewall::tcp { '456': } } # this would result in ports 123 and 456 being open # (FW_SERVICES_EXT_TCP=123 456 in the firewall config file) include class1 include class2 I think I need a way to append 123 and 456 to some kind of global variable so my firewall class can pass the variable to an Augeas resource. Is something like this possible? Thanks, Mike -- 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] Hiera - can't convert Array into String error
Thanks, It appears to be something internal to the hiera function, so I'll have to go digging in there to find out what's going on. Cheers On 14/06/2012, at 1:06 AM, Wolf Noble wrote: I had some issues with using boolean logic with data being fed to me by hiera. I went for a slightly hacky option of: might help you, might be a BadIdea(™) (untested) class foo::params{ bool_to_be_tempname = hiera('some_TorF_key_as_a_string') case bool_to_be_tempname { [tT][rR][uU][eE]: { 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 ... I get this error: err: Could not retrieve catalog from remote server: Error 400 on SERVER: can't convert Array into String at ... The define uses an exec to install Perl CPAN modules and sets log output based on a hiera lookup. exec{cpan_load_${title}: cut … logoutput = hiera('cpan_logoutput'), } If I remove that line, everything runs through fine. The yaml for hiera: --- cpan_logoutput: true Any ideas on what could be triggering this error? -- 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 message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See http://www.datapipe.com/legal/email_disclaimer/ for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you. -- 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] Semi-architectural question - data inside code-tree.
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 that mixing code and data like that might be a bad idea, and was wondering if anyone else had a better one. Hi, Data can be sourced from VCS repos, rather than your Puppet manifests/modules in at least 2 ways. 1. directory structures such as DNS zones file, or apps that are housed in VCS repos are managed through the vcsrepo type [1] 2. For an individual files content, we currently have something like: file{'/blah': inline_template(%= `/usr/bin/svn cat http://repo.domain/somefile` %), } This should be moved into a function with some code to manage failure conditions such as being unable to contact the repository to ensure that such a failure doesn't cause corruption. [1] http://forge.puppetlabs.com/puppetlabs/vcsrepo -- 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] nodes.pp in different environments
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 nodes.pp for every environment?? yes, if you're not using an ENC. I'm not using an ENC yet, so I keep all my node defs in nodes.pp (included by site.pp) But I only edit the nodes.pp in dev, and then promote it as required. That's ok for me, but it's not so good for the rest of the team so an ENC is going in very soon (probably Foreman) Cheers -- 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: how to do conditional check?
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 ... if ($apde_available =~ /true/) { ... } Cheers On 13/06/11 7:21 PM, Sans wrote: Any suggestion from anyone else? Is there a way to check if a directory (or file) already exists, then do something in Puppet? Cheers!! -- 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] Unable to use types from modules
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 having some problems using modules which define their own types and providers. It seems the puppet client does not recognise them, even though they are set up according to the structure suggested in http://docs.puppetlabs.com/guides/plugins_in_modules.html I was initially trying to use the glassfish class from https://github.com/larstobi/puppet-glassfish. Since then I've tried some others, including this very simple VCS provider: https://github.com/jamtur01/puppet/commit/a1fcf677759858f22fccba0a383f2aa4e6a92e54 My module tree (/opt/puppet/etc/modules/subversiontest) is set up as follows: ./puppet/type/repo/repo.pp ./puppet/provider/repo/svn.pp ./puppet/provider/repo/git.pp ./manifests/init.pp My init.pp simply defines a basic resource from this: class subversiontest { repo { wp: source = http://core.svn.wordpress.org/trunk/;, path = /tmp/wp, ensure = present, } } I have set pluginsync = true under the [main] section of both the master and agent. Howver, when I try to apply this module, I always get an error regarding the type being unknown: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find resource type repo at /opt/puppet/etc/modules/subversiontest/manifests/init.pp:6 on node rhel6test.skyrr.median.local My versions are: root@pmonitor02 ~ # puppetmasterd --version 0.25.4 root@rhel6test puppet # puppetd --version 0.25.5 I'm sure my mistake is very basic, but I've been stuck on this for a while. Can anyone provide suggestions on what could be wrong in my setup? Best regards, David -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3tDIUACgkQKXQCZqH9wfxVbwCePEvfHFQQUTNGSuYtLMt47YWk ya0An0ngLa0Ozrpf3LoqVd6ucozB7AiV =d9vP -END PGP SIGNATURE- -- 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] Augeas match Puppet
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 file, but I'm struggling with the puppet filter / onlyif. The following works in augtool: match FW_CONFIGURATIONS_EXT/value $svc I then wanted to check that the size of this array was 0 before adding the service. However this fails with ... err: /Stage[main]/Svn::Server/Firewall::Service[svn]/Augeas[fwservice_svn]: Could not evaluate: Error sending command 'match' with params nil/Unknown command svn So this filter argument for match is supported in Augeas, but not in the Augeas provider. Is there a better way of doing this with the current provider? The manifest code in question augeas {fwservice_$svc: context = /files/etc/sysconfig/SuSEfirewall2, onlyif= match FW_CONFIGURATIONS_EXT/value $svc size == 0, #onlyif= match FW_CONFIGURATIONS_EXT/value not_include $svc, changes = [ set FW_CONFIGURATIONS_EXT/value[last()+1] $svc, ], load_path = $augeas::params::lense_path, require = Augeas::Lense['shellvars_list.aug'], } -- 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] Augeas match Puppet
Thanks Aaron, I reread that and this time found the snippet I needed ... The following works ... onlyif= match FW_CONFIGURATIONS_EXT/value[.='$svc'] size == 0, Cheers On 7 June 2011 08:51, Aaron Grewell aaron.grew...@gmail.com wrote: I found this Wiki article tremendously valuable when 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), 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 file, but I'm struggling with the puppet filter / onlyif. The following works in augtool: match FW_CONFIGURATIONS_EXT/value $svc I then wanted to check that the size of this array was 0 before adding the service. However this fails with ... err: /Stage[main]/Svn::Server/Firewall::Service[svn]/Augeas[fwservice_svn]: Could not evaluate: Error sending command 'match' with params nil/Unknown command svn So this filter argument for match is supported in Augeas, but not in the Augeas provider. Is there a better way of doing this with the current provider? The manifest code in question augeas {fwservice_$svc: context = /files/etc/sysconfig/SuSEfirewall2, onlyif= match FW_CONFIGURATIONS_EXT/value $svc size == 0, #onlyif= match FW_CONFIGURATIONS_EXT/value not_include $svc, changes = [ set FW_CONFIGURATIONS_EXT/value[last()+1] $svc, ], load_path = $augeas::params::lense_path, require = Augeas::Lense['shellvars_list.aug'], } -- 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. -- 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] require? before? I need to have a dependency in place . . .
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 mode). If the custom fact returns it's default value (ie. the install app can't/hasn't run), I don't do anything with that app in the current puppet run. The particular class then just installs the ruby gem headless so the fact can use it on the next execution. Cheers Mike -- 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] Facter with a gem
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 ibmim_version = 0 if Gem.available?('headless') require 'headless' cut code end ibmim_version end end On 18 May 2011 02:52, Matt Robinson m...@puppetlabs.com wrote: require 'rubygems' require 'yourgemname' That should be enough. You're going to have to start giving more info you want more help. At the very least the gem name. Sometimes you think you're requiring the gem correctly based on the gem name, but the thing you need to require might not match the gem name exactly. For example, there's an rspec-core gem, but you don't do require 'rspec-core', you do require 'rspec/core'. This really shouldn't be a facter issue, it's a ruby issue. Try just putting the requires in an empty file and using ruby to run that. If it works there and doesn't in the facter code, paste your code into a gist so that people can see the whole thing. Matt On Fri, May 13, 2011 at 9:49 AM, Pietro Monteiro pie...@deckmonitoring.com wrote: On 05/13/2011 07:55 AM, Patrick wrote: Facter is run on the clients. Does installing that gem on the clients fix the error? Also, require 'rubygems' on the top of the file where you define your facter. -- Pietro Monteiro Senior Developer DECK Monitoring 115 W 8th Ave. Eugene, Oregon 97401 Office: 541-343-0110 www.deckmonitoring.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. -- 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] Re: Deleted zypper repo not re-created on subsequent puppetd runs
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 your node definition ... should node serverX inherits basenode { include repositories } be node serverX.somedomain.com inherits basenode { include repositories } I think there is something simple that we're missing, as zypprepo and yumrepo simply check for the existence of the file. They then set the values in it appropriately. Cheers On 19/04/11 6:34 PM, scarts wrote: I think this should fill in the blanks. Because this is a test environment I've stripped down the config to what I believe to be close to minimum. PUPPETMASTER: # puppet --version 2.6.5 /etc/puppet/puppet.conf:cut # The configuration file for master. # The default value is '$confdir/puppet.conf'. config = /etc/puppet/puppet.conf # The entry-point manifest for puppet master. # The default value is '$manifestdir/site.pp'. manifest = /etc/puppet/manifests/site.pp cut # The search path for modules as a colon-separated list of # directories. # The default value is '$confdir/modules:/usr/share/puppet/ modules'. modulepath = /etc/puppet/modules:/usr/share/puppet/modules # Where puppet master looks for its manifests. # The default value is '$confdir/manifests'. manifestdir = /etc/puppet/manifests cut /etc/puppet/manifests # cat modules.pp import 'testfile' import 'repositories' /etc/puppet/manifests # cat site.pp import nodes/* /etc/puppet/manifests/nodes # cat basenode.pp # Top level node that everything inherits from #import */* node basenode { Package { provider = $operatingsystem ? { SLES = zypper, } } } node serverX inherits basenode { include repositories } /etc/puppet/modules/repositories # ls -R .: lib manifests ./lib: puppet ./lib/puppet: type ./lib/puppet/type: zypprepo.rb ./manifests: init.pp /etc/puppet/modules/repositories # cat manifests/init.pp class repositories { case $operatingsystem { SLES: { zypprepo {LSE-SLES11: descr = LSE YaST repository, autorefresh = 1, type= yum, path= /, keeppackages= 0, gpgcheck= 0, baseurl = nfs://10.0.0.1/data/install/LSE/SLES11/, enabled = 1, } zypprepo {SUSE-Linux-Enterprise-Server-11: descr = SUSE-Linux-Enterprise-Server-11 11-0, autorefresh = 1, type= yast2, path= /, keeppackages= 0, baseurl = nfs://10.0.0.1/data/install/SLES11-x86_64- GM/, enabled = 1, } zypprepo {SUSE-Linux-Enterprise-Software-Development- Kit-11_11-0: descr = SUSE-Linux-Enterprise-Software-Development- Kit-11 11-0, autorefresh = 1, type= yast2, path= /, keeppackages= 0, baseurl = = nfs://10.0.0.1/data/install/SLE-11-SDK- DVD-x86_64-GM-Media1/, enabled = 1, } } } } PUPPET CLIENT: serverX:/ # puppetd --version 2.6.5 serverX:/ # ps -ef | grep pupp root 8855 26185 0 09:21 pts/400:00:00 grep pupp serverX:/ # find / -name zypprepo.rb /var/lib/puppet/lib/provider/package/zypprepo.rb serverX:/ # puppetd --server puppet.t-tsr-ops.stockex.com --test -- debug --tags zypprepo debug: Failed to load library 'rubygems' for feature 'rubygems' debug: Failed to load library 'selinux' for feature 'selinux' debug: Failed to load library 'shadow' for feature 'libshadow' debug: Failed to load library 'ldap' for feature 'ldap' debug: Puppet::Type::User::ProviderLdap: feature ldap is missing debug: Puppet::Type::User::ProviderUser_role_add: file roledel does not exist debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/ dscl does not exist debug: Puppet::Type::User::ProviderPw: file pw does not exist debug: Puppet::Type::File::ProviderMicrosoft_windows: feature microsoft_windows is missing debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/ puppet] debug: /File[/etc/puppet/puppet.conf]: Autorequiring File[/etc/puppet] 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/classes.txt]: Autorequiring File[/var/lib/ puppet] debug: /File[/var/lib/puppet/state/graphs]: Autorequiring File[/var/ lib/puppet/state] debug:
Re: [Puppet Users] Deleted zypper repo not re-created on subsequent puppetd runs
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 /etc/zypp/repos.d/SUSE-Linux-Enterprise-Server-11.repo If that's not it, could you pastie the relevant section from your manifest and also the --debug output and I'll have a look at it. Cheers Mike On 19/04/11 4:18 AM, scarts wrote: I'm testing zypprepo successfully to configure additional repositories to my SLES/SLED boxes, but as a final test I deleted a named repo manually from a computer that had previously been successfully configured by puppet, re-ran puppetd and it just seems to think the repo is still there. My agent log just says: info: /Whit[SUSE-Linux-Enterprise-Server-11]: Evaluated in 0.00 seconds Checking the client, I can confirm the file /etc/zypp/repos.d/SUSE- Linux-Enterprise-Server-11.repo doesn't exist. The only way I seem to be able to 'get it back' is to brute force the client 'rm -rf /var/lib/puppet/*' then start the client again (with a new cert) as if it's brand new. Once I do that, zypprepo does create this repository again. Is this something special about how zypprepo checks for existing configured repositories? I tested a simple testfile resource and it correctly is re-created between runs whenever I delete my testfile, so I don't think it's puppet specifically. I'm using zypprepo from mikeknox-puppet-zypprepo-0813875 Thanks for any assistence. -- 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: Deleted zypper repo not re-created on subsequent puppetd runs
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 manifest? Cheers On 19/04/11 7:09 AM, scarts wrote: Hi Michael, Thanks for the quick reply. Hopefully this is what you're looking for. Sorry for the obfuscation - it's important where I work. In summary, below you can see I have SUSE-Linux-Enterprise-Server-11 repository defined. I applied this through zypprepo successfully. Then I manually remove it and run the puppet client again, but it thinks it's still there and the .repo file is also confirmed gone? I'm stumped. serverX:/var/lib/puppet/lib/provider/package # zypper repos # | Alias | Name | Enabled | Refresh --+ ++- + 1 | XXX-SLES11 | XXX YaST repository| Yes | Yes 2 | SUSE-Linux-Enterprise-Server-11| SUSE- Linux-Enterprise-Server-11 11-0 | Yes | Yes 3 | SUSE-Linux-Enterprise-Software-Development-Kit-11_11-0 | SUSE- Linux-Enterprise-Software-Development-Kit-11 11-0 | Yes | Yes serverX:/var/lib/puppet/lib/provider/package # ll /etc/zypp/repos.d/ total 12 -rw-r--r-- 1 root root 156 Apr 18 19:07 XXX-SLES11.repo -rw-r--r-- 1 root root 191 Apr 18 19:07 SUSE-Linux-Enterprise- Server-11.repo -rw-r--r-- 1 root root 247 Apr 18 19:07 SUSE-Linux-Enterprise-Software- Development-Kit-11_11-0.repo serverX:/var/lib/puppet/lib/provider/package # zypper removerepo SUSE- Linux-Enterprise-Server-11 Removing repository 'SUSE-Linux-Enterprise-Server-11 11-0' [done] Repository 'SUSE-Linux-Enterprise-Server-11 11-0' has been removed. serverX:/var/lib/puppet/lib/provider/package # zypper repos # | Alias | Name | Enabled | Refresh --+ ++- + 1 | XXX-SLES11 | XXX YaST repository| Yes | Yes 2 | SUSE-Linux-Enterprise-Software-Development-Kit-11_11-0 | SUSE- Linux-Enterprise-Software-Development-Kit-11 11-0 | Yes | Yes serverX:/var/lib/puppet/lib/provider/package # puppetd --server puppet.somedomain.com --test --debug debug: Failed to load library 'rubygems' for feature 'rubygems' debug: Failed to load library 'selinux' for feature 'selinux' debug: Failed to load library 'shadow' for feature 'libshadow' debug: Failed to load library 'ldap' for feature 'ldap' debug: Puppet::Type::User::ProviderLdap: feature ldap is missing debug: Puppet::Type::User::ProviderUser_role_add: file roledel does not exist debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/ dscl does not exist debug: Puppet::Type::User::ProviderPw: file pw does not exist debug: Puppet::Type::File::ProviderMicrosoft_windows: feature microsoft_windows is missing debug: /File[/var/lib/puppet/ssl/certs/serverX.somedomain.com.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/state.yaml]: Autorequiring File[/ var/lib/puppet/state] 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/ssl/public_keys/ serverX.somedomain.com.pem]: Autorequiring File[/var/lib/puppet/ssl/ public_keys] debug: /File[/var/lib/puppet/ssl/crl.pem]: 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/clientbucket]: Autorequiring File[/var/ lib/puppet] debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring File[/var/ lib/puppet/ssl] debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet] debug: /File[/var/lib/puppet/client_yaml]: Autorequiring File[/var/lib/ puppet] debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/ puppet] debug: /File[/etc/puppet/puppet.conf]: Autorequiring File[/etc/puppet] debug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring File[/ var/lib/puppet/ssl/certs] debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/ puppet] debug: /File[/var/lib/puppet/classes.txt]: Autorequiring File[/var/lib/ puppet] debug: /File[/var/lib/puppet/state/graphs]: Autorequiring File[/var/ lib/puppet/state] debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring
Re: [Puppet Users] Passenger
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 not found You need gcc to compile the libraries for passenger. So add gcc and you'll get passed this problem. Cheers make: *** [passenger_native_support.o] Error 127 /usr/lib/ruby/gems/1.8/gems/passenger-3.0.5/lib/phusion_passenger/ native_support.rb:124:in `sh': Could not compile passenger_native_support.so ('make' failed) (RuntimeError) Obviously, it is looking for a compiler. I am completely lost on how to get this working. Any assistance would be greatly appreciated. I am running these which I downloaded from here : http://people.fedoraproject.org/~tmz/repo/puppet/epel/5Server/x86_64/ puppet-2.6.6-0.3.el5 (on master and hosts) puppet-server-2.6.6-0.3.el5 (on master only) Any assistance getting me on the right track would be greatly appreciated. -- 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] convert yum repos into manifest
Hi Ashley, Not a problem I've added a release to Puppet Forge ... http://forge.puppetlabs.com/mikeknox/zypprepo It's derived from the yumrepo type in Puppet core (0.25.5). It hasn't been updated it for 2.6.x yet, works fine, but I noticed some warnings about 'audit' when I tried ralsh 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 zypprepo zypprepo { 'repo-oss': type = 'yast2', descr = 'openSUSE-11.3-OSS', baseurl = 'http://download.opensuse.org/distribution/11.3/repo/oss', enabled = '1', autorefresh = '1', path = '/', keeppackages = '0' } On 9/02/11 9:13 AM, Tim Dunphy wrote: hello list!! I remember using a command a while ago that converts all my yum repos into a puppet manifest file. I have tried ralsh /etc/yum.repos.d/ yumrepos.pp but that isn't quite doing it.. can someone please remind me of the way to accomplish this task? [root@virtcent13:~] #ralsh /etc/yum.repos.d /etc/puppet/manifests/yumrepos.pp Could not run: Could not find type /etc/yum.repos.d thanks in advance!! -- 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] Set client environment on master
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 variable in the node definition if I want the client to use an environment other than production by default. My puppet client class then uses this variable value as the environment value in the clients puppet.conf (via a template) There's been a bit of discussion on this ... a quick search didn't show up a ticket though ... my foo's probably failing me today. -- 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] Problem restarting the agent
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: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed warning: Not using cache on failed catalog err: Could not retrieve catalog; skipping run I have the puppet master running on server.domain.com How can I fix it and get the agent to run? Thanks, Wesley Wesley, I ran into this one a couple of days ago. Problem that time was that the system in question was a couple of hours behind. Fixing it's clock resolved the issue for me. Cheers Mike -- 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] Problem restarting the agent
On 14/01/11 9:49 AM, Wesley Wu wrote: Thank you Mike. Both my Puppet master and the agent are NTP clients. So they are sync'ed. Is there a way to flush the agent's certificate and retrieve it from the master again? Thanks, Wesley To remove all your certs on the client ... rm -rf /var/lib/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 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 http://server.domain.com --waitforcert 60 --test err: Could not retrieve catalog from remote server: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed warning: Not using cache on failed catalog err: Could not retrieve catalog; skipping run I have the puppet master running on server.domain.com http://server.domain.com How can I fix it and get the agent to run? Thanks, Wesley Wesley, I ran into this one a couple of days ago. Problem that time was that the system in question was a couple of hours behind. Fixing it's clock resolved the issue for me. Cheers Mike -- 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%2bunsubscr...@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. -- 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] Supporting tar.gz as file source
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 request: https://projects.puppetlabs.com/issues/5786 Many of my manifests for applications need to cover the following process: 1. Download .tar.gz to host 2. Expand .tar.gz 3. Whatever install process is required I'm not totally against this, but I am curious why you haven't decided to build packages for these applications, as that should essentially contain all your desired functionality right? Generally I'd use packages (rpm, deb etc) as my first preference. With some applications (such as Codestriker etc), they generally aren't packaged, or easily available as packages, particularly for SLES/OpenSuSE. Yes, I could create packages for them, but I was avoiding that as it's something else I need to train the team up on, who are already on a steep learning curve with Puppet. My original thought with this was as a file source, and not for package management, even though that's were I'd be using it. As an example (assuming Feature Request#5783): file {“/srv/application”: source = “puppet|http:///path/application.tar.gz”, expand = true, recurse = true, ensure = directory, } This would create a directory, and populate it with the contents of .tar.gz 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. om/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] Supporting tar.gz as file source
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 for applications need to cover the following process: 1. Download .tar.gz to host 2. Expand .tar.gz 3. Whatever install process is required As an example (assuming Feature Request#5783): file {“/srv/application”: source = “puppet|http:///path/application.tar.gz”, expand = true, recurse = true, ensure = directory, } This would create a directory, and populate it with the contents of .tar.gz 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, Skype: michael.knox.au Phone: +61 (0) 3 9302 8940, Mobile: +61 (0) 410 124 816 -- 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] Supporting tar.gz as file source
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 for applications need to cover the following process: 1. Download .tar.gz to host 2. Expand .tar.gz 3. Whatever install process is required As an example (assuming Feature Request#5783): file {“/srv/application”: source = “puppet|http:///path/application.tar.gz”, expand = true, recurse = true, ensure = directory, } This would create a directory, and populate it with the contents of .tar.gz 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. I'm curious what you're thinking of. Would this be a File? (The directory contents are checked each time.) or would this be a Package (assume that the contents are right if the file on the server hasn't changed) I was thinking of FIle, I hadn't thought of it as a Package. My concern was ensuring that the contents on the disk match the source. Both the exec {expand_tar_file: onlyif = some test }, and package{some app: } have the same risk ... what's on the disk has changed, and won't be refreshed as our metadata say's that it's all good. I guess the onlyif for the exec could be a checksum ... currently I only do a basic check to see if it's been downloaded and expanded. -- 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] Facts in 2.6.4
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 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] exec a command if return value from exec'ing another command is non-zero
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 right way to specify the functionality I need. Specifically, lets say I have a command to create some key/value pair: myCommand -create key value And I have a second command to list key/value pairs: myCommand -list key I only want to run the -create if the -list returns a some non-zero value, indicating that no matching entries were found. I imagine I would want something like this: exec { myCommand-create: command = myCommand -create key value, path = [/bin] unless = myCommand -list key require = [ whatever the dependancies of myCommand are ] } -- 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] vcsrepo type
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 well, with the exception of ensure = latest/present with svn... when I ensure = present, it does what I expect, creates the working directory at whatever version the repo is currently at, and leaves it alone thereafter. However, when I use ensure = latest unless the working directory exists as a SVN repo, it fails. Shouldn't ensure = latest imply ensure = present ? I started down the road of writing something to ensure a created working directory, and thought I'd bounce it off the list to see if anyone else had any experience with vcsrepo, since it's entirely possible that I've missed something blindly obvious. vcsrepo { /path/on/disk: ensure = latest, provider = svn, source = 'https://server.example.com/repo/trunk/apps/foo', } Thanks! And thanks to whomever wrote this type, it's going to be super useful!! -- 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/OpenSUSE 11.3 and packages
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 providers, so I've copied it and hacked it to create a zypprepo type which generates zypp repo files instead. I'll share the type soon. That looks useful. Once again thank you for your help. Not a problem, the type is now available via Puppet Forge/GitHub http://forge.puppetlabs.com/mikeknox/zypprepo I hope you and others find it useful. Cheers -- 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/OpenSUSE 11.3 and packages
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 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 providers, so I've copied it and hacked it to create a zypprepo type which generates zypp repo files instead. I'll share the type soon. Cheers On 11/08/10 2:10 AM, jose wrote: I'm looking at using puppet with OpenSUSE 11.3. I've been using it happily with Centos 5 but am thinking of switching our lab clients to the former. I'm having a little trouble getting packages to install. Out of the box I get an error that RPMs must specify a package source. I found a puppet guide for SUSE which suggested installing yum and pointing it at the SUSE repositories. This I did but I got the error that it cannot retrieve repository metadata (repomd.xml) for repository. I did a little Googling and saw a post which suggested that OpenSUSE no longer provide yum compatible repositories. I went back to the puppet documentation and see that for SUSE the package providers are rug, yum and rpm. I can't find any reference to rug in OpenSUSE 11.3 (I'm guessing it's no longer used). I'm not too keen on installing individual rpms by name. Basically I was wondering what people are doing for package management with Puppet on OpenSUSE 11.3? Ta. -- 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] vcsrepo type, svn, ensure = latest
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. http://www.google.com/url?sa=Dq=http://github.com/mikeknox/puppet-vcsrepo/tree/bug/svn-updateusg=AFQjCNFJOsk03i5oFSnSK8C14qVhfa3Wqw Cheers Mike -- 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] vcsrepo type, svn, ensure = latest
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, Michael Knoxmichael.knox...@gmail.com wrote: 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 always refreshed, irrespective of whether the repository is upto date or not. I'd prefer not to reload the service everytime puppet runs on the client. My test manifest ... vcsrepo { /tmp/repo: ensure = latest, provider = svn, source = svn+ssh://m...@host/repo, } 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? I've tried looking at how it is done in the file and package types, but my ruby/puppet architecture knowledge is not yet upto that. 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-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] vcsrepo type, svn, ensure = latest
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 refreshonly = true to that exec. Tried adding that, but it didn't make any difference. The issue is when puppet is processing the vcsrepo type, and before it processes the exec type (in this test, in production it will be a service). From the log ... notice: //Vcsrepo[/tmp/repo]/ensure: ensure changed 'present' to 'latest' info: //Vcsrepo[/tmp/repo]: Scheduling refresh of Exec[/bin/date] Vcsrepo has scheduled a refresh of the Exec when it shouldn't have (IMO), i.e. the svn checkout was already upto date and therefore hadn't changed. Cheers Mike -- 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] vcsrepo type, svn, ensure = latest
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 always refreshed, irrespective of whether the repository is upto date or not. I'd prefer not to reload the service everytime puppet runs on the client. My test manifest ... vcsrepo { /tmp/repo: ensure = latest, provider = svn, source = svn+ssh://m...@host/repo, } 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? I've tried looking at how it is done in the file and package types, but my ruby/puppet architecture knowledge is not yet upto that. 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-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] vcsrepo type, svn, ensure = latest
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 Knoxmichael.knox...@gmail.com wrote: 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 always refreshed, irrespective of whether the repository is upto date or not. I'd prefer not to reload the service everytime puppet runs on the client. My test manifest ... vcsrepo { /tmp/repo: ensure = latest, provider = svn, source = svn+ssh://m...@host/repo, } 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? I've tried looking at how it is done in the file and package types, but my ruby/puppet architecture knowledge is not yet upto that. 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-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. [0;37mdebug: Failed to load library 'selinux' for feature 'selinux'[0m [0;37mdebug: Failed to load library 'ldap' for feature 'ldap'[0m [0;37mdebug: Failed to load library 'shadow' for feature 'libshadow'[0m [0;37mdebug: /File[/Users/mike/puppet/etc/ssl/private_keys/mike-mbp.local.pem]: Autorequiring File[/Users/mike/puppet/etc/ssl/private_keys][0m [0;37mdebug: /File[/Users/mike/puppet/etc/ssl/private_keys]: Autorequiring File[/Users/mike/puppet/etc/ssl][0m [0;37mdebug: /File[/Users/mike/puppet/var/state/classes.txt]: Autorequiring File[/Users/mike/puppet/var/state][0m [0;37mdebug: /File[/Users/mike/puppet/var/run]: Autorequiring File[/Users/mike/puppet/var][0m [0;37mdebug: /File[/Users/mike/puppet/var/state/state.yaml]: Autorequiring File[/Users/mike/puppet/var/state][0m [0;37mdebug: /File[/Users/mike/puppet/var/log]: Autorequiring File[/Users/mike/puppet/var][0m [0;37mdebug: /File[/Users/mike/puppet/etc/ssl/public_keys]: Autorequiring File[/Users/mike/puppet/etc/ssl][0m [0;37mdebug: /File[/Users/mike/puppet/var/state/graphs]: Autorequiring File[/Users/mike/puppet/var/state][0m [0;37mdebug: /File[/Users/mike/puppet/etc/ssl/private]: Autorequiring File[/Users/mike/puppet/etc/ssl][0m [0;37mdebug: /File[/Users/mike/puppet/var/state]: Autorequiring File[/Users/mike/puppet/var][0m [0;37mdebug: /File[/Users/mike/puppet/var/client_yaml]: Autorequiring File[/Users/mike/puppet/var][0m [0;37mdebug: /File[/Users/mike/puppet/etc/ssl/certificate_requests]: Autorequiring File[/Users/mike/puppet/etc/ssl][0m [0;37mdebug: /File[/Users/mike/puppet/var/facts]: Autorequiring File[/Users/mike/puppet/var][0m [0;37mdebug: /File[/Users/mike/puppet/etc/puppet.conf]: Autorequiring File[/Users/mike/puppet/etc][0m [0;37mdebug: /File[/Users/mike/puppet/etc/ssl/certs/mike-mbp.local.pem]: Autorequiring File[/Users/mike/puppet/etc/ssl/certs][0m [0;37mdebug: /File[/Users/mike/puppet/etc/ssl/crl.pem]: Autorequiring File[/Users/mike/puppet/etc/ssl][0m [0;37mdebug: /File[/Users/mike/puppet/etc/ssl/public_keys/mike-mbp.local.pem]: Autorequiring File[/Users/mike/puppet/etc/ssl/public_keys][0m [0;37mdebug: /File[/Users/mike/puppet/etc/ssl/certs]: Autorequiring File[/Users/mike/puppet/etc/ssl][0m [0;37mdebug: /File[/Users/mike/puppet/var/lib]: Autorequiring File[/Users/mike/puppet/var][0m [0;37mdebug: /File[/Users/mike/puppet/etc/ssl/certs/ca.pem]: Autorequiring File[/Users/mike/puppet/etc/ssl/certs][0m [0;37mdebug: /File[/Users/mike/puppet/var/clientbucket]: Autorequiring File[/Users/mike/puppet/var][0m [0;37mdebug: /File[/Users/mike/puppet/etc/ssl]: Autorequiring File[/Users/mike/puppet/etc][0m [0;37mdebug: Finishing transaction 2168956580 with 0 changes[0m [0;37mdebug: Using cached certificate for ca, good until Tue Jul 07 10:14:03 UTC 2015[0m [0;37mdebug: Using cached certificate for mike-mbp.local, good until Thu Jul 09 12:36:50 UTC 2015[0m [0;37mdebug: Loaded state in 0.00 seconds[0m [0;37mdebug: Using cached certificate for ca, good until Tue Jul 07 10:14:03 UTC 2015[0m [0;37mdebug: Using