Aw: Re: [Puppet Users] Problem with usage of arrays
Hi, I tried notice { $callapidata[1]: } = Same Error: Could not retrieve catalog from remote server: Error 400 on SERVER: can't convert String into Integer at /etc/puppet/myenv/modules/uc4client/manifests/init.pp:41 on node testnode I use version 2.6.1 -- 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/-/4ZKy4HH1KvwJ. 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] puppet resource for group
Nigel Kersten wrote: On Fri, May 13, 2011 at 11:41 PM, Nan Liu n...@puppetlabs.com wrote: On Fri, May 13, 2011 at 4:20 PM, Corey Osman co...@logicminds.biz wrote: Hi, Why doesn't puppet resource group tell me who belongs to the group? Given the group such as: mg_team:x:501:smruph, cosman, msmith, mhankey With the command: puppet resource group mg_team only returns: group { 'mg_team': gid = '501', ensure = 'present' } I was expecting: group { 'mg_team': gid = '501', ensure = 'present' members = ['smruph', 'cosman', 'msmith', 'mhankey'], } Am I missing a parameter or something? Manage member is limited to specific providers: http://docs.puppetlabs.com/references/latest/type.html#group-2 I feel we've produced inconsistencies here, and given I added the group membership support for OS X, it's largely my fault :) We've too closely modelled the tools for managing users/groups on various platforms, and I actually feel like we should break group membership out into a separate type, so it's easier to express semantics like: * ensure nigel is not a member of group admin, leave group alone otherwise * ensure nigel is a member of group admin, leave group alone otherwise without requiring that the user nigel or group admin are even managed by Puppet. That would be useful to us. -- 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.
Aw: Re: [Puppet Users] Problem with usage of arrays
http://projects.puppetlabs.com/issues/5127 Addressing array by index is not possible with Version 2.6.1 Unfortunately we can't update our puppet :-( Tahnk you all for your help. -- 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/-/bA52_IB2vXUJ. 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] Catalog compilation query
Hello All, Just had a query regarding catalog compiliation for nodes. When i compile the catalog on the puppetmaster with the command given below puppet master --compile hostname When the client connects to puppetmaster. Does the client take the compile catalog created above?. Or does the puppetmaster recompile the catalog for that host?. Also is there a way that the client connects to the puppetmaster and applies the pre-compiled catalog?. Regards, Kevin -- 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] Questions for puppet 2.6.8 client certificate management
How do I initiate a certificate request without going into non-daemon mode ? According to Pro Puppet book, so far the only way I know that can trigger a certficate request with puppet master is like this puppet agent --server=puppetmaster.test.com --no-daemonize --verbose but doing so will break my intention of automation I need to create a puppet client package. A control-C is needed to terminate the process. I have puppetmaster configured to be auto grant and sign certificate requests. and I like puppet client can auto issue a request which will be granted and start itself up when running /etc/init.d/puppetagent268 start Is there a command puppet cert --clean puppetagent1.test.com for puppet agent ? For now I have to go into $ssldir subdirectory to manually cleanup existing certificate. -- T.J. Yang -- 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] ssh_authorized_key and NIS user
Hi, I have this resource definition: ssh_authorized_key { nagios@login2: key = [REDACTED] user= nagios, type= ssh-dss, require = Service['nis'], } This nagios user comes from NIS, yp.conf and nsswitch.conf are handled by puppet and configured before the key. I still get an User does not exist. daemon.log: ... Jun 17 14:00:57 node016 puppet-agent[1109]: (/Stage[main]/All/File[/localhome/nagios/]/ensure) created Jun 17 14:12:53 node016 puppet-agent[1109]: (/Stage[main]//Ssh_authorized_key[root@node002]/ensure) created Jun 17 14:15:14 node016 puppet-agent[1109]: (/Stage[main]//File[/etc/idmapd.conf]/content) content changed '{md5}3e94f238294cc61b047e7ae50115dffc' to '{md5}6d9c69f38eca81ab0f879c2771d5d543' Jun 17 14:15:14 node016 puppet-agent[1109]: (/Stage[main]//Service[idmapd]/ensure) ensure changed 'stopped' to 'running' Jun 17 14:15:14 node016 puppet-agent[1109]: (/Stage[main]//Service[idmapd]) Triggered 'refresh' from 1 events Jun 17 14:15:41 node016 puppet-agent[1109]: (/Stage[main]/All/File[/etc/yp.conf]/ensure) defined content as '{md5}9c23d37f431c0788c212d3c0ab8a48af' Jun 17 14:15:58 node016 puppet-agent[1109]: (/Stage[main]/All/All::Append_if_no_such_line[sudoers_nagios_smartctl]/Exec[/bin/echo 'nagios ALL=(root) NOPASSWD: /usr/sbin/smartctl' '/etc/sudoers']/returns) executed su ccessfully Jun 17 14:17:03 node016 puppet-agent[1109]: (/Stage[main]//Package[nis]/ensure) ensure changed 'purged' to 'latest' Jun 17 14:17:39 node016 puppet-agent[1109]: (/Stage[main]/All/File[/etc/nsswitch.conf]/content) content changed '{md5}295c15c4bdac80e50b37689ef08f359c' to '{md5}250a1851aec43bcc5f73e8a01b2141bd' Jun 17 14:17:43 node016 puppet-agent[1109]: (/Stage[main]/All/Service[nis]) Triggered 'refresh' from 4 events Jun 17 14:17:50 node016 puppet-agent[1109]: (/Stage[main]//Ssh_authorized_key[nagios@login2]/ensure) created Jun 17 14:17:50 node016 puppet-agent[1109]: (/Stage[main]//Ssh_authorized_key[nagios@login2]) Could not evaluate: User 'nagios' does not exist Jun 17 14:18:06 node016 puppet-agent[1109]: (/Whit[last]) Dependency Ssh_authorized_key[nagios@login2] has failures: true ... This is Ubuntu 10.04 with puppet 2.6.8 regards, Andreas -- 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] Puppet recipe to copy and execute a shell file
Hi Peter, thanks for your reply. I managed to copy the shell file puppet client using the file resource recipe you specified but exec is throwing an error, which is as follows: info: No classes to store info: Caching catalog at /var/lib/puppet/state/localconfig.yaml notice: Starting catalog run err: //File[/tmp/QoS/QoS.sh]/ensure: change from absent to file failed: Could not set file on ensure: No such file or directory - /tmp/QoS/QoS.sh.puppettmp at /etc/puppet/manifests/site.pp:7 notice: //Exec[/tmp/QoS/QoS.sh]: Dependency file[/tmp/QoS/QoS.sh] has 1 failures warning: //Exec[/tmp/QoS/QoS.sh]: Skipping because of failed dependencies notice: Finished catalog run in 0.38 seconds When I tried running the shell script manually using the following command '/tmp/QoS/QoS.sh; echo $?' , it worked fine printing 0 at the end. Any help what is wrong with exec resource recipe? Thanks in advance for your time. Regards, A. On Thu, Jun 16, 2011 at 8:42 PM, Peter Bukowinski pmb...@gmail.com wrote: It sounds like you haven't set up the puppet fileserver yet. Choose a directory that will hold files you want to copy to clients. I use /opt/files, so that's what is in my example. Create fileserver.conf in the same directory as puppet.conf and add these lines: [files] path /opt/files allow *.client.domain Put your shell file in the path you specified. Now you just need to set up a file and exec resource. Note the source item in the file resource and the require item in exec. file { '/etc/shell_file': ensure = present, owner = 'root', group = 'root', mode = '0755', source = 'puppet://puppet/files/shell_file', } exec { '/etc/shell_file': require = File['/etc/shell_file'] } -- Peter M. Bukowinski Systems Engineer Janelia Farm Research Campus, HHMI On Thursday, June 16, 2011 at 3:17 PM, annierana wrote: Hi all, I am new to puppet. I need a sample recipe to write/copy a shell file on puppet client. The shell file exists on puppet server. Once the file is written, I also want to execute it. I have tried using file resource with ensure command to copy at /etc but permission was denied and moreover with a different directory path (\tmp) it just created an empty file. Can anyone please help? Regards, A. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com(mailto: puppet-users@googlegroups.com). To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com (mailto: puppet-users+unsubscr...@googlegroups.com). For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- 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] Puppet recipe to copy and execute a shell file
I apologize for posting wrong log messages, here is the correct log: notice: Starting catalog run notice: //File[/tmp/QoS/QoS.sh]/ensure: created err: //Exec[/tmp/QoS/QoS.sh]/returns: change from notrun to 0 failed: /tmp/QoS/QoS.sh returned 1 instead of 0 at /etc/puppet/manifests/site.pp:10 notice: Finished catalog run in 0.46 seconds Any help please? On Fri, Jun 17, 2011 at 2:09 PM, Annie Rana annier...@gmail.com wrote: Hi Peter, thanks for your reply. I managed to copy the shell file puppet client using the file resource recipe you specified but exec is throwing an error, which is as follows: info: No classes to store info: Caching catalog at /var/lib/puppet/state/localconfig.yaml notice: Starting catalog run err: //File[/tmp/QoS/QoS.sh]/ensure: change from absent to file failed: Could not set file on ensure: No such file or directory - /tmp/QoS/QoS.sh.puppettmp at /etc/puppet/manifests/site.pp:7 notice: //Exec[/tmp/QoS/QoS.sh]: Dependency file[/tmp/QoS/QoS.sh] has 1 failures warning: //Exec[/tmp/QoS/QoS.sh]: Skipping because of failed dependencies notice: Finished catalog run in 0.38 seconds When I tried running the shell script manually using the following command '/tmp/QoS/QoS.sh; echo $?' , it worked fine printing 0 at the end. Any help what is wrong with exec resource recipe? Thanks in advance for your time. Regards, A. On Thu, Jun 16, 2011 at 8:42 PM, Peter Bukowinski pmb...@gmail.comwrote: It sounds like you haven't set up the puppet fileserver yet. Choose a directory that will hold files you want to copy to clients. I use /opt/files, so that's what is in my example. Create fileserver.conf in the same directory as puppet.conf and add these lines: [files] path /opt/files allow *.client.domain Put your shell file in the path you specified. Now you just need to set up a file and exec resource. Note the source item in the file resource and the require item in exec. file { '/etc/shell_file': ensure = present, owner = 'root', group = 'root', mode = '0755', source = 'puppet://puppet/files/shell_file', } exec { '/etc/shell_file': require = File['/etc/shell_file'] } -- Peter M. Bukowinski Systems Engineer Janelia Farm Research Campus, HHMI On Thursday, June 16, 2011 at 3:17 PM, annierana wrote: Hi all, I am new to puppet. I need a sample recipe to write/copy a shell file on puppet client. The shell file exists on puppet server. Once the file is written, I also want to execute it. I have tried using file resource with ensure command to copy at /etc but permission was denied and moreover with a different directory path (\tmp) it just created an empty file. Can anyone please help? Regards, A. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com(mailto: puppet-users@googlegroups.com). To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com (mailto: puppet-users+unsubscr...@googlegroups.com). For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- 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: Puppet recipe to copy and execute a shell file
Annie, http://docs.puppetlabs.com/references/stable/type.html#exec By default the expected return code is probably zero, your script is returning 1. Whether this is correct or not I don't know, but you can tell puppet to expect a different return code: exec { '/etc/shell_file': require = File['/etc/shell_file'], returns = 1, } On Jun 17, 2:36 pm, Annie Rana annier...@gmail.com wrote: I apologize for posting wrong log messages, here is the correct log: notice: Starting catalog run notice: //File[/tmp/QoS/QoS.sh]/ensure: created err: //Exec[/tmp/QoS/QoS.sh]/returns: change from notrun to 0 failed: /tmp/QoS/QoS.sh returned 1 instead of 0 at /etc/puppet/manifests/site.pp:10 notice: Finished catalog run in 0.46 seconds Any help please? On Fri, Jun 17, 2011 at 2:09 PM, Annie Rana annier...@gmail.com wrote: Hi Peter, thanks for your reply. I managed to copy the shell file puppet client using the file resource recipe you specified but exec is throwing an error, which is as follows: info: No classes to store info: Caching catalog at /var/lib/puppet/state/localconfig.yaml notice: Starting catalog run err: //File[/tmp/QoS/QoS.sh]/ensure: change from absent to file failed: Could not set file on ensure: No such file or directory - /tmp/QoS/QoS.sh.puppettmp at /etc/puppet/manifests/site.pp:7 notice: //Exec[/tmp/QoS/QoS.sh]: Dependency file[/tmp/QoS/QoS.sh] has 1 failures warning: //Exec[/tmp/QoS/QoS.sh]: Skipping because of failed dependencies notice: Finished catalog run in 0.38 seconds When I tried running the shell script manually using the following command '/tmp/QoS/QoS.sh; echo $?' , it worked fine printing 0 at the end. Any help what is wrong with exec resource recipe? Thanks in advance for your time. Regards, A. On Thu, Jun 16, 2011 at 8:42 PM, Peter Bukowinski pmb...@gmail.comwrote: It sounds like you haven't set up the puppet fileserver yet. Choose a directory that will hold files you want to copy to clients. I use /opt/files, so that's what is in my example. Create fileserver.conf in the same directory as puppet.conf and add these lines: [files] path /opt/files allow *.client.domain Put your shell file in the path you specified. Now you just need to set up a file and exec resource. Note the source item in the file resource and the require item in exec. file { '/etc/shell_file': ensure = present, owner = 'root', group = 'root', mode = '0755', source = 'puppet://puppet/files/shell_file', } exec { '/etc/shell_file': require = File['/etc/shell_file'] } -- Peter M. Bukowinski Systems Engineer Janelia Farm Research Campus, HHMI On Thursday, June 16, 2011 at 3:17 PM, annierana wrote: Hi all, I am new to puppet. I need a sample recipe to write/copy a shell file on puppet client. The shell file exists on puppet server. Once the file is written, I also want to execute it. I have tried using file resource with ensure command to copy at /etc but permission was denied and moreover with a different directory path (\tmp) it just created an empty file. Can anyone please help? Regards, A. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com(mailto: puppet-users@googlegroups.com). To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com (mailto: puppet-users+unsubscr...@googlegroups.com). For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- 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] Questions for puppet 2.6.8 client certificate management
I could be wrong, as I'm still on 0.25 myself, but I think you want the --waitforcert seconds option. -- Nathan Clemons http://www.livemocha.com The worlds largest online language learning community On Fri, Jun 17, 2011 at 5:49 AM, TJ Yang tjyang2...@gmail.com wrote: How do I initiate a certificate request without going into non-daemon mode ? According to Pro Puppet book, so far the only way I know that can trigger a certficate request with puppet master is like this puppet agent --server=puppetmaster.test.com --no-daemonize --verbose but doing so will break my intention of automation I need to create a puppet client package. A control-C is needed to terminate the process. I have puppetmaster configured to be auto grant and sign certificate requests. and I like puppet client can auto issue a request which will be granted and start itself up when running /etc/init.d/puppetagent268 start Is there a command puppet cert --clean puppetagent1.test.com for puppet agent ? For now I have to go into $ssldir subdirectory to manually cleanup existing certificate. -- T.J. Yang -- 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] Questions for puppet 2.6.8 client certificate management
Hi, On Jun 17, 2011, at 2:49 PM, TJ Yang wrote: How do I initiate a certificate request without going into non-daemon mode ? According to Pro Puppet book, so far the only way I know that can trigger a certficate request with puppet master is like this puppet agent --server=puppetmaster.test.com --no-daemonize --verbose we do that by using a tag which does not exist: puppet agent --test --tags=foo This creates the client certificate and sends it to the master. The master autosigns the certificate request and compiles the catalog. The client will parse for a tag with the name foo and will not do anything. but doing so will break my intention of automation I need to create a puppet client package. A control-C is needed to terminate the process. I have puppetmaster configured to be auto grant and sign certificate requests. and I like puppet client can auto issue a request which will be granted and start itself up when running /etc/init.d/puppetagent268 start We have created our own puppet rpm package with an individual puppet.conf. Upon post installation we run the command give above. Is there a command puppet cert --clean puppetagent1.test.com for puppet agent ? For now I have to go into $ssldir subdirectory to manually cleanup existing certificate. Do you refer to the master or the client? The puppet cert command is used for the master only. On the client we also recursivley delete the puppet ssl dir. Kind regards, Martin -- T.J. Yang -- 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] Catalog compilation query
On Jun 17, 2011, at 5:16 AM, linuxbsdfreak wrote: Hello All, Just had a query regarding catalog compiliation for nodes. When i compile the catalog on the puppetmaster with the command given below puppet master --compile hostname When the client connects to puppetmaster. Does the client take the compile catalog created above? No Or does the puppetmaster recompile the catalog for that host?. Yes Also is there a way that the client connects to the puppetmaster and applies the pre-compiled catalog?. Only if you do something special like pull the catalog using wget and then apply it from the client. -- 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] Questions for puppet 2.6.8 client certificate management
puppet agent --test (-t) Zipkid On 17 Jun 2011, at 14:49, TJ Yang wrote: How do I initiate a certificate request without going into non-daemon mode ? According to Pro Puppet book, so far the only way I know that can trigger a certficate request with puppet master is like this puppet agent --server=puppetmaster.test.com --no-daemonize --verbose but doing so will break my intention of automation I need to create a puppet client package. A control-C is needed to terminate the process. I have puppetmaster configured to be auto grant and sign certificate requests. and I like puppet client can auto issue a request which will be granted and start itself up when running /etc/init.d/puppetagent268 start Is there a command puppet cert --clean puppetagent1.test.com for puppet agent ? For now I have to go into $ssldir subdirectory to manually cleanup existing certificate. -- T.J. Yang -- 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] Problem in wordpress moodule.
Hi! I'm doing a module for the puppet for WordPress will implement. I'm having problems with this line: exec { tar -vzxf ${downdir}wordpress.tar.gz: path = [/usr/local/bin,/opt/local/bin,/usr/bin,/usr/sbin], } And the error generated is this: err: /Stage[main]//Node[lucas.com.br]/Wordpress::Install[ ]/Exec[tar -vzxf /var/www/wordpress.tar.gz]/returns: change from notrun to 0 failed: tar -vzxf /var/www/wordpress.tar.gz returned 1 instead of one of [0] at /etc/puppet/modules/wordpress/manifests/install.pp:40 Can anyone help me? -- Lucas Pereira Brígida www.codebroken.wordpress.com -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Problem in wordpress module
Hi! I'm doing a module for the puppet for WordPress will implement. I'm having problems with this line: exec { tar -vzxf ${downdir}wordpress.tar.gz: path = [/usr/local/bin,/opt/local/bin,/usr/ bin,/usr/sbin], } And the error generated is this: err: /Stage[main]//Node[lucas.com.br]/Wordpress::Install[ ]/Exec[tar - vzxf /var/www/wordpress.tar.gz]/returns: change from notrun to 0 failed: tar -vzxf /var/www/wordpress.tar.gz returned 1 instead of one of [0] at /etc/puppet/modules/wordpress/manifests/install.pp:40 Can anyone help me? -- Lucas Pereira Brígida www.codebroken.wordpress.com -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Questions for puppet 2.6.8 client certificate management
Martin Thanks for the quick reply On Fri, Jun 17, 2011 at 8:47 AM, Martin Alfke tux...@gmail.com wrote: Hi, On Jun 17, 2011, at 2:49 PM, TJ Yang wrote: How do I initiate a certificate request without going into non-daemon mode ? According to Pro Puppet book, so far the only way I know that can trigger a certficate request with puppet master is like this puppet agent --server=puppetmaster.test.com --no-daemonize --verbose we do that by using a tag which does not exist: puppet agent --test --tags=foo This creates the client certificate and sends it to the master. The master autosigns the certificate request and compiles the catalog. The client will parse for a tag with the name foo and will not do anything. Thanks for the great tip, I will use this in my postinstall script. I hope tip/hack can be turned into puppet agent --cert_request for future version of puppt. but doing so will break my intention of automation I need to create a puppet client package. A control-C is needed to terminate the process. I have puppetmaster configured to be auto grant and sign certificate requests. and I like puppet client can auto issue a request which will be granted and start itself up when running /etc/init.d/puppetagent268 start We have created our own puppet rpm package with an individual puppet.conf. Upon post installation we run the command give above. Is there a command puppet cert --clean puppetagent1.test.com for puppet agent ? For now I have to go into $ssldir subdirectory to manually cleanup existing certificate. Do you refer to the master or the client? The puppet cert command is used for the master only. On the client we also recursivley delete the puppet ssl dir. I am referring to puppet agent/client. I hope future version can support this certificate reset/cleanup on puppet agent. for now, I will just do rm -rf $ssldir in /etc/init.d/puppetclient268 certclean tj Kind regards, Martin -- T.J. Yang -- 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. -- T.J. Yang -- 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: Puppet recipe to copy and execute a shell file
Thanks but it couldn't work though i got the message that shell script is successfully executed. On Fri, Jun 17, 2011 at 2:44 PM, Luke Bigum luke.bi...@lmax.com wrote: Annie, http://docs.puppetlabs.com/references/stable/type.html#exec By default the expected return code is probably zero, your script is returning 1. Whether this is correct or not I don't know, but you can tell puppet to expect a different return code: exec { '/etc/shell_file': require = File['/etc/shell_file'], returns = 1, } On Jun 17, 2:36 pm, Annie Rana annier...@gmail.com wrote: I apologize for posting wrong log messages, here is the correct log: notice: Starting catalog run notice: //File[/tmp/QoS/QoS.sh]/ensure: created err: //Exec[/tmp/QoS/QoS.sh]/returns: change from notrun to 0 failed: /tmp/QoS/QoS.sh returned 1 instead of 0 at /etc/puppet/manifests/site.pp:10 notice: Finished catalog run in 0.46 seconds Any help please? On Fri, Jun 17, 2011 at 2:09 PM, Annie Rana annier...@gmail.com wrote: Hi Peter, thanks for your reply. I managed to copy the shell file puppet client using the file resource recipe you specified but exec is throwing an error, which is as follows: info: No classes to store info: Caching catalog at /var/lib/puppet/state/localconfig.yaml notice: Starting catalog run err: //File[/tmp/QoS/QoS.sh]/ensure: change from absent to file failed: Could not set file on ensure: No such file or directory - /tmp/QoS/QoS.sh.puppettmp at /etc/puppet/manifests/site.pp:7 notice: //Exec[/tmp/QoS/QoS.sh]: Dependency file[/tmp/QoS/QoS.sh] has 1 failures warning: //Exec[/tmp/QoS/QoS.sh]: Skipping because of failed dependencies notice: Finished catalog run in 0.38 seconds When I tried running the shell script manually using the following command '/tmp/QoS/QoS.sh; echo $?' , it worked fine printing 0 at the end. Any help what is wrong with exec resource recipe? Thanks in advance for your time. Regards, A. On Thu, Jun 16, 2011 at 8:42 PM, Peter Bukowinski pmb...@gmail.com wrote: It sounds like you haven't set up the puppet fileserver yet. Choose a directory that will hold files you want to copy to clients. I use /opt/files, so that's what is in my example. Create fileserver.conf in the same directory as puppet.conf and add these lines: [files] path /opt/files allow *.client.domain Put your shell file in the path you specified. Now you just need to set up a file and exec resource. Note the source item in the file resource and the require item in exec. file { '/etc/shell_file': ensure = present, owner = 'root', group = 'root', mode = '0755', source = 'puppet://puppet/files/shell_file', } exec { '/etc/shell_file': require = File['/etc/shell_file'] } -- Peter M. Bukowinski Systems Engineer Janelia Farm Research Campus, HHMI On Thursday, June 16, 2011 at 3:17 PM, annierana wrote: Hi all, I am new to puppet. I need a sample recipe to write/copy a shell file on puppet client. The shell file exists on puppet server. Once the file is written, I also want to execute it. I have tried using file resource with ensure command to copy at /etc but permission was denied and moreover with a different directory path (\tmp) it just created an empty file. Can anyone please help? Regards, A. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com (mailto: puppet-users@googlegroups.com). To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com (mailto: puppet-users+unsubscr...@googlegroups.com). For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- 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] Re: Puppet recipe to copy and execute a shell file
How do you know it didn't work? What's your shell script expected to do? If you run it by hand in a root shell, does it work then? If so, there might be an environment problem when running from Puppet, like $PATH or something. Try set the parameter logoutput = true in the exec resource. On Jun 17, 3:18 pm, Annie Rana annier...@gmail.com wrote: Thanks but it couldn't work though i got the message that shell script is successfully executed. On Fri, Jun 17, 2011 at 2:44 PM, Luke Bigum luke.bi...@lmax.com wrote: Annie, http://docs.puppetlabs.com/references/stable/type.html#exec By default the expected return code is probably zero, your script is returning 1. Whether this is correct or not I don't know, but you can tell puppet to expect a different return code: exec { '/etc/shell_file': require = File['/etc/shell_file'], returns = 1, } On Jun 17, 2:36 pm, Annie Rana annier...@gmail.com wrote: I apologize for posting wrong log messages, here is the correct log: notice: Starting catalog run notice: //File[/tmp/QoS/QoS.sh]/ensure: created err: //Exec[/tmp/QoS/QoS.sh]/returns: change from notrun to 0 failed: /tmp/QoS/QoS.sh returned 1 instead of 0 at /etc/puppet/manifests/site.pp:10 notice: Finished catalog run in 0.46 seconds Any help please? On Fri, Jun 17, 2011 at 2:09 PM, Annie Rana annier...@gmail.com wrote: Hi Peter, thanks for your reply. I managed to copy the shell file puppet client using the file resource recipe you specified but exec is throwing an error, which is as follows: info: No classes to store info: Caching catalog at /var/lib/puppet/state/localconfig.yaml notice: Starting catalog run err: //File[/tmp/QoS/QoS.sh]/ensure: change from absent to file failed: Could not set file on ensure: No such file or directory - /tmp/QoS/QoS.sh.puppettmp at /etc/puppet/manifests/site.pp:7 notice: //Exec[/tmp/QoS/QoS.sh]: Dependency file[/tmp/QoS/QoS.sh] has 1 failures warning: //Exec[/tmp/QoS/QoS.sh]: Skipping because of failed dependencies notice: Finished catalog run in 0.38 seconds When I tried running the shell script manually using the following command '/tmp/QoS/QoS.sh; echo $?' , it worked fine printing 0 at the end. Any help what is wrong with exec resource recipe? Thanks in advance for your time. Regards, A. On Thu, Jun 16, 2011 at 8:42 PM, Peter Bukowinski pmb...@gmail.com wrote: It sounds like you haven't set up the puppet fileserver yet. Choose a directory that will hold files you want to copy to clients. I use /opt/files, so that's what is in my example. Create fileserver.conf in the same directory as puppet.conf and add these lines: [files] path /opt/files allow *.client.domain Put your shell file in the path you specified. Now you just need to set up a file and exec resource. Note the source item in the file resource and the require item in exec. file { '/etc/shell_file': ensure = present, owner = 'root', group = 'root', mode = '0755', source = 'puppet://puppet/files/shell_file', } exec { '/etc/shell_file': require = File['/etc/shell_file'] } -- Peter M. Bukowinski Systems Engineer Janelia Farm Research Campus, HHMI On Thursday, June 16, 2011 at 3:17 PM, annierana wrote: Hi all, I am new to puppet. I need a sample recipe to write/copy a shell file on puppet client. The shell file exists on puppet server. Once the file is written, I also want to execute it. I have tried using file resource with ensure command to copy at /etc but permission was denied and moreover with a different directory path (\tmp) it just created an empty file. Can anyone please help? Regards, A. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com (mailto: puppet-users@googlegroups.com). To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com (mailto: puppet-users+unsubscr...@googlegroups.com). For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- 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
[Puppet Users] Re: Problem in wordpress module
Your tar command failed. Does tar -vzxf /var/www/wordpress.tar.gz work from a root shell? logoutput = true in the exec resource might give you more information to help debug. On Jun 17, 2:50 pm, lucas.brigida grillobri...@gmail.com wrote: Hi! I'm doing a module for the puppet for WordPress will implement. I'm having problems with this line: exec { tar -vzxf ${downdir}wordpress.tar.gz: path = [/usr/local/bin,/opt/local/bin,/usr/ bin,/usr/sbin], } And the error generated is this: err: /Stage[main]//Node[lucas.com.br]/Wordpress::Install[ ]/Exec[tar - vzxf /var/www/wordpress.tar.gz]/returns: change from notrun to 0 failed: tar -vzxf /var/www/wordpress.tar.gz returned 1 instead of one of [0] at /etc/puppet/modules/wordpress/manifests/install.pp:40 Can anyone help me? -- Lucas Pereira Brígidawww.codebroken.wordpress.com -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Questions for puppet 2.6.8 client certificate management
I need to add --server like following, otherwise it will won't finish the run. (I don't have/want puppet entry in my /etc/hosts) puppet agent --server=puppetmaster.test.com --test --tags option is not need in my case. tj On Fri, Jun 17, 2011 at 7:52 AM, Stefan Goethals zipkid@gmail.com wrote: puppet agent --test (-t) Zipkid On 17 Jun 2011, at 14:49, TJ Yang wrote: How do I initiate a certificate request without going into non-daemon mode ? According to Pro Puppet book, so far the only way I know that can trigger a certficate request with puppet master is like this puppet agent --server=puppetmaster.test.com --no-daemonize --verbose but doing so will break my intention of automation I need to create a puppet client package. A control-C is needed to terminate the process. I have puppetmaster configured to be auto grant and sign certificate requests. and I like puppet client can auto issue a request which will be granted and start itself up when running /etc/init.d/puppetagent268 start Is there a command puppet cert --clean puppetagent1.test.com for puppet agent ? For now I have to go into $ssldir subdirectory to manually cleanup existing certificate. -- T.J. Yang -- 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. -- T.J. Yang -- 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: Puppet recipe to copy and execute a shell file
Hi Luke, What's your shell script expected to do? The shell script would generate Iptables rules How do you know it didn't work? I can check using ipatbles -L or iptables -t mangle -L commands If you run it by hand in a root shell, does it work then? Yes If so, there might be an environment problem when running from Puppet, like $PATH or something. Try set the parameter logoutput = true in the exec resource. I did but no affect. Thanks again, much appreciated your help and time. On Fri, Jun 17, 2011 at 3:26 PM, Luke Bigum luke.bi...@lmax.com wrote: How do you know it didn't work? What's your shell script expected to do? If you run it by hand in a root shell, does it work then? If so, there might be an environment problem when running from Puppet, like $PATH or something. Try set the parameter logoutput = true in the exec resource. On Jun 17, 3:18 pm, Annie Rana annier...@gmail.com wrote: Thanks but it couldn't work though i got the message that shell script is successfully executed. On Fri, Jun 17, 2011 at 2:44 PM, Luke Bigum luke.bi...@lmax.com wrote: Annie, http://docs.puppetlabs.com/references/stable/type.html#exec By default the expected return code is probably zero, your script is returning 1. Whether this is correct or not I don't know, but you can tell puppet to expect a different return code: exec { '/etc/shell_file': require = File['/etc/shell_file'], returns = 1, } On Jun 17, 2:36 pm, Annie Rana annier...@gmail.com wrote: I apologize for posting wrong log messages, here is the correct log: notice: Starting catalog run notice: //File[/tmp/QoS/QoS.sh]/ensure: created err: //Exec[/tmp/QoS/QoS.sh]/returns: change from notrun to 0 failed: /tmp/QoS/QoS.sh returned 1 instead of 0 at /etc/puppet/manifests/site.pp:10 notice: Finished catalog run in 0.46 seconds Any help please? On Fri, Jun 17, 2011 at 2:09 PM, Annie Rana annier...@gmail.com wrote: Hi Peter, thanks for your reply. I managed to copy the shell file puppet client using the file resource recipe you specified but exec is throwing an error, which is as follows: info: No classes to store info: Caching catalog at /var/lib/puppet/state/localconfig.yaml notice: Starting catalog run err: //File[/tmp/QoS/QoS.sh]/ensure: change from absent to file failed: Could not set file on ensure: No such file or directory - /tmp/QoS/QoS.sh.puppettmp at /etc/puppet/manifests/site.pp:7 notice: //Exec[/tmp/QoS/QoS.sh]: Dependency file[/tmp/QoS/QoS.sh] has 1 failures warning: //Exec[/tmp/QoS/QoS.sh]: Skipping because of failed dependencies notice: Finished catalog run in 0.38 seconds When I tried running the shell script manually using the following command '/tmp/QoS/QoS.sh; echo $?' , it worked fine printing 0 at the end. Any help what is wrong with exec resource recipe? Thanks in advance for your time. Regards, A. On Thu, Jun 16, 2011 at 8:42 PM, Peter Bukowinski pmb...@gmail.com wrote: It sounds like you haven't set up the puppet fileserver yet. Choose a directory that will hold files you want to copy to clients. I use /opt/files, so that's what is in my example. Create fileserver.conf in the same directory as puppet.conf and add these lines: [files] path /opt/files allow *.client.domain Put your shell file in the path you specified. Now you just need to set up a file and exec resource. Note the source item in the file resource and the require item in exec. file { '/etc/shell_file': ensure = present, owner = 'root', group = 'root', mode = '0755', source = 'puppet://puppet/files/shell_file', } exec { '/etc/shell_file': require = File['/etc/shell_file'] } -- Peter M. Bukowinski Systems Engineer Janelia Farm Research Campus, HHMI On Thursday, June 16, 2011 at 3:17 PM, annierana wrote: Hi all, I am new to puppet. I need a sample recipe to write/copy a shell file on puppet client. The shell file exists on puppet server. Once the file is written, I also want to execute it. I have tried using file resource with ensure command to copy at /etc but permission was denied and moreover with a different directory path (\tmp) it just created an empty file. Can anyone please help? Regards, A. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com (mailto: puppet-users@googlegroups.com). To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com (mailto: puppet-users+unsubscr...@googlegroups.com). For more options, visit this group at
Re: [Puppet Users] Re: Puppet recipe to copy and execute a shell file
Here is site.pp == file {/tmp/QoS/QoS.sh: ensure =present, owner='root', group='root', mode='777', source='puppet://puppet/files/QoS.sh', } exec {/tmp/QoS/QoS.sh: require=File['/tmp/QoS/QoS.sh'], } Here is the QoS.sh Script: #!/bin/bash #create alias for interfaces to avoid confusion export LAN=eth1 export WAN=eth0 #--QoS Settings--# #Rules for engress queue #--start-- #create priority queue tc qdisc add dev ${WAN} root handle 1: htb default 13 tc class add dev ${WAN} parent 1: classid 1:1 htb rate 50kbps ceil 50kbps # voip class tc class add dev ${WAN} parent 1:1 classid 1:10 htb rate 30kbps ceil 50kbps prio 1 #stream class tc class add dev ${WAN} parent 1:1 classid 1:11 htb rate 30kbps ceil 30kbps prio 2 #http, https, ssh, telnet class tc class add dev ${WAN} parent 1:1 classid 1:12 htb rate 20kbps ceil 30kbps prio 3 #ftp class tc class add dev ${WAN} parent 1:1 classid 1:13 htb rate 20kbps ceil 20kbps prio 4 #attach sfq on every class tc qdisc add dev ${WAN} parent 1:10 handle 20: sfq perturb 10 tc qdisc add dev ${WAN} parent 1:11 handle 30: sfq perturb 10 tc qdisc add dev ${WAN} parent 1:12 handle 40: sfq perturb 10 tc qdisc add dev ${WAN} parent 1:13 handle 60: sfq perturb 10 #define class filters tc filter add dev ${WAN} parent 1:0 prio 1 protocol ip u32 match ip tos 0x28 0xff classid 1:10 tc filter add dev ${WAN} parent 1:0 prio 2 protocol ip u32 match ip tos 0x48 0xff classid 1:11 tc filter add dev ${WAN} parent 1:0 prio 3 protocol ip u32 match ip tos 0x68 0xff classid 1:12 tc filter add dev ${WAN} parent 1:0 prio 4 protocol ip u32 match ip tos 0x88 0xff classid 1:12 #-end iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --sport 2345 -j TOS --set-tos 0x28 iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --sport 2345 -j RETURN iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --dport 2345 -j TOS --set-tos 0x28 iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --dport 2345 -j RETURN iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p tcp --sport telnet -j TOS --set-tos 0x28 iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p tcp --sport telnet -j RETURN iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p tcp --dport telnet -j TOS --set-tos 0x28 iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p tcp --dport telnet -j RETURN iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p tcp --sport ssh -j TOS --set-tos 0x28 iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p tcp --sport ssh -j RETURN iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p tcp --dport ssh -j TOS --set-tos 0x28 iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p tcp --dport ssh -j RETURN iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j TOS --set-tos 0x28 iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j RETURN iptables -t mangle -I FORWARD -i ${LAN} -o ${WAN} -p udp --sport sip -j TOS --set-tos 0x48 iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --sport sip -j RETURN iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --dport sip -j TOS --set-tos 0x48 iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --dport sip -j RETURN iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --sport 5060 -j TOS --set-tos 0x48 iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --sport 5060 -j RETURN iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --dport 5060 -j TOS --set-tos 0x48 iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --dport 5060 -j RETURN iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --sport 4569 -j TOS --set-tos 0x48 iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --sport 4569 -j RETURN iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --dport 4569 -j TOS --set-tos 0x48 iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --dport 4569 -j RETURN iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --sport 5036 -j TOS --set-tos 0x48 iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --sport 5036 -j RETURN iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --dport 5036 -j TOS --set-tos 0x48 iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --dport 5036 -j RETURN iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --sport 1:2 -j TOS --set-tos 0x48 iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --sport 1:2 -j RETURN iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --dport 1:2 -j TOS --set-tos 0x48 iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --dport 1:2 -j RETURN
[Puppet Users] Error on puppet restarting
Hello group! I was working with puppetmaster 0.24 but I try to install the 2.6 version from source; that work fine but I can't revert the installation. I want to revert to 0.24 because I have more that 100 host with 0.24 clients. I run Debian 5 Lenny. This is the error: Restarting puppet master/usr/local/lib/site_ruby/1.8/rubygems.rb:419:in `dir': undefined method `home' for #Gem::ConfigFile:0xb72f742c (NoMethodError) from /usr/local/lib/site_ruby/1.8/rubygems.rb:868:in `set_paths' from /usr/local/lib/site_ruby/1.8/rubygems.rb:641:in `path' from /usr/lib/ruby/1.8/rubygems/source_index.rb:64:in `installed_spec_directories' from /usr/lib/ruby/1.8/rubygems/source_index.rb:54:in `from_installed_gems' from /usr/local/lib/site_ruby/1.8/rubygems.rb:883:in `source_index' from /usr/lib/ruby/1.8/rubygems/gem_path_searcher.rb:72:in `init_gemspecs' from /usr/lib/ruby/1.8/rubygems/gem_path_searcher.rb:21:in `initialize' from /usr/local/lib/site_ruby/1.8/rubygems.rb:841:in `new' from /usr/local/lib/site_ruby/1.8/rubygems.rb:841:in `searcher' from /usr/local/lib/site_ruby/1.8/rubygems.rb:840:in `synchronize' from /usr/local/lib/site_ruby/1.8/rubygems.rb:840:in `searcher' from /usr/local/lib/site_ruby/1.8/rubygems.rb:479:in `find_files' from /usr/local/lib/site_ruby/1.8/rubygems.rb:983:in `load_plugins' from /usr/local/lib/site_ruby/1.8/rubygems.rb:1139 from /usr/local/lib/site_ruby/1.8/puppet.rb:3:in `require' from /usr/local/lib/site_ruby/1.8/puppet.rb:3 from /usr/lib/ruby/1.8/puppet/application.rb:278:in `require' from /usr/lib/ruby/1.8/puppet/application.rb:278:in `initialize' from /usr/lib/ruby/1.8/puppet/util/command_line.rb:55:in `new' from /usr/lib/ruby/1.8/puppet/util/command_line.rb:55:in `execute' from /usr/bin/puppet:4 I have basic understanding about Ruby and some years working with linux, so I understand technical language. Greetings. -- 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/-/AH5vHeTl0MUJ. 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: Puppet recipe to copy and execute a shell file
In your QoS.sh file, make sure to use explicit paths to executables, e.g: use '/sbin/iptables -blah …' NOT 'iptables -blah …' -- Peter M. Bukowinski Systems Engineer Janelia Farm Research Campus, HHMI On Friday, June 17, 2011 at 10:44 AM, Annie Rana wrote: Hi Luke, What's your shell script expected to do? The shell script would generate Iptables rules How do you know it didn't work? I can check using ipatbles -L or iptables -t mangle -L commands If you run it by hand in a root shell, does it work then? Yes If so, there might be an environment problem when running from Puppet, like $PATH or something. Try set the parameter logoutput = true in the exec resource. I did but no affect. Thanks again, much appreciated your help and time. On Fri, Jun 17, 2011 at 3:26 PM, Luke Bigum luke.bi...@lmax.com (mailto:luke.bi...@lmax.com) wrote: How do you know it didn't work? What's your shell script expected to do? If you run it by hand in a root shell, does it work then? If so, there might be an environment problem when running from Puppet, like $PATH or something. Try set the parameter logoutput = true in the exec resource. On Jun 17, 3:18 pm, Annie Rana annier...@gmail.com (mailto:annier...@gmail.com) wrote: Thanks but it couldn't work though i got the message that shell script is successfully executed. On Fri, Jun 17, 2011 at 2:44 PM, Luke Bigum luke.bi...@lmax.com (mailto:luke.bi...@lmax.com) wrote: Annie, http://docs.puppetlabs.com/references/stable/type.html#exec By default the expected return code is probably zero, your script is returning 1. Whether this is correct or not I don't know, but you can tell puppet to expect a different return code: exec { '/etc/shell_file': require = File['/etc/shell_file'], returns = 1, } On Jun 17, 2:36 pm, Annie Rana annier...@gmail.com (mailto:annier...@gmail.com) wrote: I apologize for posting wrong log messages, here is the correct log: notice: Starting catalog run notice: //File[/tmp/QoS/QoS.sh (http://QoS.sh)]/ensure: created err: //Exec[/tmp/QoS/QoS.sh (http://QoS.sh)]/returns: change from notrun to 0 failed: /tmp/QoS/QoS.sh (http://QoS.sh) returned 1 instead of 0 at /etc/puppet/manifests/site.pp:10 notice: Finished catalog run in 0.46 seconds Any help please? On Fri, Jun 17, 2011 at 2:09 PM, Annie Rana annier...@gmail.com (mailto:annier...@gmail.com) wrote: Hi Peter, thanks for your reply. I managed to copy the shell file puppet client using the file resource recipe you specified but exec is throwing an error, which is as follows: info: No classes to store info: Caching catalog at /var/lib/puppet/state/localconfig.yaml notice: Starting catalog run err: //File[/tmp/QoS/QoS.sh (http://QoS.sh)]/ensure: change from absent to file failed: Could not set file on ensure: No such file or directory - /tmp/QoS/QoS.sh.puppettmp at /etc/puppet/manifests/site.pp:7 notice: //Exec[/tmp/QoS/QoS.sh (http://QoS.sh)]: Dependency file[/tmp/QoS/QoS.sh (http://QoS.sh)] has 1 failures warning: //Exec[/tmp/QoS/QoS.sh (http://QoS.sh)]: Skipping because of failed dependencies notice: Finished catalog run in 0.38 seconds When I tried running the shell script manually using the following command '/tmp/QoS/QoS.sh (http://QoS.sh); echo $?' , it worked fine printing 0 at the end. Any help what is wrong with exec resource recipe? Thanks in advance for your time. Regards, A. On Thu, Jun 16, 2011 at 8:42 PM, Peter Bukowinski pmb...@gmail.com (mailto:pmb...@gmail.com) wrote: It sounds like you haven't set up the puppet fileserver yet. Choose a directory that will hold files you want to copy to clients. I use /opt/files, so that's what is in my example. Create fileserver.conf in the same directory as puppet.conf and add these lines: [files] path /opt/files allow *.client.domain Put your shell file in the path you specified. Now you just need to set up a file and exec resource. Note the source item in the file resource and the require item in exec. file { '/etc/shell_file': ensure = present, owner = 'root', group = 'root', mode = '0755', source = 'puppet://puppet/files/shell_file', } exec { '/etc/shell_file': require = File['/etc/shell_file'] } -- Peter M. Bukowinski Systems Engineer Janelia Farm Research Campus, HHMI On Thursday, June 16, 2011 at 3:17 PM, annierana wrote: Hi all, I am new to puppet. I need a sample recipe to write/copy a shell
Re: [Puppet Users] functions and environments
On Thu, Jun 16, 2011 at 1:59 PM, Gabriel Filion lelu...@gmail.com wrote: On 11-06-16 03:47 PM, Nathan Clemons wrote: Or what you might want to do is to create a specific common directory for code that should be shared, and per-environment directories which contain code that should not be shared. If you find that something should no longer be common, you then move it into the per-env directories as appropriate. Oh ok ... I'll have to work something out then.. this is more complicated to use than I thought. This shouldn't be that complicated. Do you have modules with the same name in multiple modulepath components? If not, then you should be seeing the behavior you're expecting. It's not entirely unreasonable to expect that if module 'foo' is found in one modulepath component, that no other module named 'foo' should come into play, but I think we have some edge cases here. Please feel free to file a feature request around modulepath behaving more like $PATH in the shell does. -- 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] Questions for puppet 2.6.8 client certificate management
On Fri, Jun 17, 2011 at 7:15 AM, TJ Yang tjyang2...@gmail.com wrote: I am referring to puppet agent/client. I hope future version can support this certificate reset/cleanup on puppet agent. If you really do want agents to be able to clean certificates on the master, you can open up the API Access Control in auth.conf and use curl to script these sorts of API calls. http://docs.puppetlabs.com/guides/rest_api.html#certificate-request -- 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: Puppet recipe to copy and execute a shell file
Thanks again Peter but sorry it didn't work out either. On Fri, Jun 17, 2011 at 3:52 PM, Peter Bukowinski pmb...@gmail.com wrote: In your QoS.sh file, make sure to use explicit paths to executables, e.g: use '/sbin/iptables -blah …' NOT 'iptables -blah …' -- Peter M. Bukowinski Systems Engineer Janelia Farm Research Campus, HHMI On Friday, June 17, 2011 at 10:44 AM, Annie Rana wrote: Hi Luke, What's your shell script expected to do? The shell script would generate Iptables rules How do you know it didn't work? I can check using ipatbles -L or iptables -t mangle -L commands If you run it by hand in a root shell, does it work then? Yes If so, there might be an environment problem when running from Puppet, like $PATH or something. Try set the parameter logoutput = true in the exec resource. I did but no affect. Thanks again, much appreciated your help and time. On Fri, Jun 17, 2011 at 3:26 PM, Luke Bigum luke.bi...@lmax.com(mailto: luke.bi...@lmax.com) wrote: How do you know it didn't work? What's your shell script expected to do? If you run it by hand in a root shell, does it work then? If so, there might be an environment problem when running from Puppet, like $PATH or something. Try set the parameter logoutput = true in the exec resource. On Jun 17, 3:18 pm, Annie Rana annier...@gmail.com (mailto: annier...@gmail.com) wrote: Thanks but it couldn't work though i got the message that shell script is successfully executed. On Fri, Jun 17, 2011 at 2:44 PM, Luke Bigum luke.bi...@lmax.com(mailto: luke.bi...@lmax.com) wrote: Annie, http://docs.puppetlabs.com/references/stable/type.html#exec By default the expected return code is probably zero, your script is returning 1. Whether this is correct or not I don't know, but you can tell puppet to expect a different return code: exec { '/etc/shell_file': require = File['/etc/shell_file'], returns = 1, } On Jun 17, 2:36 pm, Annie Rana annier...@gmail.com (mailto: annier...@gmail.com) wrote: I apologize for posting wrong log messages, here is the correct log: notice: Starting catalog run notice: //File[/tmp/QoS/QoS.sh (http://QoS.sh)]/ensure: created err: //Exec[/tmp/QoS/QoS.sh (http://QoS.sh)]/returns: change from notrun to 0 failed: /tmp/QoS/QoS.sh (http://QoS.sh) returned 1 instead of 0 at /etc/puppet/manifests/site.pp:10 notice: Finished catalog run in 0.46 seconds Any help please? On Fri, Jun 17, 2011 at 2:09 PM, Annie Rana annier...@gmail.com(mailto: annier...@gmail.com) wrote: Hi Peter, thanks for your reply. I managed to copy the shell file puppet client using the file resource recipe you specified but exec is throwing an error, which is as follows: info: No classes to store info: Caching catalog at /var/lib/puppet/state/localconfig.yaml notice: Starting catalog run err: //File[/tmp/QoS/QoS.sh (http://QoS.sh)]/ensure: change from absent to file failed: Could not set file on ensure: No such file or directory - /tmp/QoS/QoS.sh.puppettmp at /etc/puppet/manifests/site.pp:7 notice: //Exec[/tmp/QoS/QoS.sh (http://QoS.sh)]: Dependency file[/tmp/QoS/QoS.sh (http://QoS.sh)] has 1 failures warning: //Exec[/tmp/QoS/QoS.sh (http://QoS.sh)]: Skipping because of failed dependencies notice: Finished catalog run in 0.38 seconds When I tried running the shell script manually using the following command '/tmp/QoS/QoS.sh (http://QoS.sh); echo $?' , it worked fine printing 0 at the end. Any help what is wrong with exec resource recipe? Thanks in advance for your time. Regards, A. On Thu, Jun 16, 2011 at 8:42 PM, Peter Bukowinski pmb...@gmail.com (mailto:pmb...@gmail.com) wrote: It sounds like you haven't set up the puppet fileserver yet. Choose a directory that will hold files you want to copy to clients. I use /opt/files, so that's what is in my example. Create fileserver.conf in the same directory as puppet.conf and add these lines: [files] path /opt/files allow *.client.domain Put your shell file in the path you specified. Now you just need to set up a file and exec resource. Note the source item in the file resource and the require item in exec. file { '/etc/shell_file': ensure = present, owner = 'root', group = 'root', mode = '0755', source = 'puppet://puppet/files/shell_file', } exec { '/etc/shell_file': require = File['/etc/shell_file'] } -- Peter M. Bukowinski Systems Engineer Janelia Farm Research
Re: [Puppet Users] Questions for puppet 2.6.8 client certificate management
On Fri, Jun 17, 2011 at 9:55 AM, Nigel Kersten ni...@puppetlabs.com wrote: On Fri, Jun 17, 2011 at 7:15 AM, TJ Yang tjyang2...@gmail.com wrote: I am referring to puppet agent/client. I hope future version can support this certificate reset/cleanup on puppet agent. If you really do want agents to be able to clean certificates on the master, I was looking for a formal way to remove a puppet agent's certficate,pubilc/private key without running rm -rf $ssldir. you can open up the API Access Control in auth.conf and use curl to script these sorts of API calls. This information is even better for higher degree of automation, so far I need to do puppet cert --clean puppetagent1.test.com on puppet master in a VT100 session. Thanks for the pointer. http://docs.puppetlabs.com/guides/rest_api.html#certificate-request -- 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. -- T.J. Yang -- 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: Puppet recipe to copy and execute a shell file
I'm out of ideas and I'd resort to hacking the script a bit to get some debugging output. Try just this in QoS.sh to try identify what's failing: export LAN=eth1 export WAN=eth0 CMD=tc filter add dev ${WAN} parent 1:0 prio 4 protocol ip u32 match ip tos 0x880xff classid 1:12 OUT=$($CMD) /tmp/QoS.out 21 RET=$? print Command $CMD returned $RET /tmp/QoS.out 21 CMD=iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --sport 2345 -j TOS --set-tos 0x28 OUT=$($CMD) /tmp/QoS.out 21 RET=$? print Command $CMD returned $RET /tmp/QoS.out 21 CMD=iptables-save OUT=$($CMD) /tmp/QoS.out 21 RET=$? print Command $CMD returned $RET /tmp/QoS.out 21 Or something like that. On Jun 17, 4:01 pm, Annie Rana annier...@gmail.com wrote: Thanks again Peter but sorry it didn't work out either. On Fri, Jun 17, 2011 at 3:52 PM, Peter Bukowinski pmb...@gmail.com wrote: In your QoS.sh file, make sure to use explicit paths to executables, e.g: use '/sbin/iptables -blah …' NOT 'iptables -blah …' -- Peter M. Bukowinski Systems Engineer Janelia Farm Research Campus, HHMI On Friday, June 17, 2011 at 10:44 AM, Annie Rana wrote: Hi Luke, What's your shell script expected to do? The shell script would generate Iptables rules How do you know it didn't work? I can check using ipatbles -L or iptables -t mangle -L commands If you run it by hand in a root shell, does it work then? Yes If so, there might be an environment problem when running from Puppet, like $PATH or something. Try set the parameter logoutput = true in the exec resource. I did but no affect. Thanks again, much appreciated your help and time. On Fri, Jun 17, 2011 at 3:26 PM, Luke Bigum luke.bi...@lmax.com(mailto: luke.bi...@lmax.com) wrote: How do you know it didn't work? What's your shell script expected to do? If you run it by hand in a root shell, does it work then? If so, there might be an environment problem when running from Puppet, like $PATH or something. Try set the parameter logoutput = true in the exec resource. On Jun 17, 3:18 pm, Annie Rana annier...@gmail.com (mailto: annier...@gmail.com) wrote: Thanks but it couldn't work though i got the message that shell script is successfully executed. On Fri, Jun 17, 2011 at 2:44 PM, Luke Bigum luke.bi...@lmax.com(mailto: luke.bi...@lmax.com) wrote: Annie, http://docs.puppetlabs.com/references/stable/type.html#exec By default the expected return code is probably zero, your script is returning 1. Whether this is correct or not I don't know, but you can tell puppet to expect a different return code: exec { '/etc/shell_file': require = File['/etc/shell_file'], returns = 1, } On Jun 17, 2:36 pm, Annie Rana annier...@gmail.com (mailto: annier...@gmail.com) wrote: I apologize for posting wrong log messages, here is the correct log: notice: Starting catalog run notice: //File[/tmp/QoS/QoS.sh (http://QoS.sh)]/ensure: created err: //Exec[/tmp/QoS/QoS.sh (http://QoS.sh)]/returns: change from notrun to 0 failed: /tmp/QoS/QoS.sh (http://QoS.sh) returned 1 instead of 0 at /etc/puppet/manifests/site.pp:10 notice: Finished catalog run in 0.46 seconds Any help please? On Fri, Jun 17, 2011 at 2:09 PM, Annie Rana annier...@gmail.com(mailto: annier...@gmail.com) wrote: Hi Peter, thanks for your reply. I managed to copy the shell file puppet client using the file resource recipe you specified but exec is throwing an error, which is as follows: info: No classes to store info: Caching catalog at /var/lib/puppet/state/localconfig.yaml notice: Starting catalog run err: //File[/tmp/QoS/QoS.sh (http://QoS.sh)]/ensure: change from absent to file failed: Could not set file on ensure: No such file or directory - /tmp/QoS/QoS.sh.puppettmp at /etc/puppet/manifests/site.pp:7 notice: //Exec[/tmp/QoS/QoS.sh (http://QoS.sh)]: Dependency file[/tmp/QoS/QoS.sh (http://QoS.sh)] has 1 failures warning: //Exec[/tmp/QoS/QoS.sh (http://QoS.sh)]: Skipping because of failed dependencies notice: Finished catalog run in 0.38 seconds When I tried running the shell script manually using the following command '/tmp/QoS/QoS.sh (http://QoS.sh);echo $?' , it worked fine printing 0 at the end. Any help what is wrong with exec resource recipe? Thanks in advance for your time. Regards, A. On Thu, Jun 16, 2011 at 8:42 PM, Peter Bukowinski pmb...@gmail.com (mailto:pmb...@gmail.com) wrote: It sounds like you haven't set up the puppet fileserver yet. Choose a directory that will hold files you want to copy to clients. I use /opt/files, so that's
Re: [Puppet Users] puppet dashboard
On Jun 16, 2011, at 10:48 PM, Patrick wrote: On Jun 14, 2011, at 11:56 AM, Craig White wrote: I am using Ubuntu 10.04 and ruby-enterprise (not ubuntu ruby) and installed puppet via gem. How can I install puppet-dashboard if I don't see a gem available and if I use the ubuntu package, i get the whole slop of ruby packages sucked in (which i am trying to avoid)? Frankly, I just let it install the packages because they won't do any harm. (I'm assuming you only use ruby for puppet) Here's how I got dashboard working: (Partly pesudo-code and I might be forgetting a step or two) get ruby-enterprise-1.8.7-2011.03.tar.gz untar and install ruby-enterprise-1.8.7-2011.03 install puppet-dashboard from the repository put this file in /etc/apache2/mods-avaliable/passengeree.load: LoadModule passenger_module /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-2.2.15/ext/apache2/mod_passenger.so PassengerRoot /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/passenger-2.2.15 PassengerRuby /opt/ruby-enterprise-1.8.7-2010.02/bin/ruby a2dismod ruby a2dismod passenger a2enmod passengeree /etc/apache2/sites-enabled/puppet-dashboard: # Based on http://projects.puppetlabs.com/projects/1/wiki/Using_Passenger Listen 3000 VirtualHost *:3000 # Passenger options that can be set in a virtual host # configuration block. PassengerHighPerformance on PassengerStatThrottleRate 120 PassengerMaxPoolSize 3 PassengerPoolIdleTime 300 PassengerUseGlobalQueue on RailsAutoDetect On RailsEnv production DocumentRoot /usr/share/puppet-dashboard/public/ Directory /usr/share/puppet-dashboard/public/ Options None AllowOverride AuthConfig Order allow,deny allow from all /Directory ErrorLog /var/log/apache2/puppet-dashboard_error.log LogLevel warn CustomLog /var/log/apache2/puppet-dashboard_access.log combined /etc/mysql/conf.d/innodb_file_per_table.cnf: #Without this isn't almost impossible to reclaim space from dashboard when reports are removed [mysqld] innodb_file_per_table=true service mysql restart cd /usr/share/puppet-dashboard/ Run the proper rake task to create and populate the DBs service apache2 restart actually the packages didn't cause me any harm (ubuntu 10.04), but the existence of the second copy of rubygems was making me insane because it seemed to always install gems in /usr/lib/ruby/ tree and thus it was hit or miss whether gems would work or not work or use /usr/local/ruby tree or /usr/lib/ruby tree so I had to get sanity by removing the ubuntu ruby packages. I hadn't experienced that before with CentOS but then again, I haven't tried running puppet (yet) or puppet-master (not likely) on CentOS. Anyway, I have gotten (per list suggestion) Puppet Pro (James, you are a god)[1] and will read through thoroughly before I try to figure out Dashboard because even though Dashboard is up and running now, it isn't entirely clear how to make it functional yet. Downloading Dashboard and installing it did create some 'rack' issues (apparently 1.0.1 is bundled w/ Dashboard and had to be removed and references fixed) Thanks Craig [1] actually to give credit to James is not meant to slight Luke, Nigel or any of the developers who have created an incredibly awesome toolset in any way. -- 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: Puppet recipe to copy and execute a shell file
Hi Luke, I replaced my shell script with the one you wrote. Same old error message appeared again 'change from notrun to 0 failed: /tmp/QoS/QoS.sh returned 1 instead of o at /etc/puppet/manifests/site.pp'. Your script didn't generated any log at client machine. Now I am sure about one thing that there is no issue with the shell script itself. The exec command is having hiccup even before executing the shell. I even tried command paremeter in exec but no use. Do you know anyother way to execute bash shell in puppet? Thanks much, Annie On Fri, Jun 17, 2011 at 4:06 PM, Luke Bigum luke.bi...@lmax.com wrote: I'm out of ideas and I'd resort to hacking the script a bit to get some debugging output. Try just this in QoS.sh to try identify what's failing: export LAN=eth1 export WAN=eth0 CMD=tc filter add dev ${WAN} parent 1:0 prio 4 protocol ip u32 match ip tos 0x880xff classid 1:12 OUT=$($CMD) /tmp/QoS.out 21 RET=$? print Command $CMD returned $RET /tmp/QoS.out 21 CMD=iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --sport 2345 -j TOS --set-tos 0x28 OUT=$($CMD) /tmp/QoS.out 21 RET=$? print Command $CMD returned $RET /tmp/QoS.out 21 CMD=iptables-save OUT=$($CMD) /tmp/QoS.out 21 RET=$? print Command $CMD returned $RET /tmp/QoS.out 21 Or something like that. On Jun 17, 4:01 pm, Annie Rana annier...@gmail.com wrote: Thanks again Peter but sorry it didn't work out either. On Fri, Jun 17, 2011 at 3:52 PM, Peter Bukowinski pmb...@gmail.com wrote: In your QoS.sh file, make sure to use explicit paths to executables, e.g: use '/sbin/iptables -blah …' NOT 'iptables -blah …' -- Peter M. Bukowinski Systems Engineer Janelia Farm Research Campus, HHMI On Friday, June 17, 2011 at 10:44 AM, Annie Rana wrote: Hi Luke, What's your shell script expected to do? The shell script would generate Iptables rules How do you know it didn't work? I can check using ipatbles -L or iptables -t mangle -L commands If you run it by hand in a root shell, does it work then? Yes If so, there might be an environment problem when running from Puppet, like $PATH or something. Try set the parameter logoutput = true in the exec resource. I did but no affect. Thanks again, much appreciated your help and time. On Fri, Jun 17, 2011 at 3:26 PM, Luke Bigum luke.bi...@lmax.com (mailto: luke.bi...@lmax.com) wrote: How do you know it didn't work? What's your shell script expected to do? If you run it by hand in a root shell, does it work then? If so, there might be an environment problem when running from Puppet, like $PATH or something. Try set the parameter logoutput = true in the exec resource. On Jun 17, 3:18 pm, Annie Rana annier...@gmail.com (mailto: annier...@gmail.com) wrote: Thanks but it couldn't work though i got the message that shell script is successfully executed. On Fri, Jun 17, 2011 at 2:44 PM, Luke Bigum luke.bi...@lmax.com (mailto: luke.bi...@lmax.com) wrote: Annie, http://docs.puppetlabs.com/references/stable/type.html#exec By default the expected return code is probably zero, your script is returning 1. Whether this is correct or not I don't know, but you can tell puppet to expect a different return code: exec { '/etc/shell_file': require = File['/etc/shell_file'], returns = 1, } On Jun 17, 2:36 pm, Annie Rana annier...@gmail.com (mailto: annier...@gmail.com) wrote: I apologize for posting wrong log messages, here is the correct log: notice: Starting catalog run notice: //File[/tmp/QoS/QoS.sh (http://QoS.sh)]/ensure: created err: //Exec[/tmp/QoS/QoS.sh (http://QoS.sh)]/returns: change from notrun to 0 failed: /tmp/QoS/QoS.sh (http://QoS.sh) returned 1 instead of 0 at /etc/puppet/manifests/site.pp:10 notice: Finished catalog run in 0.46 seconds Any help please? On Fri, Jun 17, 2011 at 2:09 PM, Annie Rana annier...@gmail.com(mailto: annier...@gmail.com) wrote: Hi Peter, thanks for your reply. I managed to copy the shell file puppet client using the file resource recipe you specified but exec is throwing an error, which is as follows: info: No classes to store info: Caching catalog at /var/lib/puppet/state/localconfig.yaml notice: Starting catalog run err: //File[/tmp/QoS/QoS.sh (http://QoS.sh)]/ensure: change from absent to file failed: Could not set file on ensure: No such file or directory - /tmp/QoS/QoS.sh.puppettmp at /etc/puppet/manifests/site.pp:7 notice: //Exec[/tmp/QoS/QoS.sh (http://QoS.sh)]: Dependency file[/tmp/QoS/QoS.sh (http://QoS.sh)] has 1 failures warning: //Exec[/tmp/QoS/QoS.sh
Re: [Puppet Users] Re: Puppet recipe to copy and execute a shell file
Hi Luke, I replaced my shell script with the one you wrote. Same old error message appeared again 'change from notrun to 0 failed: /tmp/QoS/QoS.sh returned 1 instead of o at /etc/puppet/manifests/site.pp' . Your script didn't generate any log at client machine. Now I am sure about one thing that there is no issue with the shell script itself. The exec command is having hiccup even before executing the shell. I even tried command paremeter in exec but no use. Do you know anyother way to execute bash shell in puppet? Thanks much, Annie On Fri, Jun 17, 2011 at 4:30 PM, Annie Rana annier...@gmail.com wrote: Hi Luke, I replaced my shell script with the one you wrote. Same old error message appeared again 'change from notrun to 0 failed: /tmp/QoS/QoS.sh returned 1 instead of o at /etc/puppet/manifests/site.pp'. Your script didn't generated any log at client machine. Now I am sure about one thing that there is no issue with the shell script itself. The exec command is having hiccup even before executing the shell. I even tried command paremeter in exec but no use. Do you know anyother way to execute bash shell in puppet? Thanks much, Annie On Fri, Jun 17, 2011 at 4:06 PM, Luke Bigum luke.bi...@lmax.com wrote: I'm out of ideas and I'd resort to hacking the script a bit to get some debugging output. Try just this in QoS.sh to try identify what's failing: export LAN=eth1 export WAN=eth0 CMD=tc filter add dev ${WAN} parent 1:0 prio 4 protocol ip u32 match ip tos 0x880xff classid 1:12 OUT=$($CMD) /tmp/QoS.out 21 RET=$? print Command $CMD returned $RET /tmp/QoS.out 21 CMD=iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --sport 2345 -j TOS --set-tos 0x28 OUT=$($CMD) /tmp/QoS.out 21 RET=$? print Command $CMD returned $RET /tmp/QoS.out 21 CMD=iptables-save OUT=$($CMD) /tmp/QoS.out 21 RET=$? print Command $CMD returned $RET /tmp/QoS.out 21 Or something like that. On Jun 17, 4:01 pm, Annie Rana annier...@gmail.com wrote: Thanks again Peter but sorry it didn't work out either. On Fri, Jun 17, 2011 at 3:52 PM, Peter Bukowinski pmb...@gmail.com wrote: In your QoS.sh file, make sure to use explicit paths to executables, e.g: use '/sbin/iptables -blah …' NOT 'iptables -blah …' -- Peter M. Bukowinski Systems Engineer Janelia Farm Research Campus, HHMI On Friday, June 17, 2011 at 10:44 AM, Annie Rana wrote: Hi Luke, What's your shell script expected to do? The shell script would generate Iptables rules How do you know it didn't work? I can check using ipatbles -L or iptables -t mangle -L commands If you run it by hand in a root shell, does it work then? Yes If so, there might be an environment problem when running from Puppet, like $PATH or something. Try set the parameter logoutput = true in the exec resource. I did but no affect. Thanks again, much appreciated your help and time. On Fri, Jun 17, 2011 at 3:26 PM, Luke Bigum luke.bi...@lmax.com (mailto: luke.bi...@lmax.com) wrote: How do you know it didn't work? What's your shell script expected to do? If you run it by hand in a root shell, does it work then? If so, there might be an environment problem when running from Puppet, like $PATH or something. Try set the parameter logoutput = true in the exec resource. On Jun 17, 3:18 pm, Annie Rana annier...@gmail.com (mailto: annier...@gmail.com) wrote: Thanks but it couldn't work though i got the message that shell script is successfully executed. On Fri, Jun 17, 2011 at 2:44 PM, Luke Bigum luke.bi...@lmax.com(mailto: luke.bi...@lmax.com) wrote: Annie, http://docs.puppetlabs.com/references/stable/type.html#exec By default the expected return code is probably zero, your script is returning 1. Whether this is correct or not I don't know, but you can tell puppet to expect a different return code: exec { '/etc/shell_file': require = File['/etc/shell_file'], returns = 1, } On Jun 17, 2:36 pm, Annie Rana annier...@gmail.com (mailto: annier...@gmail.com) wrote: I apologize for posting wrong log messages, here is the correct log: notice: Starting catalog run notice: //File[/tmp/QoS/QoS.sh (http://QoS.sh)]/ensure: created err: //Exec[/tmp/QoS/QoS.sh (http://QoS.sh)]/returns: change from notrun to 0 failed: /tmp/QoS/QoS.sh (http://QoS.sh) returned 1 instead of 0 at /etc/puppet/manifests/site.pp:10 notice: Finished catalog run in 0.46 seconds Any help please? On Fri, Jun 17, 2011 at 2:09 PM, Annie Rana annier...@gmail.com(mailto: annier...@gmail.com) wrote: Hi Peter, thanks for your reply. I managed to copy the shell file puppet client using the file resource recipe you specified but exec is
[Puppet Users] Re: Puppet recipe to copy and execute a shell file
Wouldn't have worked anyway, change print to echo and I forgot #!/ bin/bash... That's what I get for writing code from memory ;) That's strange, I just put this in my Puppet server: node 'puppetmaster' { file { '/etc/shell_file': ensure = present, owner = 'root', group = 'root', mode = '0755', source = 'puppet:///modules/puppet/shell_file', } exec { '/etc/shell_file': require = File['/etc/shell_file'] } } [root@co1puppet01 live]# cat ../../modules/live/puppet/files/ shell_file #!/bin/bash export LAN=eth1 export WAN=eth0 CMD=tc filter add dev ${WAN} parent 1:0 prio 4 protocol ip u32 match ip tos 0x880xff classid 1:12 OUT=$($CMD) RET=$? echo Command '$CMD' returned $RET 21 /tmp/QoS.out echo Command '$CMD' output '$OUT' 21 /tmp/QoS.out CMD=iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --sport 2345 -j TOS --set-tos 0x28 OUT=$($CMD) RET=$? echo Command '$CMD' returned $RET 21 /tmp/QoS.out echo Command '$CMD' output '$OUT' 21 /tmp/QoS.out CMD=iptables-save OUT=$($CMD) RET=$? echo Command '$CMD' returned $RET 21 /tmp/QoS.out echo Command '$CMD' output '$OUT' 21 /tmp/QoS.out [root@puppetmaster live]# puppetd --test info: Caching catalog for puppetmaster info: Applying configuration version '1308324915' notice: /Stage[main]//Node[puppetmaster]/Exec[/etc/shell_file]/ returns: executed successfully notice: Finished catalog run in 1.04 seconds [root@puppetmaster]# cat /tmp/QoS.out Command 'tc filter add dev eth0 parent 1:0 prio 4 protocol ip u32 match ip tos 0x880xff classid 1:12' returned 1 Command 'tc filter add dev eth0 parent 1:0 prio 4 protocol ip u32 match ip tos 0x880xff classid 1:12' output '' Command 'iptables -t mangle -A FORWARD -i eth1 -o eth0 -p udp --sport 2345 -j TOS --set-tos 0x28' returned 2 Command 'iptables -t mangle -A FORWARD -i eth1 -o eth0 -p udp --sport 2345 -j TOS --set-tos 0x28' output '' Command 'iptables-save' returned 0 Command 'iptables-save' output '# Generated by iptables-save v1.3.5 on Fri Jun 17 15:48:48 2011 *mangle :PREROUTING ACCEPT [3642:790381] :INPUT ACCEPT [2591:636935] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [2551:866979] :POSTROUTING ACCEPT [2551:866979] COMMIT # Completed on Fri Jun 17 15:48:48 2011 # Generated by iptables-save v1.3.5 on Fri Jun 17 15:48:48 2011 *filter :INPUT ACCEPT [2637:639987] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [2588:875945] COMMIT # Completed on Fri Jun 17 15:48:48 2011' I'm running out of ideas. You don't have noexec on /tmp do you? No, you said you could run it as root... Anyone else? On Jun 17, 4:31 pm, Annie Rana annier...@gmail.com wrote: Hi Luke, I replaced my shell script with the one you wrote. Same old error message appeared again 'change from notrun to 0 failed: /tmp/QoS/QoS.sh returned 1 instead of o at /etc/puppet/manifests/site.pp' . Your script didn't generate any log at client machine. Now I am sure about one thing that there is no issue with the shell script itself. The exec command is having hiccup even before executing the shell. I even tried command paremeter in exec but no use. Do you know anyother way to execute bash shell in puppet? Thanks much, Annie On Fri, Jun 17, 2011 at 4:30 PM, Annie Rana annier...@gmail.com wrote: Hi Luke, I replaced my shell script with the one you wrote. Same old error message appeared again 'change from notrun to 0 failed: /tmp/QoS/QoS.sh returned 1 instead of o at /etc/puppet/manifests/site.pp'. Your script didn't generated any log at client machine. Now I am sure about one thing that there is no issue with the shell script itself. The exec command is having hiccup even before executing the shell. I even tried command paremeter in exec but no use. Do you know anyother way to execute bash shell in puppet? Thanks much, Annie On Fri, Jun 17, 2011 at 4:06 PM, Luke Bigum luke.bi...@lmax.com wrote: I'm out of ideas and I'd resort to hacking the script a bit to get some debugging output. Try just this in QoS.sh to try identify what's failing: export LAN=eth1 export WAN=eth0 CMD=tc filter add dev ${WAN} parent 1:0 prio 4 protocol ip u32 match ip tos 0x880xff classid 1:12 OUT=$($CMD) /tmp/QoS.out 21 RET=$? print Command $CMD returned $RET /tmp/QoS.out 21 CMD=iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --sport 2345 -j TOS --set-tos 0x28 OUT=$($CMD) /tmp/QoS.out 21 RET=$? print Command $CMD returned $RET /tmp/QoS.out 21 CMD=iptables-save OUT=$($CMD) /tmp/QoS.out 21 RET=$? print Command $CMD returned $RET /tmp/QoS.out 21 Or something like that. On Jun 17, 4:01 pm, Annie Rana annier...@gmail.com wrote: Thanks again Peter but sorry it didn't work out either. On Fri, Jun 17, 2011 at 3:52 PM, Peter Bukowinski pmb...@gmail.com wrote: In your QoS.sh file, make sure to use explicit paths to executables, e.g: use '/sbin/iptables -blah …' NOT 'iptables -blah …' -- Peter M. Bukowinski Systems Engineer Janelia Farm Research Campus,
Re: [Puppet Users] Problem in wordpress moodule.
Simple question, but does wordpress.tar.gz exist in /var/www/ ? I would expect that you would want your tar exec to depend on whatever is deploying the wordpress tar.gz file (another Exec or a File resource), so that you know it's there before you try to use it. -- Nathan Clemons http://www.livemocha.com The worlds largest online language learning community On Fri, Jun 17, 2011 at 6:14 AM, lucas.brig...@ymail.com grillobri...@gmail.com wrote: Hi! I'm doing a module for the puppet for WordPress will implement. I'm having problems with this line: exec { tar -vzxf ${downdir}wordpress.tar.gz: path = [/usr/local/bin,/opt/local/bin,/usr/bin,/usr/sbin], } And the error generated is this: err: /Stage[main]//Node[lucas.com.br]/Wordpress::Install[ ]/Exec[tar -vzxf /var/www/wordpress.tar.gz]/returns: change from notrun to 0 failed: tar -vzxf /var/www/wordpress.tar.gz returned 1 instead of one of [0] at /etc/puppet/modules/wordpress/manifests/install.pp:40 Can anyone help me? -- Lucas Pereira Brígida www.codebroken.wordpress.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.
Re: [Puppet Users] dashboard ENC and parameterized classes
So: name: unxslet01.ucop.edu parameters: fw_tcp_ports: 22 9080 3000 classes: - firewall_wrapper - common::suse - firewall Is including both 'firewall' and 'firewall_wrapper'. But I think you are hitting non-deterministic ordering here ... you only really want to include 'firewall_wrapper' and have that pull in 'firewall'. Otherwise, you may pull in 'firewall' too early, which would apply its default settings. So drop 'firewall' from your classes in dashboard and you may find it does the correct thing ... FYI, this works for me: kbarber:tmp ken$ puppet --version 2.6.8 kbarber:tmp ken$ cat inherits.pp class firewall { define firewall_conf ($fw_services_ext_tcp = 22) { notify { msg1: message = $fw_services_ext_tcp, } } firewall_conf {default: } } class firewall_override ( $tcp_ports ) inherits firewall { Firewall::Firewall_conf[default] { fw_services_ext_tcp = $tcp_ports, } notify { msg0: message = $tcp_ports, } } class firewall_wrapper { class { firewall_override: tcp_ports = $::fw_tcp_ports, } } $fw_tcp_ports = 22 100 2323 include firewall_wrapper kbarber:tmp ken$ puppet apply -v inherits.pp info: Applying configuration version '1308330991' notice: 22 100 2323 notice: /Stage[main]/Firewall/Firewall::Firewall_conf[default]/Notify[msg1]/message: defined 'message' as '22 100 2323' notice: 22 100 2323 notice: /Stage[main]/Firewall_override/Notify[msg0]/message: defined 'message' as '22 100 2323' notice: Finished catalog run in 0.01 seconds kbarber:tmp ken$ ken. On Fri, Jun 17, 2011 at 2:56 AM, Ashley Gould ago...@ucop.edu wrote: On Wed, Jun 15, 2011 at 07:48:50PM -0700, Ashley Gould wrote: On Wed, Jun 15, 2011 at 06:13:52PM +0100, Ken Barber wrote: Certainly works for me in a simplified example ... can you simplify your example so it just does a notify? class firewall_extras ( $services = undef, ) { notify { msg: message = $services } } class myfirewall { class { firewall_extras: services = $::firewall_services } } Ok, I did finally get a basic parameterized class to work from dashboard ENC: class firewall_extras($tcp_ports) { notify { msg: message = $tcp_ports, } } class firewall_wrapper { class { firewall_extras: tcp_ports = $::fw_tcp_ports, } } --- agould@pmlab02-vhost:/data/puppet/production /usr/share/puppet-dashboard/bin/external_node unxslet01.ucop.edu --- name: unxslet01.ucop.edu parameters: fw_tcp_ports: 22 9080 3000 classes: - firewall_wrapper - common::suse unxslet01:~ # puppet agent -t info: Retrieving plugin info: Loading facts in adinfo info: Loading facts in adinfo info: Caching catalog for unxslet01.ucop.edu info: Applying configuration version '1308273566' notice: 22 9080 3000 notice: /Stage[main]/Firewall_extras/Notify[msg]/message: defined 'message' as '22 9080 3000' notice: Finished catalog run in 7.64 seconds But what I really want is to use a param class to override variables in a base class. Below is a stripped version. the value for the param I set in dashboard shows up in the override class but never makes it to the base class. # Base class # class firewall { define firewall_conf ( $fw_services_ext_tcp = 22 ) { file { /etc/sysconfig/SuSEfirewall2: content = template(firewall/SuSEfirewall2.erb), } notify { msg1: message = $fw_services_ext_tcp, } } # Implement default firewall setup firewall_conf {default: } } # Override class # class firewall_override ( $tcp_ports ) inherits firewall { # modify default firewall setup Firewall::Firewall_conf[default] { fw_services_ext_tcp = $tcp_ports, } notify { msg0: message = $tcp_ports, } } # Wrapper class for Dashboard # class firewall_wrapper { class { firewall_override: tcp_ports = $::fw_tcp_ports, } } agould@pmlab02-vhost:/data/puppet/production /usr/share/puppet-dashboard/bin/external_node unxslet01.ucop.edu --- name: unxslet01.ucop.edu parameters: fw_tcp_ports: 22 9080 3000 classes: - firewall_wrapper - common::suse - firewall unxslet01:~ # puppet agent -t info: Retrieving plugin info: Loading facts in adinfo info: Loading facts in adinfo info: Caching catalog for unxslet01.ucop.edu info: Applying configuration version '1308273896' notice: 22 9080 3000 notice: /Stage[main]/Firewall_extras/Notify[msg]/message: defined 'message' as '22 9080 3000' notice: 22 notice: /Stage[main]/Firewall/Firewall::Firewall_conf[default]/Notify[msg1]/message: defined 'message' as '22' notice: Finished catalog run in 6.76 seconds -- 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 in wordpress moodule.
You should usually run the exec with: exec { asdf: ... logoutput = on_failure, ... } This prints to screen any error. Anyway the clue for your case is in the error message: err: /Stage[main]//Node[lucas.com.br]/Wordpress::Install[ ]/Exec[tar -vzxf /var/www/wordpress.tar.gz]/returns: change from notrun to 0 failed: tar -vzxf /var/www/wordpress.tar.gz returned 1 instead of one of [0] at /etc/puppet/modules/wordpress/manifests/install.pp:40 So trying to run it: tar -vzxf /var/www/wordpress.tar.gz echo $? Should tell you what is wrong. ken. On Fri, Jun 17, 2011 at 2:14 PM, lucas.brig...@ymail.com grillobri...@gmail.com wrote: Hi! I'm doing a module for the puppet for WordPress will implement. I'm having problems with this line: exec { tar -vzxf ${downdir}wordpress.tar.gz: path = [/usr/local/bin,/opt/local/bin,/usr/bin,/usr/sbin], } And the error generated is this: err: /Stage[main]//Node[lucas.com.br]/Wordpress::Install[ ]/Exec[tar -vzxf /var/www/wordpress.tar.gz]/returns: change from notrun to 0 failed: tar -vzxf /var/www/wordpress.tar.gz returned 1 instead of one of [0] at /etc/puppet/modules/wordpress/manifests/install.pp:40 Can anyone help me? -- Lucas Pereira Brígida www.codebroken.wordpress.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.
Re: [Puppet Users] dashboard ENC and parameterized classes
On Fri, Jun 17, 2011 at 06:18:16PM +0100, Ken Barber wrote: So: name: unxslet01.ucop.edu parameters: fw_tcp_ports: 22 9080 3000 classes: - firewall_wrapper - common::suse - firewall Is including both 'firewall' and 'firewall_wrapper'. But I think you are hitting non-deterministic ordering here ... you only really want to include 'firewall_wrapper' and have that pull in 'firewall'. Otherwise, you may pull in 'firewall' too early, which would apply its default settings. Hi Ken, I got it to work! Whew. But not by removing 'firewall'. I actually need to include this class in my testing, because it gets included by default on all nodes as part of my 'common::suse' class. The problem was that puppet agent was not even using the correct class list for some mysterious and buggy reason. My external_node command returns the correct class list as you have above, but when I looked carefully at the puppet output (sleep helped here) I saw that the agent was not even hitting class 'firewall_wrapper' but a different testing class called 'firewall_extras': unxslet01:/var/lib/puppet # puppet agent -t info: Retrieving plugin info: Loading facts in adinfo info: Loading facts in adinfo info: Caching catalog for unxslet01.ucop.edu info: Applying configuration version '1308273896' notice: 22 9080 3000 notice: /Stage[main]/Firewall_extras/Notify[msg]/message: defined 'message' as '22 9080 3000' notice: 22 notice: /Stage[main]/Firewall/Firewall::Firewall_conf[default]/Notify[msg1]/message: defined 'message' as '22' notice: Finished catalog run in 8.59 seconds I could not figure out why. I tried removing the cached catalog and restating puppet agent, but still the wrong class was used. Only after I deleted the 'firewall_extras' class from my manifest entirly did agent use the configured class: unxslet01:/var/lib/puppet # puppet agent -t info: Retrieving plugin info: Loading facts in adinfo info: Loading facts in adinfo info: Caching catalog for unxslet01.ucop.edu info: Applying configuration version '1308331369' notice: 22 9080 3000 notice: /Stage[main]/Firewall/Firewall::Firewall_conf[default]/Notify[msg1]/message: defined 'message' as '22 9080 3000' notice: 22 9080 3000 notice: /Stage[main]/Firewall_override/Notify[msg0]/message: defined 'message' as '22 9080 3000' notice: Finished catalog run in 6.80 seconds I was not able to reproduce this bug. So drop 'firewall' from your classes in dashboard and you may find it does the correct thing ... FYI, this works for me: kbarber:tmp ken$ puppet --version 2.6.8 kbarber:tmp ken$ cat inherits.pp class firewall { define firewall_conf ($fw_services_ext_tcp = 22) { notify { msg1: message = $fw_services_ext_tcp, } } firewall_conf {default: } } class firewall_override ( $tcp_ports ) inherits firewall { Firewall::Firewall_conf[default] { fw_services_ext_tcp = $tcp_ports, } notify { msg0: message = $tcp_ports, } } class firewall_wrapper { class { firewall_override: tcp_ports = $::fw_tcp_ports, } } $fw_tcp_ports = 22 100 2323 include firewall_wrapper kbarber:tmp ken$ puppet apply -v inherits.pp info: Applying configuration version '1308330991' notice: 22 100 2323 notice: /Stage[main]/Firewall/Firewall::Firewall_conf[default]/Notify[msg1]/message: defined 'message' as '22 100 2323' notice: 22 100 2323 notice: /Stage[main]/Firewall_override/Notify[msg0]/message: defined 'message' as '22 100 2323' notice: Finished catalog run in 0.01 seconds kbarber:tmp ken$ ken. On Fri, Jun 17, 2011 at 2:56 AM, Ashley Gould ago...@ucop.edu wrote: On Wed, Jun 15, 2011 at 07:48:50PM -0700, Ashley Gould wrote: On Wed, Jun 15, 2011 at 06:13:52PM +0100, Ken Barber wrote: Certainly works for me in a simplified example ... can you simplify your example so it just does a notify? class firewall_extras ( $services = undef, ) { notify { msg: message = $services } } class myfirewall { class { firewall_extras: services = $::firewall_services } } Ok, I did finally get a basic parameterized class to work from dashboard ENC: class firewall_extras($tcp_ports) { notify { msg: message = $tcp_ports, } } class firewall_wrapper { class { firewall_extras: tcp_ports = $::fw_tcp_ports, } } --- agould@pmlab02-vhost:/data/puppet/production /usr/share/puppet-dashboard/bin/external_node unxslet01.ucop.edu --- name: unxslet01.ucop.edu parameters: fw_tcp_ports: 22 9080 3000 classes: - firewall_wrapper - common::suse unxslet01:~ # puppet agent -t info: Retrieving plugin info: Loading facts in adinfo info: Loading facts in adinfo info: Caching catalog for unxslet01.ucop.edu info: Applying configuration version '1308273566' notice: 22 9080 3000 notice: /Stage[main]/Firewall_extras/Notify[msg]/message: defined 'message' as '22 9080 3000' notice: Finished catalog run in 7.64 seconds
Re: [Puppet Users] Re: Puppet recipe to copy and execute a shell file
Hi, Thanks much for help. Some how I managed to execute the original shell script using command in exec command='sh /tmp/QoS/QoS.sh' and I used path parameter as well path='/sbin:/sbin/ipatbles:/bin:/usr/bin' but I have to run file and exec recipes separately one after another otherwise exec is executed first if both are placed in one recipe and causing file not found error. Is there any way to define the sequence of execution? Regards, Annie On Fri, Jun 17, 2011 at 4:50 PM, Luke Bigum luke.bi...@lmax.com wrote: Wouldn't have worked anyway, change print to echo and I forgot #!/ bin/bash... That's what I get for writing code from memory ;) That's strange, I just put this in my Puppet server: node 'puppetmaster' { file { '/etc/shell_file': ensure = present, owner = 'root', group = 'root', mode = '0755', source = 'puppet:///modules/puppet/shell_file', } exec { '/etc/shell_file': require = File['/etc/shell_file'] } } [root@co1puppet01 live]# cat ../../modules/live/puppet/files/ shell_file #!/bin/bash export LAN=eth1 export WAN=eth0 CMD=tc filter add dev ${WAN} parent 1:0 prio 4 protocol ip u32 match ip tos 0x880xff classid 1:12 OUT=$($CMD) RET=$? echo Command '$CMD' returned $RET 21 /tmp/QoS.out echo Command '$CMD' output '$OUT' 21 /tmp/QoS.out CMD=iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --sport 2345 -j TOS --set-tos 0x28 OUT=$($CMD) RET=$? echo Command '$CMD' returned $RET 21 /tmp/QoS.out echo Command '$CMD' output '$OUT' 21 /tmp/QoS.out CMD=iptables-save OUT=$($CMD) RET=$? echo Command '$CMD' returned $RET 21 /tmp/QoS.out echo Command '$CMD' output '$OUT' 21 /tmp/QoS.out [root@puppetmaster live]# puppetd --test info: Caching catalog for puppetmaster info: Applying configuration version '1308324915' notice: /Stage[main]//Node[puppetmaster]/Exec[/etc/shell_file]/ returns: executed successfully notice: Finished catalog run in 1.04 seconds [root@puppetmaster]# cat /tmp/QoS.out Command 'tc filter add dev eth0 parent 1:0 prio 4 protocol ip u32 match ip tos 0x880xff classid 1:12' returned 1 Command 'tc filter add dev eth0 parent 1:0 prio 4 protocol ip u32 match ip tos 0x880xff classid 1:12' output '' Command 'iptables -t mangle -A FORWARD -i eth1 -o eth0 -p udp --sport 2345 -j TOS --set-tos 0x28' returned 2 Command 'iptables -t mangle -A FORWARD -i eth1 -o eth0 -p udp --sport 2345 -j TOS --set-tos 0x28' output '' Command 'iptables-save' returned 0 Command 'iptables-save' output '# Generated by iptables-save v1.3.5 on Fri Jun 17 15:48:48 2011 *mangle :PREROUTING ACCEPT [3642:790381] :INPUT ACCEPT [2591:636935] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [2551:866979] :POSTROUTING ACCEPT [2551:866979] COMMIT # Completed on Fri Jun 17 15:48:48 2011 # Generated by iptables-save v1.3.5 on Fri Jun 17 15:48:48 2011 *filter :INPUT ACCEPT [2637:639987] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [2588:875945] COMMIT # Completed on Fri Jun 17 15:48:48 2011' I'm running out of ideas. You don't have noexec on /tmp do you? No, you said you could run it as root... Anyone else? On Jun 17, 4:31 pm, Annie Rana annier...@gmail.com wrote: Hi Luke, I replaced my shell script with the one you wrote. Same old error message appeared again 'change from notrun to 0 failed: /tmp/QoS/QoS.sh returned 1 instead of o at /etc/puppet/manifests/site.pp' . Your script didn't generate any log at client machine. Now I am sure about one thing that there is no issue with the shell script itself. The exec command is having hiccup even before executing the shell. I even tried command paremeter in exec but no use. Do you know anyother way to execute bash shell in puppet? Thanks much, Annie On Fri, Jun 17, 2011 at 4:30 PM, Annie Rana annier...@gmail.com wrote: Hi Luke, I replaced my shell script with the one you wrote. Same old error message appeared again 'change from notrun to 0 failed: /tmp/QoS/QoS.sh returned 1 instead of o at /etc/puppet/manifests/site.pp'. Your script didn't generated any log at client machine. Now I am sure about one thing that there is no issue with the shell script itself. The exec command is having hiccup even before executing the shell. I even tried command paremeter in exec but no use. Do you know anyother way to execute bash shell in puppet? Thanks much, Annie On Fri, Jun 17, 2011 at 4:06 PM, Luke Bigum luke.bi...@lmax.com wrote: I'm out of ideas and I'd resort to hacking the script a bit to get some debugging output. Try just this in QoS.sh to try identify what's failing: export LAN=eth1 export WAN=eth0 CMD=tc filter add dev ${WAN} parent 1:0 prio 4 protocol ip u32 match ip tos 0x880xff classid 1:12 OUT=$($CMD) /tmp/QoS.out 21 RET=$? print Command $CMD returned $RET /tmp/QoS.out 21 CMD=iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --sport 2345 -j TOS --set-tos 0x28
Re: [Puppet Users] Re: Puppet recipe to copy and execute a shell file
You want: file { blah: ... } exec {blah2: ... require = File['blah'] } That way you ensure the file is created before you try to run the exec. -- Nathan Clemons http://www.livemocha.com The worlds largest online language learning community On Fri, Jun 17, 2011 at 10:43 AM, Annie Rana annier...@gmail.com wrote: Hi, Thanks much for help. Some how I managed to execute the original shell script using command in exec command='sh /tmp/QoS/QoS.sh' and I used path parameter as well path='/sbin:/sbin/ipatbles:/bin:/usr/bin' but I have to run file and exec recipes separately one after another otherwise exec is executed first if both are placed in one recipe and causing file not found error. Is there any way to define the sequence of execution? Regards, Annie On Fri, Jun 17, 2011 at 4:50 PM, Luke Bigum luke.bi...@lmax.com wrote: Wouldn't have worked anyway, change print to echo and I forgot #!/ bin/bash... That's what I get for writing code from memory ;) That's strange, I just put this in my Puppet server: node 'puppetmaster' { file { '/etc/shell_file': ensure = present, owner = 'root', group = 'root', mode = '0755', source = 'puppet:///modules/puppet/shell_file', } exec { '/etc/shell_file': require = File['/etc/shell_file'] } } [root@co1puppet01 live]# cat ../../modules/live/puppet/files/ shell_file #!/bin/bash export LAN=eth1 export WAN=eth0 CMD=tc filter add dev ${WAN} parent 1:0 prio 4 protocol ip u32 match ip tos 0x880xff classid 1:12 OUT=$($CMD) RET=$? echo Command '$CMD' returned $RET 21 /tmp/QoS.out echo Command '$CMD' output '$OUT' 21 /tmp/QoS.out CMD=iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --sport 2345 -j TOS --set-tos 0x28 OUT=$($CMD) RET=$? echo Command '$CMD' returned $RET 21 /tmp/QoS.out echo Command '$CMD' output '$OUT' 21 /tmp/QoS.out CMD=iptables-save OUT=$($CMD) RET=$? echo Command '$CMD' returned $RET 21 /tmp/QoS.out echo Command '$CMD' output '$OUT' 21 /tmp/QoS.out [root@puppetmaster live]# puppetd --test info: Caching catalog for puppetmaster info: Applying configuration version '1308324915' notice: /Stage[main]//Node[puppetmaster]/Exec[/etc/shell_file]/ returns: executed successfully notice: Finished catalog run in 1.04 seconds [root@puppetmaster]# cat /tmp/QoS.out Command 'tc filter add dev eth0 parent 1:0 prio 4 protocol ip u32 match ip tos 0x880xff classid 1:12' returned 1 Command 'tc filter add dev eth0 parent 1:0 prio 4 protocol ip u32 match ip tos 0x880xff classid 1:12' output '' Command 'iptables -t mangle -A FORWARD -i eth1 -o eth0 -p udp --sport 2345 -j TOS --set-tos 0x28' returned 2 Command 'iptables -t mangle -A FORWARD -i eth1 -o eth0 -p udp --sport 2345 -j TOS --set-tos 0x28' output '' Command 'iptables-save' returned 0 Command 'iptables-save' output '# Generated by iptables-save v1.3.5 on Fri Jun 17 15:48:48 2011 *mangle :PREROUTING ACCEPT [3642:790381] :INPUT ACCEPT [2591:636935] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [2551:866979] :POSTROUTING ACCEPT [2551:866979] COMMIT # Completed on Fri Jun 17 15:48:48 2011 # Generated by iptables-save v1.3.5 on Fri Jun 17 15:48:48 2011 *filter :INPUT ACCEPT [2637:639987] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [2588:875945] COMMIT # Completed on Fri Jun 17 15:48:48 2011' I'm running out of ideas. You don't have noexec on /tmp do you? No, you said you could run it as root... Anyone else? On Jun 17, 4:31 pm, Annie Rana annier...@gmail.com wrote: Hi Luke, I replaced my shell script with the one you wrote. Same old error message appeared again 'change from notrun to 0 failed: /tmp/QoS/QoS.sh returned 1 instead of o at /etc/puppet/manifests/site.pp' . Your script didn't generate any log at client machine. Now I am sure about one thing that there is no issue with the shell script itself. The exec command is having hiccup even before executing the shell. I even tried command paremeter in exec but no use. Do you know anyother way to execute bash shell in puppet? Thanks much, Annie On Fri, Jun 17, 2011 at 4:30 PM, Annie Rana annier...@gmail.com wrote: Hi Luke, I replaced my shell script with the one you wrote. Same old error message appeared again 'change from notrun to 0 failed: /tmp/QoS/QoS.sh returned 1 instead of o at /etc/puppet/manifests/site.pp'. Your script didn't generated any log at client machine. Now I am sure about one thing that there is no issue with the shell script itself. The exec command is having hiccup even before executing the shell. I even tried command paremeter in exec but no use. Do you know anyother way to execute bash shell in puppet? Thanks much, Annie On Fri, Jun 17, 2011 at 4:06 PM, Luke Bigum luke.bi...@lmax.com wrote: I'm out of ideas and I'd resort to hacking the script a bit to get some debugging output. Try just this in QoS.sh to try identify what's failing: export
Re: [Puppet Users] Re: Puppet recipe to copy and execute a shell file
Thanks much Nathan, it worked like a charm. :) Thank you Peter and Luke; keep up the good work. Regards, A. On Fri, Jun 17, 2011 at 6:50 PM, Nathan Clemons nat...@livemocha.comwrote: You want: file { blah: ... } exec {blah2: ... require = File['blah'] } That way you ensure the file is created before you try to run the exec. -- Nathan Clemons http://www.livemocha.com The worlds largest online language learning community On Fri, Jun 17, 2011 at 10:43 AM, Annie Rana annier...@gmail.com wrote: Hi, Thanks much for help. Some how I managed to execute the original shell script using command in exec command='sh /tmp/QoS/QoS.sh' and I used path parameter as well path='/sbin:/sbin/ipatbles:/bin:/usr/bin' but I have to run file and exec recipes separately one after another otherwise exec is executed first if both are placed in one recipe and causing file not found error. Is there any way to define the sequence of execution? Regards, Annie On Fri, Jun 17, 2011 at 4:50 PM, Luke Bigum luke.bi...@lmax.com wrote: Wouldn't have worked anyway, change print to echo and I forgot #!/ bin/bash... That's what I get for writing code from memory ;) That's strange, I just put this in my Puppet server: node 'puppetmaster' { file { '/etc/shell_file': ensure = present, owner = 'root', group = 'root', mode = '0755', source = 'puppet:///modules/puppet/shell_file', } exec { '/etc/shell_file': require = File['/etc/shell_file'] } } [root@co1puppet01 live]# cat ../../modules/live/puppet/files/ shell_file #!/bin/bash export LAN=eth1 export WAN=eth0 CMD=tc filter add dev ${WAN} parent 1:0 prio 4 protocol ip u32 match ip tos 0x880xff classid 1:12 OUT=$($CMD) RET=$? echo Command '$CMD' returned $RET 21 /tmp/QoS.out echo Command '$CMD' output '$OUT' 21 /tmp/QoS.out CMD=iptables -t mangle -A FORWARD -i ${LAN} -o ${WAN} -p udp --sport 2345 -j TOS --set-tos 0x28 OUT=$($CMD) RET=$? echo Command '$CMD' returned $RET 21 /tmp/QoS.out echo Command '$CMD' output '$OUT' 21 /tmp/QoS.out CMD=iptables-save OUT=$($CMD) RET=$? echo Command '$CMD' returned $RET 21 /tmp/QoS.out echo Command '$CMD' output '$OUT' 21 /tmp/QoS.out [root@puppetmaster live]# puppetd --test info: Caching catalog for puppetmaster info: Applying configuration version '1308324915' notice: /Stage[main]//Node[puppetmaster]/Exec[/etc/shell_file]/ returns: executed successfully notice: Finished catalog run in 1.04 seconds [root@puppetmaster]# cat /tmp/QoS.out Command 'tc filter add dev eth0 parent 1:0 prio 4 protocol ip u32 match ip tos 0x880xff classid 1:12' returned 1 Command 'tc filter add dev eth0 parent 1:0 prio 4 protocol ip u32 match ip tos 0x880xff classid 1:12' output '' Command 'iptables -t mangle -A FORWARD -i eth1 -o eth0 -p udp --sport 2345 -j TOS --set-tos 0x28' returned 2 Command 'iptables -t mangle -A FORWARD -i eth1 -o eth0 -p udp --sport 2345 -j TOS --set-tos 0x28' output '' Command 'iptables-save' returned 0 Command 'iptables-save' output '# Generated by iptables-save v1.3.5 on Fri Jun 17 15:48:48 2011 *mangle :PREROUTING ACCEPT [3642:790381] :INPUT ACCEPT [2591:636935] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [2551:866979] :POSTROUTING ACCEPT [2551:866979] COMMIT # Completed on Fri Jun 17 15:48:48 2011 # Generated by iptables-save v1.3.5 on Fri Jun 17 15:48:48 2011 *filter :INPUT ACCEPT [2637:639987] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [2588:875945] COMMIT # Completed on Fri Jun 17 15:48:48 2011' I'm running out of ideas. You don't have noexec on /tmp do you? No, you said you could run it as root... Anyone else? On Jun 17, 4:31 pm, Annie Rana annier...@gmail.com wrote: Hi Luke, I replaced my shell script with the one you wrote. Same old error message appeared again 'change from notrun to 0 failed: /tmp/QoS/QoS.sh returned 1 instead of o at /etc/puppet/manifests/site.pp' . Your script didn't generate any log at client machine. Now I am sure about one thing that there is no issue with the shell script itself. The exec command is having hiccup even before executing the shell. I even tried command paremeter in exec but no use. Do you know anyother way to execute bash shell in puppet? Thanks much, Annie On Fri, Jun 17, 2011 at 4:30 PM, Annie Rana annier...@gmail.com wrote: Hi Luke, I replaced my shell script with the one you wrote. Same old error message appeared again 'change from notrun to 0 failed: /tmp/QoS/QoS.sh returned 1 instead of o at /etc/puppet/manifests/site.pp'. Your script didn't generated any log at client machine. Now I am sure about one thing that there is no issue with the shell script itself. The exec command is having hiccup even before executing the shell. I even tried command paremeter in exec but no use. Do you know anyother way to execute bash shell in puppet? Thanks much, Annie On Fri, Jun 17, 2011 at 4:06 PM, Luke Bigum
Re: [Puppet Users] puppet resource for group
On Fri, Jun 17, 2011 at 3:50 AM, Andreas Kuntzagk andreas.kuntz...@mdc-berlin.de wrote: Nigel Kersten wrote: I feel we've produced inconsistencies here, and given I added the group membership support for OS X, it's largely my fault :) We've too closely modelled the tools for managing users/groups on various platforms, and I actually feel like we should break group membership out into a separate type, so it's easier to express semantics like: * ensure nigel is not a member of group admin, leave group alone otherwise * ensure nigel is a member of group admin, leave group alone otherwise without requiring that the user nigel or group admin are even managed by Puppet. That would be useful to us. http://projects.puppetlabs.com/issues/7241 Anyone who has an opinion on this feature idea, please update that ticket with your thoughts. -- Nigel Kersten Product, Puppet Labs @nigelkersten -- 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] puppet repository from puppetlabs
2.6.3 is available from https://launchpad.net/~mathiaz/+archive/puppet-backports. I haven't had any issues with it. On Thu, 16 Jun 2011 08:00:38 -0700 Craig White craig.wh...@ttiltd.com wrote: I installed using gem instead of Lucid packages - not exactly for that reason (we are using ruby-enterprise and not Lucid ruby packages). Craig On Jun 15, 2011, at 8:56 PM, Asif Iqbal wrote: Hi All, Is there a ubuntu repository managed by puppetlabs? I am using lucid and latest puppet package it offers is 0.25.4. I could of course just download source, or a deb from debian or newer ubuntu, or get it using gem. But would be nice if there is a PPA available for lucid, cuz it would work nicely with routine upgrade. puppetdashboard worked nicely with the puppet labs ppa deb http://apt.puppetlabs.com/ubuntu lucid main and deb-src deb-src http://apt.puppetlabs.com/ubuntu lucid main Please advise. -- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? -- 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. -- Dan Urist dur...@ucar.edu 303-497-2459 -- 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] puppet repository from puppetlabs
Try Debian Backports repo. It has 2.6.8 version. Regards. 17.06.2011 22:03, Dan Urist пишет: 2.6.3 is available from https://launchpad.net/~mathiaz/+archive/puppet-backports. I haven't had any issues with it. On Thu, 16 Jun 2011 08:00:38 -0700 Craig Whitecraig.wh...@ttiltd.com wrote: I installed using gem instead of Lucid packages - not exactly for that reason (we are using ruby-enterprise and not Lucid ruby packages). Craig On Jun 15, 2011, at 8:56 PM, Asif Iqbal wrote: Hi All, Is there a ubuntu repository managed by puppetlabs? I am using lucid and latest puppet package it offers is 0.25.4. I could of course just download source, or a deb from debian or newer ubuntu, or get it using gem. But would be nice if there is a PPA available for lucid, cuz it would work nicely with routine upgrade. puppetdashboard worked nicely with the puppet labs ppa deb http://apt.puppetlabs.com/ubuntu lucid main and deb-src deb-src http://apt.puppetlabs.com/ubuntu lucid main Please advise. -- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? -- 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. smime.p7s Description: S/MIME Cryptographic Signature
[Puppet Users] Re: Puppet-dashboard not linking to filebucket or diffs
On Jun 9, 6:28 pm, Nigel Kersten ni...@puppetlabs.com wrote: On your puppet master, make sure you have a filebucket 'main' defined, and that it's applying to all File resources. The easiest way is to put something like this in site.pp filebucket { main: server = debian5-1.localdomain, path = false } File { backup = main } Adding the filebucket stuff is what got this working for me, after Google found this thread. Thanks for the tip. As soon as you've got this working you're going to get frustrated by: http://projects.puppetlabs.com/issues/7869 where we don't actually show the diff, just the old and new files. This should be a relatively easy fix to implement, as we have the complete API for showing diffs as per: http://docs.puppetlabs.com/guides/rest_api.html#file-bucket and we know the md5 to diff with. Yep, you're right. This is what I want now. +1 The diff_with option seems to work, just need it integrated into the dashboard UI: $ curl -k -H Accept: s https://puppet:8140/production/file_bucket_file/md5/01d551248771071c449d30fec87be98f?diff_with=adce6e149a6ff677304aac194809b4d8 16c16 test --- another test -- 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 in wordpress moodule.
On 06/17/2011 09:14 AM, lucas.brig...@ymail.com wrote: Hi! I'm doing a module for the puppet for WordPress will implement. I'm having problems with this line: exec { tar -vzxf ${downdir}wordpress.tar.gz: path = [/usr/local/bin,/opt/local/bin,/usr/bin,/usr/sbin], } 1. make sure wordpress.tar.gz is on the machine before you try to untar it 2. put the x first: tar xzvf wordpress.tar.gz or you can do what I do and pipe that archive into tar: exec { true $title wget -O - $upstream | tar xzf - --xform 's,wordpress/,,': cwd = $top, creates = $top/license.txt, before = File[ $top/setup.mysql ], } the reason for the 'true $title ' part is that I want to be able to use this exec multiple times (it is in a defined class). So I need to get the $title in there so puppet doesn't think it is a duplicate definition. OK, that's confusing. the whole thing (wordpress, not the entire lamp stack) is in a tarfile attachement. Hope the list accepts it. And the error generated is this: err: /Stage[main]//Node[lucas.com.br http://lucas.com.br]/Wordpress::Install[ ]/Exec[tar -vzxf /var/www/wordpress.tar.gz]/returns: change from notrun to 0 failed: tar -vzxf /var/www/wordpress.tar.gz returned 1 instead of one of [0] at /etc/puppet/modules/wordpress/manifests/install.pp:40 Can anyone help me? -- Lucas Pereira Brígida www.codebroken.wordpress.com http://www.codebroken.wordpress.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. wordpress-module.tgz Description: application/compressed-tar