[Puppet Users] run puppet service type with specific user
Hi, is it possible to use the service resource type with a specific user ? So that the service is started with that given user instead of the puppet user starting it... Thanks. -- 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/-/u6nkVpFJ_kcJ. 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] run puppet service type with specific user
- Original Message - Hi, is it possible to use the service resource type with a specific user ? So that the service is started with that given user instead of the puppet user starting it... puppet runs as root, your rc script should do the right thing and run the service as the right user -- 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: Official puppetlabs position on cron vs puppet as a service?
On Sep 23, 5:42 pm, Brian Gupta brian.gu...@brandorr.com wrote: Over the years many shops have come to start running puppet via cron to address memory leaks in earlier versions of Ruby, but the official position was that puppet was meant to be run as a continually running service. I am wondering if the official position has changed. On one hand many if not all of the early Ruby issues have been fixed, on the other, the addition of mcollective into the mix as a lightweight agent for triggering adhoc puppet runs, and other tasks somewhat lowers the requirements for puppet to be run as a service. (Or out of cron for that matter). I understand that in cases where old Ruby versions are for whatever reason mandated the answer may be different. Thanks, Brian -- http://aws.amazon.com/solutions/solution-providers/brandorr/ Could those memory leak problems cause the Puppet daemon to crash with no logs indicating why? I have about 20 systems all running CentOS 5 and 6, with Puppet 2.6.9, and I now have to have Zabbix run a /etc/ init.d/puppet start everytime the daemon crashes which is almost on a daily basis for every client. Would be interested to know of a known fix or if the only fix is the workaround of using Cron. Thanks - Trey -- 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] run puppet service type with specific user
Thanks for the reply. I modified the rc script to run as a user. But now I'm facing the following problem: I have to include some nasty puppet code for adding the service before i can use the service resource type. And the service resource type returns ok, but the service is in fact not started. When i do it manually, it requires a password for that user. So, I tried to manage the user with puppet and provided a password, but get the message: Provider useradd does not support features manages_passwords; not managing attribute password I know this is a problem with Puppet and CentOS, but I have ruby-shadow and shadow-utils installed on my CentOS 6.0 VM. I also don't know if this is going to help with starting the service. I want to use the service type to start the service with a specific user, but without asking for a password. Any help would be appreciated. Regards. -- 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/-/9sm5V3MccfoJ. 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] run puppet service type with specific user
- Original Message - Thanks for the reply. I modified the rc script to run as a user. But now I'm facing the following problem: I have to include some nasty puppet code for adding the service before i can use the service resource type. And the service resource type returns ok, but the service is in fact not started. When i do it manually, it requires a password for that user. So, I tried to manage the user with puppet and provided a password, but get the message: Provider useradd does not support features manages_passwords; not managing attribute password I know this is a problem with Puppet and CentOS, but I have ruby-shadow and shadow-utils installed on my CentOS 6.0 VM. I also don't know if this is going to help with starting the service. I want to use the service type to start the service with a specific user, but without asking for a password. you should use su in your script to switch users to the one the service should run as. consider what will happen when your server starts up? the rc script runs and then what? ask you for a password? thats not good. the rc script has to do what it should without interaction, its not a puppet problem. all you should need to do is copy the working rc script into the init.d dir and use the service resource to enable it and ensure its running. -- 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] run puppet service type with specific user
Take a look at http://www.yolinux.com/TUTORIALS/LinuxTutorialInitProcess.html I forget exactly the usage of the daemon but you need to include the functions, which is shown at the init script example. If you read that functions file it will give you an idea of how to use it to start up a service and have it run as a different user. On Sat, Sep 24, 2011 at 7:31 AM, Dieter De Meyer dieterdeme...@gmail.comwrote: Thanks for the reply. I modified the rc script to run as a user. But now I'm facing the following problem: I have to include some nasty puppet code for adding the service before i can use the service resource type. And the service resource type returns ok, but the service is in fact not started. When i do it manually, it requires a password for that user. So, I tried to manage the user with puppet and provided a password, but get the message: Provider useradd does not support features manages_passwords; not managing attribute password I know this is a problem with Puppet and CentOS, but I have ruby-shadow and shadow-utils installed on my CentOS 6.0 VM. I also don't know if this is going to help with starting the service. I want to use the service type to start the service with a specific user, but without asking for a password. Any help would be appreciated. Regards. -- 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/-/9sm5V3MccfoJ. 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] Using puppet to install debian packages from backports
Hello, with debian, provided you added backports.debian.org to your sources.list, you can install some fresher packages (say iceweasel) with the command apt-get install -t squeeze-backports iceweasel Is there anyway to do this using puppet ? Or maybe should I specify the required version of iceweasel. Maybe puppet will be smart enough to notice this version is only available from backports and install it ? Thank you from any help, Cheers Sebastien -- 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] run puppet service type with specific user
On Sat, Sep 24, 2011 at 04:02:22PM +0100, R.I.Pienaar wrote: - Original Message - Thanks for the reply. I modified the rc script to run as a user. But now I'm facing the following problem: I have to include some nasty puppet code for adding the service before i can use the service resource type. And the service resource type returns ok, but the service is in fact not started. When i do it manually, it requires a password for that user. So, I tried to manage the user with puppet and provided a password, but get the message: Provider useradd does not support features manages_passwords; not managing attribute password I know this is a problem with Puppet and CentOS, but I have ruby-shadow and shadow-utils installed on my CentOS 6.0 VM. I also don't know if this is going to help with starting the service. I want to use the service type to start the service with a specific user, but without asking for a password. you should use su in your script to switch users to the one the service should run as. Actually, runuser is better than su for use in init scripts. -- 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] Trying to get a basic connection going between master and agent
Hi all, I am trying to get a simple example going with one master and one puppet. I am on Debian and used apt-get install puppetmaster for the master and apt-get install puppet for the puppet. I was able to get the cert signed and imported to the master from the puppet. Now I am just trying to get a basic example like putting a fil in the /tmp directory on the puppet. I put the following in nodes.pp in /etc/ puppet/manifests/ node basenode { } node 'puppet-slave' inherits basenode { file {'testfile': path= '/tmp/testfile', ensure = present, mode= 0640, content = I'm a test file., } } I run puppet agent --onetime on the puppet but when I check /tmp the file testfile is not there. Any suggestions? -- 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] Gotchas around upgrading from an old version (0.25.4) to a newer version.
I've been tasked at my workplace to upgrade our puppet installation to a more modern version. Currently all the environments run a RubyGem version of puppet 0.25.4 on mostly RHEL/Centos 5.3 - 5.5 (there are, like most environments, a few laggards running RHEL4 or new machines running CentOS 6). The plan is to upgrade these to the most stable version of Puppet, which at the time of writing is 2.7.3. I plan on building RPMs on RHEL5.3 for Puppet 2.7.3 against the Ruby version that RHEL5 shipped with which is 1.8.5 I believe. Are there are any significant gotaches. My plan was to upgrade the server first and then do a few roll outs to some QA machines and see how it goes. However there is some concern in the group that 0.25.4 agents are unable to talk to a 2.7.3 server. Are these unfounded or true? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Could not render to pson: you must specify title patterns
Hi, I'm trying to add my first custom type to puppet largely copying examples whilst working with puppet-2.6.6. My error: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not render to pson: you must specify title patterns when there are two or more key attributes What is a title pattern? My extremely trivial files: The type metric http://pastebin.com/9F7sVYjp The provider lemon. http://pastebin.com/eJEvsV6v My addition of a class is then: metric{ '20002': ensure = present, provider = lemon, name = 'system.loadAvg' } -- Steve Traylen -- 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] run puppet service type with specific user
Thank you all for the replies. I will certainly look into it.. -- 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/-/4uAfGv7esQsJ. 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] centos puppet user resource type - provider useradd does not support features manages_passwords
Hello, I have a CentOS 6.0 Virtualbox VM to package as a Vagrant box for testing Puppet manifests. The problem i'm having is with the user resource type not working with CentOS. I keep having an error message when setting the password for a user. Provider useradd does not support features manages_passwords; not managing attribute password I have both ruby-shadow and shadow-utils installed which I found as a solution when googling. But it still doesn't work. When I run the following command, it returns false. So it doesn't seem to be installed. ruby -rpuppet -e 'puts Puppet.features.libshadow?' Am I missing something? Any help would be appreciated. Regards. -- 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/-/FefCuz7VKPoJ. 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] Templating question:
I thought I read in some documentation somewhere that for array variables you had a means of setting up a conditional for last element. For instance class foo { $hosts=['hosta','hostb','hostc'] file { some-config : path=/s/ome/path/2[image: Call phone]/ Invited♫ Invited♫ Invited♫ Invited♫ Invited♫ Invited♫ my/file, content = template(mytemplaste.erb) } } and the template % hosts.each do |host| -%% if_not_last_element %%= host %, % end % % if_last_element %%= host %% end % The result should end up as hosta,hostb,hostc Did I dream that or am I mixing up other templating tools I've used? -- Peter L. Berghold Owner, Shark River TechnicalSolutions LLC -- 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] Trying to get a basic connection going between master and agent
Run puppetd with the -v flag for verbose and see any errors printed. On Sep 24, 2011 12:16 PM, mlove mikelove...@gmail.com wrote: Hi all, I am trying to get a simple example going with one master and one puppet. I am on Debian and used apt-get install puppetmaster for the master and apt-get install puppet for the puppet. I was able to get the cert signed and imported to the master from the puppet. Now I am just trying to get a basic example like putting a fil in the /tmp directory on the puppet. I put the following in nodes.pp in /etc/ puppet/manifests/ node basenode { } node 'puppet-slave' inherits basenode { file {'testfile': path = '/tmp/testfile', ensure = present, mode = 0640, content = I'm a test file., } } I run puppet agent --onetime on the puppet but when I check /tmp the file testfile is not there. Any suggestions? -- 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: Templating question:
Peter, I'm not sure about your specific question but there is a much easier way of doing what you are trying to do. %= hosts.join(',') % That will replace your entire example template. :) On Sep 24, 2:33 pm, Peter Berghold salty.cowd...@gmail.com wrote: I thought I read in some documentation somewhere that for array variables you had a means of setting up a conditional for last element. For instance class foo { $hosts=['hosta','hostb','hostc'] file { some-config : path=/s/ome/path/2[image: Call phone]/ Invited♫ Invited♫ Invited♫ Invited♫ Invited♫ Invited♫ my/file, content = template(mytemplaste.erb) } } and the template % hosts.each do |host| -%% if_not_last_element %%= host %, % end % % if_last_element %%= host %% end % The result should end up as hosta,hostb,hostc Did I dream that or am I mixing up other templating tools I've used? -- Peter L. Berghold Owner, Shark River TechnicalSolutions LLC -- 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: Root User
Peter, are you using run stages? Your cyclical reference is probably related to the fact that every single file resource that installs a root-owned file has an implicit dependency on the root user. If you've got any root-owned files installed by stages that happen before the stage where you declared this, it will create a cycle. On Sep 23, 9:00 pm, Peter Berghold salty.cowd...@gmail.com wrote: Hi folks, I thought I'd get clever tonight and add to my base class for node configuation the statement: user { root : comment = Root User on ${hostname} } My hope was that I would change the GECOS field for the root user so that emails from root on the machines would identify which root they came from. What happened was the next run of the puppet agent resulted in a complaint of a cyclical reference. How do I get this to work without the cyclical reference? None of the classes that were listed as being part of the cyclical reference directly had dependencies on root, I'd imagine though there were implied references. -- Peter L. Berghold Owner, Shark River Technical Solutions LLC -- 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] Using puppet to install debian packages from backports
Hi, The options available to you are: * Try an exec that installs the package * try pinning the resource and push that to your apt config * try specifying version in the config To be honest I have not done any of these myself on debian style hosts. Cheers Den On 24/09/2011, at 8:06, Sébastien B. barthel...@crans.org wrote: Hello, with debian, provided you added backports.debian.org to your sources.list, you can install some fresher packages (say iceweasel) with the command apt-get install -t squeeze-backports iceweasel Is there anyway to do this using puppet ? Or maybe should I specify the required version of iceweasel. Maybe puppet will be smart enough to notice this version is only available from backports and install it ? Thank you from any help, Cheers Sebastien -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Templating question:
Hmmm looks suspiciously Perl-ish. ;) On Sep 24, 2011 4:19 PM, Steve Snodgrass phe...@gmail.com wrote: Peter, I'm not sure about your specific question but there is a much easier way of doing what you are trying to do. %= hosts.join(',') % That will replace your entire example template. :) On Sep 24, 2:33 pm, Peter Berghold salty.cowd...@gmail.com wrote: I thought I read in some docu... -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Templating question:
You must be new to Ruby. On Sep 24, 2011 3:30 PM, Peter Berghold salty.cowd...@gmail.com wrote: Hmmm looks suspiciously Perl-ish. ;) On Sep 24, 2011 4:19 PM, Steve Snodgrass phe...@gmail.com wrote: Peter, I'm not sure about your specific question but there is a much easier way of doing what you are trying to do. %= hosts.join(',') % That will replace your entire example template. :) On Sep 24, 2:33 pm, Peter Berghold salty.cowd...@gmail.com wrote: I thought I read in some docu... -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Official puppetlabs position on cron vs puppet as a service?
We had frequent inexplicable daemon crashes on Solaris, but not on RHEL5 (at least not yet) . Given known issues with memory leakage in older Ruby releases Cron seemed more likely to be reliable. We stuck a random wait in the Cron job to spread load on the master and so far it works well. On Sep 24, 2011 7:22 AM, treydock treyd...@gmail.com wrote: On Sep 23, 5:42 pm, Brian Gupta brian.gu...@brandorr.com wrote: Over the years many shops have come to start running puppet via cron to address memory leaks in earlier versions of Ruby, but the official position was that puppet was meant to be run as a continually running service. I am wondering if the official position has changed. On one hand many if not all of the early Ruby issues have been fixed, on the other, the addition of mcollective into the mix as a lightweight agent for triggering adhoc puppet runs, and other tasks somewhat lowers the requirements for puppet to be run as a service. (Or out of cron for that matter). I understand that in cases where old Ruby versions are for whatever reason mandated the answer may be different. Thanks, Brian -- http://aws.amazon.com/solutions/solution-providers/brandorr/ Could those memory leak problems cause the Puppet daemon to crash with no logs indicating why? I have about 20 systems all running CentOS 5 and 6, with Puppet 2.6.9, and I now have to have Zabbix run a /etc/ init.d/puppet start everytime the daemon crashes which is almost on a daily basis for every client. Would be interested to know of a known fix or if the only fix is the workaround of using Cron. Thanks - Trey -- 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.