Re: [Puppet Users] passing variables to static files
As another option, I believe you can use: file { "/etc/abc.conf": ensure => present content => "rundir= /central/$hostname/\nlogdir= $hostname.log" } - Jeff On 06/18/2010 01:49 PM, Nigel Kersten wrote: On Fri, Jun 18, 2010 at 11:47 AM, CraftyTech wrote: Hello All, I have quick question for you; How can I pass a variable to a static file that I'm distributing via puppet? i.g, : class abc { file { "/etc/abc.conf": ensure => present source => "puppet:///sys/abc.conf} } puppet:///sys/abc.conf contains : rundir= /central/$hostname/ logdir= $hostname.log Can this be done? You should probably look at using templates instead. http://projects.reductivelabs.com/projects/puppet/wiki/Puppet_Templating -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Puppetmaster with stored configs leaks file descriptors on CentOS 5
I'm having the same issue on CentOS5.2 with the following packages: *yum* puppet-0.25.5-1.el5 puppet-server-0.25.5-1.el5 rubygems-1.3.1-1.el5 ruby-shadow-1.4.1-7.el5 ruby-devel-1.8.6.111-1 ruby-1.8.6.111-1 ruby-ri-1.8.6.111-1 ruby-docs-1.8.5-5.el5_3.7 ruby-augeas-0.3.0-1.el5 ruby-irb-1.8.6.111-1 ruby-rdoc-1.8.6.111-1 ruby-mode-1.8.5-5.el5_3.7 libselinux-ruby-1.33.4-5.5.el5 ruby-libs-1.8.6.111-1 *gem* activerecord (2.3.8, 2.3.4) activeresource (2.3.8) activesupport (2.3.8, 2.3.4) mysql (2.8.1) rack (1.1.0) rails (2.3.8) Suggestions? On Thu, Apr 29, 2010 at 10:58 AM, Arnaud Gomes-do-Vale < arnaud.go...@ircam.fr> wrote: > Christopher writes: > > > I ran into this same thing. Update (rebuild) to the following rpms > > versions from fedora 11: > > > > rubygem-activerecord.noarch 1:2.3.2-4.fc11 > > rubygem-activesupport.noarch1:2.3.2-2.fc11 > > rubygem-rack.noarch 1.0.0-1.fc11 > > Thanks, this fixed the issue. > > -- > Arnaud > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-us...@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- Jason Koppe jason.robert.ko...@gmail.com Cell (210) 445-8242 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Get started with Puppet Development - the DeveloperBootstrap module
Hi all We've created a little module to help people interested in developing, testing or working on the Puppet source: http://forge.puppetlabs.com/puppetlabs/DeveloperBootstrap This module installs everything someone needs on Red Hat, Fedora, CentOS, Debian, Ubuntu or Solaris in order to develop or test Puppet source code. After that all you need to do it check-out the source and hack away: $ git clone git://github.com/reductivelabs/puppet.git This is the initial release and I'd welcome any feedback or comments (or bugs! :) ) via email either directly to me or to the fo...@puppetlabs.com email address. Thanks James Turnbull -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: passing variables to static files
Yeah, that looks better. Thanks. On Jun 18, 2:49 pm, Nigel Kersten wrote: > On Fri, Jun 18, 2010 at 11:47 AM, CraftyTech wrote: > > Hello All, > > > I have quick question for you; How can I pass a variable to a > > static file that I'm distributing via puppet? i.g, : > > class abc { > > file { "/etc/abc.conf": > > ensure => present > > source => "puppet:///sys/abc.conf} > > } > > > puppet:///sys/abc.conf contains : > > > rundir= /central/$hostname/ > > logdir= $hostname.log > > > Can this be done? > > You should probably look at using templates instead. > > http://projects.reductivelabs.com/projects/puppet/wiki/Puppet_Templating > > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Puppet Users" group. > > To post to this group, send email to puppet-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > puppet-users+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/puppet-users?hl=en. > > -- > nigel -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] passing variables to static files
On Fri, Jun 18, 2010 at 11:47 AM, CraftyTech wrote: > Hello All, > > I have quick question for you; How can I pass a variable to a > static file that I'm distributing via puppet? i.g, : > class abc { > file { "/etc/abc.conf": > ensure => present > source => "puppet:///sys/abc.conf} > } > > > puppet:///sys/abc.conf contains : > > rundir= /central/$hostname/ > logdir= $hostname.log > > Can this be done? You should probably look at using templates instead. http://projects.reductivelabs.com/projects/puppet/wiki/Puppet_Templating > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-us...@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- nigel -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] passing variables to static files
Hello All, I have quick question for you; How can I pass a variable to a static file that I'm distributing via puppet? i.g, : class abc { file { "/etc/abc.conf": ensure => present source => "puppet:///sys/abc.conf} } puppet:///sys/abc.conf contains : rundir= /central/$hostname/ logdir= $hostname.log Can this be done? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] node inheritance for external nodes
Is it possible to express node inheritance when using external nodes. If it is could someone post what the yaml might look like? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Multiple environments and mail
On 06/18/2010 02:18 PM, Nigel Kersten wrote: On Fri, Jun 18, 2010 at 10:34 AM, Robert Scheer wrote: To facilitate developing, testing and releasing puppet code, we use different environments. That works very well. The only problem is that I cannot prevent puppet from mailing a report, nor direct it somewhere else, when using a different environment. Unfortunately, tagmail does not do per-environment settings. I put in a feature request for this a while ago, go thumbs it up! -- Joe McDonagh AIM: YoosingYoonickz IRC: joe-mac on freenode "When the going gets weird, the weird turn pro." -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Multiple environments and mail
On Fri, Jun 18, 2010 at 10:34 AM, Robert Scheer wrote: > To facilitate developing, testing and releasing puppet code, we use > different environments. That works very well. The only problem is that > I cannot prevent puppet from mailing a report, nor direct it somewhere > else, when using a different environment. > > The file /etc/puppet/puppet.conf on the puppetmaster looks like this: > -- > [main] > logdir=/var/log/puppet > vardir=/var/lib/puppet > ssldir=/etc/puppet/ssl > rundir=/var/run/puppet > factpath=$vardir/lib/facter > pluginsync=true > templatedir=$confdir/templates > color=false > > [puppetmasterd] > autosign=false > verbose=true > reports=log,store,tagmail > > [userxxx] > manifestdir=/usr/home/userxxx/svn/puppet/manifests > manifest=/usr/home/userxxx/svn/puppet/manifests/site.pp > modulepath = /usr/home/userxxx/svn/puppet/modules > > [useryyy] > manifestdir=/usr/home/useryyy/svn/puppet/manifests > manifest=/usr/home/useryyy/svn/puppet/manifests/site.pp > modulepath=/usr/home/useryyy/svn/puppet/modules > -- > > > The file /etc/puppet/tagmail.conf contains: > -- > all: adm...@ourdomain > -- > > > The line "reports=log,store,tagmail" under [puppetmasterd] is what we want > for production: if something changes, then adm...@ourdomain get a puppet > report. So far so good. > > Now userxxx is has written a new module and is testing his code on a > node called testbox. He runs: "puppetd --environment=userxxx --debug". > This generates a puppet report to adm...@ourdomain. But the admins do > not want to receive this report every time somebody else tests his/her > code. Of course every admin could filter away these mails, but that > is not a real solution. > > Adding the option --report=false to puppetd has no effect. Have you tried --no-report ? > Adding "report=false" to [userxxx] has no effect. > Adding "reports=log" to [userxxx] has no effect. > Adding "tagmap=/usr/home/userxxx/svn/puppet/tagmail.conf" to [userxxx] has > no effect. The new tagmap (with another address in it) is completely > ignored. Puppet still looks for /etc/puppet/tagmail.conf > > Is this a bug or am I doing something wrong here? > We are using puppet 0.25.4 on both the master and client nodes. This could be a bug, I don't use tagmail reports, but it just hit me that it's probably reasonable for --test to imply --no-report as well as the other things it implies. > > > Robert Scheer > XS4ALL System Administration > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-us...@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- nigel -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] custom facts in legacy puppet 0.24.[89]
Hi all! How i may use in legacy puppet (0.24.[89]) custom facts in functions? In new documentation not good faq about this: http://docs.reductivelabs.com/guides/plugins_in_modules.html this documentation has information about new versions (25.5) and very old (prior 0.24.4), not about our 0.24.8 0.24.9 (we in migration now, we don'nt may change version to 25.[0-9] in production now becouse compability) Also i try http://projects.puppetlabs.com/projects/puppet/wiki/Adding_Facts my version of puppet don't know key of t and, my puppet don't retrive facts. I'm put facts in dir: //plugins/facter also, i have module mod_mysql, and put fact: /path_to_modules_of_this_enviroment/mod_mysql/plugins/facter/mysql.rb http://paste.org.ru/?0rs4fb but client does'nt see this fact i add in config of this enviroment option of pluginsync also, i try add this fact in dir: /usr/lib/ruby/site_ruby/1.8/facter manually. Config of puppet enviroment and code of fact: [r...@puppet2 facter]# cat /var/lib/puppet/modules/modules_development/ mod_mysql/plugins/facter/mysql.rb Facter.add("mysql_exists") do ENV["PATH"]="/bin:/sbin:/usr/bin:/usr/sbin" setcode do mysqlexists = system "which mysql > /dev/null 2>&1" ($?.exitstatus == 0) end end [r...@puppet2 facter]# [r...@puppet2 facter]# cat /etc/puppet/puppet.conf | grep -A4 "\ [development" [development] pluginsync = true modulepath = /etc/puppet/projects:/var/lib/puppet/modules/ modules_development manifest = /etc/puppet/manifests/development_site.pp [r...@puppet2 facter]# -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Multiple environments and mail
To facilitate developing, testing and releasing puppet code, we use different environments. That works very well. The only problem is that I cannot prevent puppet from mailing a report, nor direct it somewhere else, when using a different environment. The file /etc/puppet/puppet.conf on the puppetmaster looks like this: -- [main] logdir=/var/log/puppet vardir=/var/lib/puppet ssldir=/etc/puppet/ssl rundir=/var/run/puppet factpath=$vardir/lib/facter pluginsync=true templatedir=$confdir/templates color=false [puppetmasterd] autosign=false verbose=true reports=log,store,tagmail [userxxx] manifestdir=/usr/home/userxxx/svn/puppet/manifests manifest=/usr/home/userxxx/svn/puppet/manifests/site.pp modulepath = /usr/home/userxxx/svn/puppet/modules [useryyy] manifestdir=/usr/home/useryyy/svn/puppet/manifests manifest=/usr/home/useryyy/svn/puppet/manifests/site.pp modulepath=/usr/home/useryyy/svn/puppet/modules -- The file /etc/puppet/tagmail.conf contains: -- all:adm...@ourdomain -- The line "reports=log,store,tagmail" under [puppetmasterd] is what we want for production: if something changes, then adm...@ourdomain get a puppet report. So far so good. Now userxxx is has written a new module and is testing his code on a node called testbox. He runs: "puppetd --environment=userxxx --debug". This generates a puppet report to adm...@ourdomain. But the admins do not want to receive this report every time somebody else tests his/her code. Of course every admin could filter away these mails, but that is not a real solution. Adding the option --report=false to puppetd has no effect. Adding "report=false" to [userxxx] has no effect. Adding "reports=log" to [userxxx] has no effect. Adding "tagmap=/usr/home/userxxx/svn/puppet/tagmail.conf" to [userxxx] has no effect. The new tagmap (with another address in it) is completely ignored. Puppet still looks for /etc/puppet/tagmail.conf Is this a bug or am I doing something wrong here? We are using puppet 0.25.4 on both the master and client nodes. Robert Scheer XS4ALL System Administration -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: Failed to retrieve current state of resource error on one module
To follow up, I had absolutely been looking at the problem for too long. The filenames were snmpd.conf and snmpd.options, so I was just missing the d. -Aaron On Thu, Jun 17, 2010 at 4:44 PM, Aaron Blew wrote: > I'm getting the following errors in the module I'm writing to maintain my > snmpd configurations (this is a mis of verbose and normal errors): > > err: //snmp/File[/etc/sysconfig/snmpd.options]: Failed to retrieve current > state of resource: Could not retrieve information from source(s) > puppet:///snmp/snmp.options at /etc/puppet/modules/snmp/manifests/init.pp:25 > Jun 17 16:36:46 ab-puppetclient puppetd[5602]: > (//snmp/File[/etc/sysconfig/snmpd.options]) Failed to retrieve current state > of resource: Could not retrieve information from source(s) > puppet:///snmp/snmp.options at /etc/puppet/modules/snmp/manifests/init.pp:25 > err: //snmp/File[/etc/snmp/snmpd.conf]: Failed to retrieve current state of > resource: Could not retrieve information from source(s) > puppet:///snmp/snmp.conf at /etc/puppet/modules/snmp/manifests/init.pp:14 > Jun 17 16:36:57 ab-puppetclient puppetd[5602]: > (//snmp/File[/etc/snmp/snmpd.conf]) Failed to retrieve current state of > resource: Could not retrieve information from source(s) > puppet:///snmp/snmp.conf at /etc/puppet/modules/snmp/manifests/init.pp:14 > > Here's my manifest: > class snmp { > # Make sure SNMP is installed. net-snmp-utils grabs all the right > bits. > package { "net-snmp": > name=> "net-snmp-utils", > ensure => "installed", > } > > file { "/etc/snmp/snmpd.conf": > owner => "root", > group => "root", > mode=> 640, > source => "puppet:///snmp/snmp.conf", > require => Package["net-snmp"], > } > > # We won't need the .options file on non-linux boxes > case $kernel { > "Linux": { > file { "/etc/sysconfig/snmpd.options": > owner => "root", > group => "root", > mode=> 640, > source => "puppet:///snmp/snmp.options", > require => Package["net-snmp"], > } > } > } > } > > I've got other modules successfully retrieving files with very similar file > resource calls. I'm kind of stumped! Hopefully I've just been staring at > this for too long and someone will see the obvious thing that I'm missing. > > Thanks all, > -Aaron > > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Composed custom facts, request for opinions and ideas (somewhat related to setting up puppet)
- "Silviu Paragina" wrote: > > > I've been left with the impression that if augeas fails for provider > reasons it fails the whole run. > > My test case would imply the same thing. > > sil...@puppet-test:/etc/puppet/repo/development/modules/puppet$ cat > test.pp > augeas > { "puppet settings": > context => "/files/etc/puppet/puppet.conf", > changes => [ "set main/report true", > "set main/server puppet.paragina.ro",], > } > > > exec > { "/test.sh": > } > sil...@puppet-test:/etc/puppet/repo/development/modules/puppet$ cat > /test.sh > #!/bin/sh > > date >> /touchme > exit 1 > sil...@puppet-test:/etc/puppet/repo/development/modules/puppet$ sudo > puppet test.pp \ > > > warning: Could not retrieve fact fqdn > Could not find a default provider for augeas > sil...@puppet-test:/etc/puppet/repo/development/modules/puppet$ ls > /touchme > ls: cannot access /touchme: No such file or directory > > There is no dependency between them yet the exec resource wasn't > applied. If I remember right, the issue with this was that the run > failed without installing augeas and the machine would be left in a > ever > failing state. > At puppetcamp Luke said the cron issue is a bug and if someone files it, they'll fix it. You should be able to install package{"cron":} in a run and later in the same run make crontabs if those resources require => Package["cron"] -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Composed custom facts, request for opinions and ideas (somewhat related to setting up puppet)
On Wed, Jun 16, 2010 at 21:27 +0300, Silviu Paragina wrote: > So are there any better ideeas? Not a better idea, just another idea: We simply repackaged facter with lsb-release as extra dependency. As we already have our own package repository to install software released by our developers, this hardly cost any effort. Regards, Robert Scheer XS4ALL System Administration -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Composed custom facts, request for opinions and ideas (somewhat related to setting up puppet)
On 17.06.2010 14:30, David Schmitt wrote: On 6/17/2010 1:02 PM, Silviu Paragina wrote: On 17.06.2010 10:53, David Schmitt wrote: On 6/16/2010 8:27 PM, Silviu Paragina wrote: This is somewhat related to an older thread. The topic was how to install some perquisite packages for puppet, like augeas, lsb-release, cron to name just a few. Puppet is required to reinstall this packages if they are accidentally uninstalled. Because of the nature of this packages some puppet code should not run in this state. /For example/ if lsb-release isn't installed, and clients are both ubuntu and debian, the apt package shouldn't setup sources as it might end up switching the distro. (if lsb-release isn't installed facter can not distinguish debian from ubuntu) Augeas resources if are included in the run end up failing the run, thus not allowing augeas to be installed. The following case will fail, is lsb-release is not installed: case $lsbdistcodename { "lenny": {...} "lucid": {...} } Wouldn't that be enough? Best Regards, David Interesting ideea. That should actually do for lsb-release, but how about for augeas/cron. (I have a similar fact for augeas) My ideea was to disable any sensitive puppet code in case of some sanity checks failing. The types should fail if no provider can be found. This in turn should fail all depending resources (e.g. require => Augeas[...] ). Can you provide a specific example? Best Regards, David I've been left with the impression that if augeas fails for provider reasons it fails the whole run. My test case would imply the same thing. sil...@puppet-test:/etc/puppet/repo/development/modules/puppet$ cat test.pp augeas { "puppet settings": context => "/files/etc/puppet/puppet.conf", changes => [ "set main/report true", "set main/server puppet.paragina.ro",], } exec { "/test.sh": } sil...@puppet-test:/etc/puppet/repo/development/modules/puppet$ cat /test.sh #!/bin/sh date >> /touchme exit 1 sil...@puppet-test:/etc/puppet/repo/development/modules/puppet$ sudo puppet test.pp \ > warning: Could not retrieve fact fqdn Could not find a default provider for augeas sil...@puppet-test:/etc/puppet/repo/development/modules/puppet$ ls /touchme ls: cannot access /touchme: No such file or directory There is no dependency between them yet the exec resource wasn't applied. If I remember right, the issue with this was that the run failed without installing augeas and the machine would be left in a ever failing state. Silviu -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Could not find class, code-blind
Darn it. now I see the typo. I looked at your comment for 5 mins before i noticed. Oh well :) Thanks alot! On 17 June 2010 19:55, Gabriel Filion wrote: > On 2010-06-17 06:31, Tore wrote: > > I'm troubled with a node-definition not able to resolve a class: > > Could not find class rhnsd::common at /etc/puppet/manifests/nodes.pp: > > 8 on node X > > > > Content of manifest/site.pp: > > import "nodes.pp" > > [...] > > > > The layout of modules/rhnsd/ is: > > |-- files > > | `-- up2date-rhn > > |-- manifests > > | |-- client.pp > > | |-- common.pp > > | |-- init.pp > > | `-- rhn.pp > > > > A `cat' from each manifest file: > > client.pp:: > > class rhnds::client inherits rhnsd::common { > > > > service { "rhnsd": > > ensure => running, > > enable => true, > > hasrestart => true, > > hasstatus => true, > > require => [ Package["rhnsd"], File["/etc/ > > sysconfig/rhn/up2date"] ], > > subscribe => File["/etc/sysconfig/rhn/up2date"], > > } > > > > } > > > > common.pp:: > > class rhnds::common inherits rhnsd { > ^-- > > If you really pasted this, then here is your error ;) > > I saw the same typo in client.pp higher up. > > > > > if ($operatingsystem != 'RedHat') { > > fail("${fqdn} is not an RedHat OS, it is $ > > {operatingsystem}. Unable to apply module RHN, since it is only used > > on RedHat based systems") > > } > > > > if ($lsbmajdistrelease != '5') { > > fail("${fqdn} is not a 5-major release from RedHat. > > Puppet modules for other major releases have not been made yet.") > > } > > > > $rhn_client_requirements = $lsbmajdistrelease ? { > > 5 => [ 'yum', 'rhn_register', 'rhnsd' ], > > 4 => [ 'yum', 'up2date', 'rhnsd' ], > > } > > > > package { $rhn_client_requirements: > > ensure => present, > > } > > > > } > > > > init.pp:: > > class rhnsd { > > > > } > > > > > > client.pp:: > > class rhnsd::client::rhn inherits rhnsd::client { > > > > file { "/etc/sysconfig/rhn/up2date": > > ensure => present, > > source => "puppet:///rhn/up2date-rhn", > > require => File["/usr/share/rhn/RHNS-CA-CERT"], > > } > > > > file { "/usr/share/rhn/RHNS-CA-CERT-VISMA": > > ensure => present, > > source => "puppet:///rhn/RHNS-CA-CERT", > > } > > > > } > > > > > > Why wont this work, I know it must be an small error, but right now im > > code-blind, it sucks. > > > > Thanks for your help > > > > > -- > Gabriel Filion > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Re: Foreman / external_node.rb
It looks like it's working now This is what I get when I click on yaml ... --- parameters: puppetmaster: puppet classes: [] environment: "" It doesn't let me edit it thought... It seems to be static.. On Jun 17, 9:54 pm, Ohad Levy wrote: > that is not a limitation, and usually actually works :) > > can you check that you get the right output with curl/wget - e.g.? > > curl -khttps://foreman/node/fqdn?format=yml(add -x "" to disable curl > using a proxy) > > Ohad > > On Fri, Jun 18, 2010 at 9:28 AM, CraftyTech wrote: > > Well I got foreman.rb to work with https. Look at this thread: > > >http://groups.google.com/group/puppet-users/browse_thread/thread/1d2b... > > > I'd like to know what the deal is with node.rb I hope I'm doing > > something wrong, and that this is not a limitation.. :) > > > On Jun 17, 9:06 pm, Mohamed Lrhazi wrote: > > > I think I have the same problem the scripts bundled with foreman, > > > those that talk to the web interface, do not seem to support https... > > > I set up an apache virtual on localhost with ssl disabled and > > > configured these scripts to speak to that. that seems to do it. > > > > Can someone confirm this limitation or are these scripts supposed to > > > work with both http and https. > > > The scripts am referring to are: node.rb, push_facts.rb and foreman.rb > > (reports) > > > > Thanks a lot. > > > Mohamed. > > > > On Thu, Jun 17, 2010 at 11:44 AM, CraftyTech wrote: > > > > Hello Ohad, > > > > > I started it with webrick on port 80, and it appears to work. > > > > This what I get when I run the command /etc/puppet/external_node.rb > > > > host: > > > > > --- > > > > parameters: > > > > puppetmaster: puppet > > > > classes: [] > > > > > environment: "" > > > > > Does that mean it works on webrick but not on apache/passenger:443? > > > > > On Jun 17, 11:00 am, Ohad Levy wrote: > > > >> Just to be on the safe side, does it work if you use it with http > > (instead > > > >> of https)? > > > >> additionally, you should be using it with fqdn as the parameter (e.g. > > > >> /etc/puppet/external_node.rb fqdn ) > > > > >> Ohad > > > > >> On Thu, Jun 17, 2010 at 10:48 PM, CraftyTech > > wrote: > > > >> > Hello All, > > > > >> > I'm trying to start using external nodes under foreman, and I'm > > > >> > running into some issues. I have the entries in puppet.conf: > > > > >> > [main] > > > >> > external_nodes = /etc/puppet/external_node.rb > > > >> > node_terminus = exec > > > > >> > The enternal_node.rb script is the one that came with foreman: > > > > >> > #!/usr/bin/ruby > > > >> > # a simple script which fetches external nodes from Foreman > > > >> > # you can basically use anything that knows how to get http data, > > e.g. > > > >> > wget/curl etc. > > > > >> > # Foreman url > > > >> > foreman_url="https://hostname:443"; > > > > >> > require 'net/http' > > > > >> > foreman_url += "/node/#{ARGV[0]}?format=yml" > > > >> > url = URI.parse(foreman_url) > > > >> > req = Net::HTTP::Get.new(foreman_url) > > > >> > res = Net::HTTP.start(url.host, url.port) { |http| > > > >> > http.request(req) > > > >> > } > > > > >> > case res > > > >> > when Net::HTTPOK > > > >> > puts res.body > > > >> > else > > > >> > $stderr.puts "Error retrieving node %s: %s" % [ARGV[0], res.class] > > > >> > end > > > ## > > > > >> > When I run it against a node, which I already took off the internal > > > >> > node definitions, I get the following error: > > > > >> > /etc/puppet/external_node.rb hostname > > > >> > /usr/lib/ruby/1.8/net/http.rb:2022:in `read_status_line': wrong > > status > > > >> > line: " > > >> > \">" (Net::HTTPBadResponse) > > > >> > from /usr/lib/ruby/1.8/net/http.rb:2009:in `read_new' > > > >> > from /usr/lib/ruby/1.8/net/http.rb:1050:in `request' > > > >> > from /etc/puppet/external_node.rb:14 > > > >> > from /usr/lib/ruby/1.8/net/http.rb:543:in `start' > > > >> > from /usr/lib/ruby/1.8/net/http.rb:440:in `start' > > > >> > from /etc/puppet/external_node.rb:13 > > > > >> > I went over the documentation meticulously before posting, but > > > >> > obviously I'm still missing something. Can anyone shed some light > > on > > > >> > this? > > > > >> > Thanks, > > > > >> > -- > > > >> > You received this message because you are subscribed to the Google > > Groups > > > >> > "Puppet Users" group. > > > >> > To post to this group, send email to puppet-us...@googlegroups.com. > > > >> > To unsubscribe from this group, send email to > > > >> > puppet-users+unsubscr...@googlegroups.com > > > > > > >> > . > > > >> > For more options, visit this group at > > > >> >http://groups.google.com/group/puppet-users?hl=en. > > > > > -- > > > > You received this message because you are subscribed to the Google > > Groups "Puppet Users" group. > > > > To post to this group, send email to puppet-us...@googlegroups.com. > > > > To unsubscri
Re: [Puppet Users] Augeas problem changing values in postfix/main.cf
Thanks Patrick! I like the separation of the values being set and adding the comments. That makes complete sense. As for the over-writing of the values, you were absolutely right. The main.cf was being managed by a different class that another Ops engineer had implemented and I was unaware of. I did away with Augeas after detecting that. Regards, John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] User Password
Hi, IMHO the best way will be to develop a small fact that indicates whether it's a prod or non-prod environment and use it in the ressource to select the right password : user {"my-user": ensure => present, password => $yourfact ? { 'prod' => 'production-password', 'non-prod' => 'non-production-password', }, ... } Note that the fact used for the selection could be also the hostname of the server or anything other that can determine if it's a prod or non-prod environment. Cheers, Mathieu On Fri, Jun 18, 2010 at 5:50 AM, Marek Dohojda wrote: > Hello > > Is there any way to have a user with two different passwords. > > I have a user that is present in our prod and non prod environments. > However the password for non-prod is different than prod. Anyway I can > arrange that in puppet? > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-us...@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.