[Puppet Users] Re: collecting resources for iteration in a template

2012-04-16 Thread Wil Cooley
On Apr 16, 1:45 am, Jonathon Anderson  wrote:
> I have a `sysctl::variable` defined type that creates files in
> `/etc/sysctl.d`.  Some operating systems (*cough*SLES10*cough*) don't read
> sysctl settings from `/etc/sysctl.d`, though, and expect all settings to be
> in a single file, `/etc/sysctl.conf`.  For such operating systems, I'd like
> to define the content of that file with a template that references the
> values of the `sysctl::variable`s.
>
> In the Puppet DSL I can collect all fragments with language like
> `Sysctl::Variable<| |>`.  How can I do something similar in a template such
> that I can access the variable names and values?  For example:

Have you considered instead using something like the "file fragment
pattern"? Basically, you add 'notifiy' to sysctl::variable resources
to notify an exec that rebuilds sysctl.conf from sysctl.d (basically
"cat /etc/sysctl.d/*.conf > /etc/sysctl.conf").

http://projects.puppetlabs.com/projects/puppet/wiki/Generating_a_config_file_from_fragments

(I'm not sure the special concatenation script is really necessary;
you can have the exec notify the service to reload if necessary and
the 'for' loop is unnecessary with shell wildcards. At least, that's
how we do it at work.)

Wil

-- 
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] This worked for me

2012-04-16 Thread Steve Shipway
Thankyou - this was a great help, and fixed my issue straight off.
Good to know about the version problem.
Steve

-- 
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: Question regarding multi-OS NTP manifest

2012-04-16 Thread Wil Cooley
On Apr 15, 4:44 pm, Jesse  wrote:

> case $operatingsystem {
>     centos, redhat: { $ntp = "ntp" }
>     debain, ubuntu: { $ntp = "ntpd" }

This is backwards; centos/redhat should be 'ntpd' and debian/ubuntu
should be 'ntp'.

> if $ntp == 'ntp' {
>   service { 'ntp':
>     name       => $ntp,
>     ensure     => running,
>     enable     => true,
>     hasrestart => true,
>     hasstatus  => true,
>   }}
>
> else {
>     service { 'ntpd':
>       name       => $ntp,
>       ensure     => running,
>       enable     => true,
>       hasstatus  => true,
>       hasrestart => true,
>     }
>   }

This conditional is redundant. I think it's better to use one resource
name and change the "name" attribute with the variable as you have
done (although I would a more explicit variable name like
'$ntp_service'):

service { 'ntp':
  name => $ntp_service,
  ...
}


> err: /Stage[main]//Service[ntp]/ensure: change from stopped to running
> failed: Could not start Service[ntp]: Execution of '/sbin/service ntp
> start' returned 1:  at /root/learning-manifests/ntp.pp:24

This is because of the reversal I mentioned above; it should be 'ntpd'
on CentOS, not 'ntp'.

> When I run the vanilla script, everything configures correctly and
> ntp(d) is started. Why is my second script using /sbin when it seems
> that it should be using /etc/init.d/?

Have you tried 'man service'? '/sbin/service' is a way of running init
scripts with a sanitized environment and is the preferred way of
running init scripts rather than doing so directly.

http://linux.die.net/man/8/service

-- 
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: Requiring defines from other classes in a fact

2012-04-16 Thread Wil Cooley
On Apr 16, 2:39 pm, Boudewijn Ector 
wrote:

> Very very simple, except for the fact that I want to add the
> dependency for the mysql::database too. I'm using this excellent
> module for managing mysql:https://github.com/camptocamp/puppet-mysql
>
> Is there a neat way to do something like this
>
>       service{"openca":
>            ...
>            requires => [Package["openca"],mysql::database["openca"]],
>       }
>
> I already tried doing this, and also tried dependency chaining, but
> just can't get it to work at all.

You've almost got it here; you need to use reference syntax for the
mysql::database resource just like you do for the package:

    requires => [Package["openca"],Mysql::Database["openca"]],

Wil

-- 
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] Failed to parse template ... private method 'split' called for :undef:Symbol - github - puppetlabs/puppet-dhcp

2012-04-16 Thread Peter J. Foley
Hi Puppet Users,

Puppet Version - v2.7.13
Ruby Version - ruby 1.8.7 (2010-08-16 patchlevel 302) [i486-linux]

I am trying to use the Puppetlabs DHCP module 
(https://github.com/puppetlabs/puppet-dhcp) to setup a DHCP server on one of my 
nodes.

I have followed the example in the readme.md file in my node declaration for 
the server (extracted part below)

  class { 'dhcp':
dnsdomain=> ['dev.ifoley.local', '200.168.192.in-addr.arpa'],
nameservers  => ['192.168.200.1', '192.168.10.211'],
ntpservers   => ['titanium.ifoley.local', 'core.dev.ifoley.local'],
interfaces   => ['eth0'],
  }

  ### dhcp::pool Define the pool attributes

  dhcp::pool{ 'dev.ifoley.local':
network => '192.168.200.0',
mask=> '255.255.255.0',
range   => '192.168.200.11 192.168.200.20',
gateway => '192.168.200.1',
  }

To confirm everything is working I then try to manually initiate a puppet run

puppet apply -v /etc/puppet/manifests/nodes/core.dev.ifoley.local.pp

Which spits out an error message:

Failed to parse template dhcp/dhcpd.conf.erb: private method `split' called for 
:undef:Symbol at /etc/puppet/modules/dhcp/manifests/init.pp:46 on node 
core.dev.ifoley.local

In the template 
(https://github.com/puppetlabs/puppet-dhcp/blob/master/templates/dhcpd.conf.erb)
 there is only one location that uses a split method which is on the 
dnsupdatekey.  As you can see from the above class definition for dhcp I have 
not passed a dnsupdatekey.

I currently do not have DNS setup for Dynamic Updates so do not want to 
configure the DHCP server to update DNS.

The code that uses the split function should not be executed because it is 
protected by test to confirm that it is not undefined.  My question is am I 
doing something wrong?

Thanks,

Peter.

-- 
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] file resource

2012-04-16 Thread Denmat
Hi,

Use 

> file { "/opt/tarball_name-${version}.tar.gz" :

You then declare that with 
$version = 1.2.3 
 
See http://docs.puppetlabs.com/learning/variables.html for fuller explanation.

Den

On 17/04/2012, at 7:32, Eslam Mamdouh  wrote:

> Hi All,
> i'd like to define a file resource that transfers a tar ball that doesn't 
> have fixed name 
> actually tarball name will be  tarball_name-.tar.gz 
> 
> i tried to define file resouce as following using regex :
> file { "/opt/tarball_name*.tar.gz" :
> ...
> }
> but it seems that regex doesn't work with with file resource 
> so what do you suggest regarding this issue 
> 
> Thanks in advance 
> -- 
> Best Regards, 
> Eslam Mamdouh El Husseiny
> Systems Administrator
> Cloud Niners Ltd.
> 
> Cellular: (+2) 011 198 40 40
> Mansoura: (+2) 050 234 70 81
> Cairo:(+2) 022 268 34 60
> Fax:  (+2) 022 268 34 63
> 
> 
> 
> -- 
> 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] Having trouble getting puppet to set users/groups to a defined state

2012-04-16 Thread Steve Roberts
I'm hoping I'm just missing something simple.

I ran across this in my deployment setup and have replicated in a
simple set of manifests.  command output and the manifests below.

basically start with a user/group name but it had the name was
misspelled 'txuser'

so correct it to 'tuser' but puppet errors out saying the gid is a
dupe.

I thought one of the key ideas for puppet was the ability to define a
manifest and puppet would make the machine look like that manifest.

I checked the group resource documentation and didn't see an option to
say 'force' or something.

I'm thinking would also be a problem if someone locally edited /etc/
passwd and /etc/group the manifest would also fail.


[test00] ROOT 7:46pm Mon /tmp>puppet apply txuser.pp
notice: /Stage[main]//Group[txuser]/ensure: created
notice: /Stage[main]//User[txuser]/ensure: created
notice: Finished catalog run in 0.47 seconds
[test00] ROOT 7:47pm Mon /tmp>puppet apply tuser.pp
err: /Stage[main]//Group[tuser]/ensure: change from absent to present
failed: Could not create group tuser: Execution of '/usr/sbin/groupadd
-g 302 tuser' returned 4: groupadd: GID 302 is not unique

notice: /Stage[main]//User[tuser]: Dependency Group[tuser] has
failures: true
warning: /Stage[main]//User[tuser]: Skipping because of failed
dependencies
notice: Finished catalog run in 0.22 seconds
[test00] ROOT 7:47pm Mon /tmp>tail -n 100 txuser.pp tuser.pp
==> txuser.pp <==
  user { 'txuser':
ensure   => 'present',
comment  => 'Test User',
gid  => '302',
home => '/home/tuser',
password => '***',
password_max_age => '99000',
password_min_age => '5',
shell=> '/bin/tcsh',
uid  => '302',
  }
  group { 'txuser':
ensure => 'present',
gid=> '302',
  }

==> tuser.pp <==
  user { 'tuser':
ensure   => 'present',
comment  => 'Test User',
gid  => '302',
home => '/home/tuser',
password => '***',
password_max_age => '99000',
password_min_age => '5',
shell=> '/bin/tcsh',
uid  => '302',
  }
  group { 'tuser':
ensure => 'present',
gid=> '302',
  }

-- 
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 build Ruby 1.8.7 on a RHEL5 systems

2012-04-16 Thread Dan White
Old thread reference:
http://www.mail-archive.com/puppet-users@googlegroups.com/msg27199.html

I am trying to build Ruby 1.8.7 on a RHEL 5 system following the instructions 
in that thread and I have a few questions as I am a n00b to RPM building:

On Jan 4, 2012, at 8:04 PM, Jo Rhett wrote:
> wget http://rbel.frameos.org/stable/el5/SRPMS/ruby-1.8.7.352-5.el5.src.rpm
> rpm -i ruby-1.8.7.352-5.el5.src.rpm
> rpmbuild -ba ~/rpmbuild/SPECS/ruby.spec 
> 
> For any of the nodes, you need only put this RPM in your repository and have 
> Puppet upgrade them.  It just works ;-)

When I ran the rpmbuild command, I got no RPM's.
I got a bunch of error complaining about "rpaths", and in the output was a 
suggestion to prepend an environment setting to the command -- like this:

QA_RPATHS=$[ 0x0001|0x0010 ] rpmbuild -ba ~/rpmbuild/SPECS/ruby.spec

When I ran this, the previous errors were now warnings, and I got a set of 
RPM's.

Is this The Way It Works ?

Is it possible to eliminate the errors/warnings ?

Would a link to a PatchBin of the build output help ?

Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet-dev] Re: [Puppet Users] Telly: Nagios types moving into Module

2012-04-16 Thread Ashley Penney
This is kind of an argument against moving these things out of the core in
the first place in my opinion.  The fact that you can now have multiple
versions of the nagios provider is just worse than having a single copy.
 Before at least I could update to 2.7.x and be assured all my providers
were at the same version, now I have to deal with all the module updates
(which only grows as time goes on) and constantly deal with checking them
into git, managing them, testing them with various versions of the client.

I get why you're doing this but as an end user this is just causing me more
work and making me do more testing and a lot more management.  At least
before I could rely on having a broad set of core resources.  Now we're
going in the opposite direction.

Maybe I'm just a grouchy old sysadmin but now I can't just rely on
yum.puppetlabs.com to provide my resources and that means time out of my
day to update them and push them into git.  In the workflow we've
instigated at work I cannot just throw in an update and push it - I have to
create branches, run tests, open tickets.  With things provided by puppet's
core I just have to get approval to update the client in one easy push.

Maybe I'll just make /etc/puppet/modules/ for modules imported directly
from the forge (and unedited in any way) and instigate easier rules around
updating these.

Sorry if this turned into a bit of a "GET OFF MY LAWN" post.


On Mon, Apr 16, 2012 at 8:45 PM, Michael Stahnke wrote:

> On Mon, Apr 16, 2012 at 11:36 AM, Todd Zullinger  wrote:
> > Michael Stahnke wrote:
> >>
> >> For the next major Puppet version, code-named Telly, we have some
> changes
> >> coming.  This is the first in a series of emails around these changes
> and
> >> may require some input from the community.
> >>
> >> For Telly, the nagios types will be moved into a module.  This allows
> them
> >> to be iterated on in isolation from the rest of Puppet's core release
> cycle
> >> and process. In the future we have plans to move several other types
> into
> >> modules that can be individually maintained, improved, tested and used.
> >>
> >> The module for Nagios will be available on the Forge.
> >>
> >> The upgrade path is the thing we need some feedback about.  The basic
> >> steps to upgrade would be to setup a Telly master, and then install the
> >> Nagios module via the Puppet Module Tool, which ships integrated with
> >> 2.7.13+ and Telly.
> >
> >
> > Is it possible to package these modules for distros?  In the past, we've
> had
> > a few requests to do this for third-party modules but we didn't do this
> > because there wasn't really any standard for it.  With puppet module tool
> > being integrated now, perhaps that's something that can be reconsidered.
> >
> > I'm thinking that for folks using rpm, they'd rather see an update that
> > pulls in the same fucntionality as they had before.  And even for new
> > installs, I'd personally prefer to install these things via rpm.  If I
> > wanted to use a secondary package management system, I could use gems or
> > eggs or CPAN, but I don't. ;)
>
> Todd, welcome and I feel your pain.  Trust me, I pushed every way I
> could to use native packages as our module deliver mechanism.  However
> we have some odd requirements that make things not work as well with
> RPM (or deb, or gems).  Basically we need a mechanism to allow
> multiple versions installed into separate environments (paths on
> disk).  That sort of ruled out traditional packaging systems, without
> doing some installation and symlink-selection magic.  Even then, there
> were some issues.
>
> Something like pm2rpm and pm2deb is very likely something we'll need
> to make the lives of Puppet Users happy.  It should be fairly simple
> and we'll want to be sure that the default module path is something
> that is FHS compliant.
>
> We'll also want to work with Jordan and see if we can get packaging
> Puppet Modules (in this format) as an option with FPM.  I think FPM
> already does some Puppet Module stuff, so it may not need any real
> updates.
>
> Mike
>
>
>
> >
> > I think it's good to split out these things, as it would allow us to
> > properly add a nagios dep to the hypothetical puppet-module-nagios
> package.
> >
> > --
> > ToddOpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
> > ~~
> > I am free of all prejudice. I hate everyone equally.
> >-- W. C. Fields
> >
>
> --
> 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 pupp

Re: [Puppet-dev] Re: [Puppet Users] Telly: Nagios types moving into Module

2012-04-16 Thread Michael Stahnke
On Mon, Apr 16, 2012 at 11:36 AM, Todd Zullinger  wrote:
> Michael Stahnke wrote:
>>
>> For the next major Puppet version, code-named Telly, we have some changes
>> coming.  This is the first in a series of emails around these changes and
>> may require some input from the community.
>>
>> For Telly, the nagios types will be moved into a module.  This allows them
>> to be iterated on in isolation from the rest of Puppet's core release cycle
>> and process. In the future we have plans to move several other types into
>> modules that can be individually maintained, improved, tested and used.
>>
>> The module for Nagios will be available on the Forge.
>>
>> The upgrade path is the thing we need some feedback about.  The basic
>> steps to upgrade would be to setup a Telly master, and then install the
>> Nagios module via the Puppet Module Tool, which ships integrated with
>> 2.7.13+ and Telly.
>
>
> Is it possible to package these modules for distros?  In the past, we've had
> a few requests to do this for third-party modules but we didn't do this
> because there wasn't really any standard for it.  With puppet module tool
> being integrated now, perhaps that's something that can be reconsidered.
>
> I'm thinking that for folks using rpm, they'd rather see an update that
> pulls in the same fucntionality as they had before.  And even for new
> installs, I'd personally prefer to install these things via rpm.  If I
> wanted to use a secondary package management system, I could use gems or
> eggs or CPAN, but I don't. ;)

Todd, welcome and I feel your pain.  Trust me, I pushed every way I
could to use native packages as our module deliver mechanism.  However
we have some odd requirements that make things not work as well with
RPM (or deb, or gems).  Basically we need a mechanism to allow
multiple versions installed into separate environments (paths on
disk).  That sort of ruled out traditional packaging systems, without
doing some installation and symlink-selection magic.  Even then, there
were some issues.

Something like pm2rpm and pm2deb is very likely something we'll need
to make the lives of Puppet Users happy.  It should be fairly simple
and we'll want to be sure that the default module path is something
that is FHS compliant.

We'll also want to work with Jordan and see if we can get packaging
Puppet Modules (in this format) as an option with FPM.  I think FPM
already does some Puppet Module stuff, so it may not need any real
updates.

Mike



>
> I think it's good to split out these things, as it would allow us to
> properly add a nagios dep to the hypothetical puppet-module-nagios package.
>
> --
> Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
> ~~
> I am free of all prejudice. I hate everyone equally.
>    -- W. C. Fields
>

-- 
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 Learner

2012-04-16 Thread Walter Heck
If you are not running your agents in daemon mode, you can have a look
at mcollective. It allows you to define a set of servers that you want
to do a puppet run on.

cheers,

Walter

On Tue, Apr 17, 2012 at 05:31, OverDue Ocean  wrote:
> Hi Guys, Let me Introduce myself as  self learner and very new to
> puppet and I am sure that now on I am staying here in this group for
> long and keep asking questions,
>
> I am sorry if my message annoys you or if its a bit childish please
> forgive me but i believes that if you want to learn you should ask,
>
> My Question is :
>
> I have a server running puppet Master and 8 clients are connected with
> Master and every half an hour clients pulls up there configuration if
> requires from master and update themselves, but if need to restart
> Apache on 4 of them and have to restart varnish in the remaining 4 all
> in a sudden then how i will do that? do I need to wait for the next
> half an hour that clients connects with master and restart the service
> or is there any other way for doing so?
>
> --
> 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.
>



-- 
Walter Heck

--
follow @walterheck on twitter to see what I'm up to!
--
Check out my new startup: Server Monitoring as a Service @ http://tribily.com
Follow @tribily on Twitter and/or 'Like' our Facebook page at
http://www.facebook.com/tribily

-- 
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] Case statements in a file directive

2012-04-16 Thread Geoff Davis
You're pretty close. You don't want the case statement per se, but you do want 
a conditional:

file { "/usr/local/nagios/libexec":
  require => File['/usr/local/nagios'],
  ensure  => directory,
  owner   => 'root',
  group   => 'root',
  mode=> 655,
  recurse => true,
  source  => $::architecture {
/(i386|i586|i686/) => "puppet:///files/32/usr/local/nagios/libexec",
x86_64 => "puppet:///files/64/usr/local/nagios/libexec",
   
  }
}



On Apr 16, 2012, at 3:43 PM, Forrie wrote:

> I want to distribute a binary directory based upon whether the
> "architecture" is 32- or 64-bit.   It appears I cannot nest a case
> statement under file, however this is what I was attempting to do:
> 
>file { "/usr/local/nagios/libexec":
>require => File['/usr/local/nagios'],
>ensure  => directory,
>owner   => 'root',
>group   => 'root',
>mode=> 655,
>recurse => true,
> ## APPEARS I can't do this
>case $architecture {
>/(i386|i586|i686/): {
>source => "puppet:///files/32/usr/local/nagios/
> libexec"
>}
>x86_64: {
>source => "puppet:///files/64/usr/local/nagios/
> libexec"
>}
>}
>}
> 
> 
> I know I could reverse it and do a case first, then have redundant
> file {} declarations, but that seems just that, redundant.
> 
> Can anyone point out what I'm doing wrong here.   The output in the
> puppet logs isn't generally helpful with debugging.
> 
> 
> 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-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] Case statements in a file directive

2012-04-16 Thread Forrie
I want to distribute a binary directory based upon whether the
"architecture" is 32- or 64-bit.   It appears I cannot nest a case
statement under file, however this is what I was attempting to do:

file { "/usr/local/nagios/libexec":
require => File['/usr/local/nagios'],
ensure  => directory,
owner   => 'root',
group   => 'root',
mode=> 655,
recurse => true,
## APPEARS I can't do this
case $architecture {
/(i386|i586|i686/): {
source => "puppet:///files/32/usr/local/nagios/
libexec"
}
x86_64: {
source => "puppet:///files/64/usr/local/nagios/
libexec"
}
}
}


I know I could reverse it and do a case first, then have redundant
file {} declarations, but that seems just that, redundant.

Can anyone point out what I'm doing wrong here.   The output in the
puppet logs isn't generally helpful with debugging.


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-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-dev] Re: [Puppet Users] Telly: Nagios types moving into Module

2012-04-16 Thread Nigel Kersten
On Mon, Apr 16, 2012 at 11:36 AM, Todd Zullinger  wrote:

> Michael Stahnke wrote:
>
>> For the next major Puppet version, code-named Telly, we have some changes
>> coming.  This is the first in a series of emails around these changes and
>> may require some input from the community.
>>
>> For Telly, the nagios types will be moved into a module.  This allows
>> them to be iterated on in isolation from the rest of Puppet's core release
>> cycle and process. In the future we have plans to move several other types
>> into modules that can be individually maintained, improved, tested and used.
>>
>> The module for Nagios will be available on the Forge.
>>
>> The upgrade path is the thing we need some feedback about.  The basic
>> steps to upgrade would be to setup a Telly master, and then install the
>> Nagios module via the Puppet Module Tool, which ships integrated with
>> 2.7.13+ and Telly.
>>
>
> Is it possible to package these modules for distros?  In the past, we've
> had a few requests to do this for third-party modules but we didn't do this
> because there wasn't really any standard for it.  With puppet module tool
> being integrated now, perhaps that's something that can be reconsidered.
>
> I'm thinking that for folks using rpm, they'd rather see an update that
> pulls in the same fucntionality as they had before.  And even for new
> installs, I'd personally prefer to install these things via rpm.  If I
> wanted to use a secondary package management system, I could use gems or
> eggs or CPAN, but I don't. ;)
>

Note that as soon as you adopt environments, you end up having multiple
locations on disk that you want modules to be installed into, which doesn't
fit very well with traditional package management systems.




>
> I think it's good to split out these things, as it would allow us to
> properly add a nagios dep to the hypothetical puppet-module-nagios package.
>



-- 
Nigel Kersten
Product Manager, Puppet Labs

-- 
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] how to get ruby-shadow installed before trying to make users,groups

2012-04-16 Thread Steve Roberts
I know I need to have ruby-shadow installed to get puppet to be able
to manage shadow file based passwords.

so tried to code that up in a puppet manifest like this:
===
class strobenet {

  package { 'ruby-shadow':
ensure => 'present',
  }

  user { 'tuser':
ensure   => 'present',
comment  => 'Test User',
gid  => '302',
home => '/home/tuser',
password => '***',
password_max_age => '99000',
password_min_age => '5',
shell=> '/bin/tcsh',
uid  => '302',
  }
  group { 'tuser':
ensure => 'present',
gid=> '302',
  }

  Package['ruby-shadow'] -> User <| |>
}
===

the problem is that when it runs the first time the puppet User
provider says it can't handle manages_passwords and
manages_password_age during init and so clips those attributes.

Then it goes to apply the actual resources and does the package first,
then the user.

But since the provider has already clipped the attributes they don't
get set in the first run.

when run a second time the attributes do get set correctly, but that
seems a bit kludgy to have to run puppet twice to get the desired
affect.

-- 
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-dev] Re: [Puppet Users] Telly: Nagios types moving into Module

2012-04-16 Thread Kelsey Hightower
On Mon, Apr 16, 2012 at 4:07 PM, Ken Barber  wrote:

> A pm2rpm tool perhaps Todd? :-).


Something like pm2rpm would work, but we need to have a least one standard
path for Puppet modules. I guess we can count on /etc/puppet/modules or
/usr/share/puppet/modules being part of the default module path.

-- 
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] Requiring defines from other classes in a fact

2012-04-16 Thread Boudewijn Ector
Hi Guys,


Currently I'm coding a recipe for installing some UNIX daemon (openca,
but that's not very relevant).
This works fine, except some dependency stuff regarding classes from
an external module.

My current setup is like this:


/etc/puppet/modules/openca/manifests/init.pp:

class  openca {


define openca-server($db_name, et cetera) {

   mysql::database{$db_name:
  ensure   => present
  }
  package{"openca":
   .
  }

  service{"openca":
   ...
   requires => Package["openca"],
  }

}
}

(yeah this example has been simplified a lot, I know puppet resolves
the depency all by it self in this case)

Very very simple, except for the fact that I want to add the
dependency for the mysql::database too. I'm using this excellent
module for managing mysql: https://github.com/camptocamp/puppet-mysql


Is there a neat way to do something like this

  service{"openca":
   ...
   requires => [Package["openca"],mysql::database["openca"]],
  }


I already tried doing this, and also tried dependency chaining, but
just can't get it to work at all.

Another option might be:


class openca
{


  define openca-database($db_name){


  mysql::database{$db_name:
  ensure   => present
  }
  }



define openca-server($db_name , etc )  {

openca::openca-database($db_name)

}



But that will not fix the dependency issue either.


Can someone please point either where to look for a clue (yeah in the
manual, but where?) or give me some advice regarding this?

Cheers,


Boudewijn Ector


-- 
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] Puppet Learner

2012-04-16 Thread OverDue Ocean
Hi Guys, Let me Introduce myself as  self learner and very new to
puppet and I am sure that now on I am staying here in this group for
long and keep asking questions,

I am sorry if my message annoys you or if its a bit childish please
forgive me but i believes that if you want to learn you should ask,

My Question is :

I have a server running puppet Master and 8 clients are connected with
Master and every half an hour clients pulls up there configuration if
requires from master and update themselves, but if need to restart
Apache on 4 of them and have to restart varnish in the remaining 4 all
in a sudden then how i will do that? do I need to wait for the next
half an hour that clients connects with master and restart the service
or is there any other way for doing so?

-- 
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: configured puppet server as client now no updates are working

2012-04-16 Thread psychobyte
Actually, this was a stupid mistake on my part.

I manage the puppet.conf file, when I applied the config. the puppet master 
config file got set to a puppet client config.  
I'm surprised it didn't output any error messages.




On Monday, April 16, 2012 9:45:25 AM UTC-7, psychobyte wrote:
>
> Hi,
>
> My puppet server was working up until I configured it to be a puppet 
> client.  I applied the configuration on the server which seemed to work 
> fine.  However, now when ever a client or itself 
> asks for an updated configuration it always comes back with a successful 
> poll, no updates, and the configuration version changed.  So configuration 
> changes are not being applied anymore.
> Is there some cache that's not being cleared? Is there a way of reversing 
> this?
>
> test-puppet ~ # puppetd -t
> info: Caching catalog for test-puppet.lab.lcl
> info: Applying configuration version '1334594015'
> notice: Finished catalog run in 0.02 seconds
>
> 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/-/fW_u7t_SXIIJ.
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] file resource

2012-04-16 Thread Eslam Mamdouh
Hi All,
i'd like to define a file resource that transfers a tar ball that doesn't
have fixed name
actually tarball name will be  tarball_name-.tar.gz

i tried to define file resouce as following using regex :

> file { "/opt/tarball_name*.tar.gz" :
> ...
> }
>
but it seems that regex doesn't work with with file resource
so what do you suggest regarding this issue

Thanks in advance
-- 
Best Regards,
Eslam Mamdouh El Husseiny
*Systems Administrator**
Cloud Niners Ltd.

*
*Cellular: (+2) 011 198 40 40
Mansoura: (+2) 050 234 70 81
Cairo:(+2) 022 *268 34 60
Fax:  (+2) 022 268 34 63

-- 
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] Supported Ruby Versions for Telly

2012-04-16 Thread Jo Rhett
I'd like to recommend the frameos version instead.  If you're going to do it 
from source, the frameos ruby spec file is much simpler, with much smaller diff 
files against the distro, and doesn't compile in a bunch of japanese and Tk 
stuff.  I've been updating the spec file to track the latest ruby patchlevel 
with no other changes, and that works fine for me.

https://github.com/frameos/ruby-rpm

On Apr 14, 2012, at 9:55 PM, Gary Larizza wrote:
> Have you checked out the packages that Karanbir Singh has created?  They work 
> fairly well --> http://centos.karan.org/el5/ruby187/
> 
> 
> On Sat, Apr 14, 2012 at 8:53 PM, Dan White  wrote:
> Great to hear this, but I am now looking for a reliable way to get Ruby 1.8.7 
> or 1.9.3 onto a RHEL-5 system.  The environment I am working still has RHEL 3 
> and 4 machines running, and I would not hold my breath waiting for transition 
> to RHEL 6 (which does have ruby 1.8.7 in it)
> 
> One more thing: When I say "reliable", it has to be able to convince a 
> non-technical PHB type.
> 
> Suggestions ?
> 
> On Apr 13, 2012, at 2:59 PM, Michael Stahnke wrote:
> 
> > Puppet Labs is happy to announce full support for Ruby 1.9.3 will be part of
> > the next major release of Puppet, codenamed Telly.  Ruby 1.8.7 and 1.9.3 are
> > considered the primary supported Ruby versions, on all platforms including
> > Unix, Linux, Windows, and MacOS-X.  Ruby 1.8.5 is also supported, on the 
> > agent
> > only.
> >
> > The Puppet 2.7 series featured initial support for the Ruby 1.9 series, and 
> > we
> > are happy to see that work completed and brought forward to full production
> > support in the forthcoming release.
> >
> > Other Ruby versions including 1.8.6, 1.9.1, and 1.9.2 are not officially
> > supported. Ruby implementations other than the "MRI" series are not 
> > officially
> > supported. We will accept patches that fix issues on other (non MRI)
> > Ruby systems.
> >
> > 1.9.3 was selected due to its inclusion in Fedora 17 (Beefy Miracle) and
> > Ubuntu Precise Pangolin.
> >
> > Previews of Telly should be available in May. If you'd like to see some of 
> > the
> > changes happening today, you are also welcome to run Puppet's master branch.
> >
> > If you have questions or concerns, feel free to respond here.
> >
> > Mike Stahnke
> > Community Manager
> 
> --
> 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.
> 
> 
> 
> 
> -- 
> 
> Gary Larizza
> Professional Services Engineer
> Puppet Labs
> 
> 
> -- 
> 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.

-- 
Jo Rhett
Net Consonance : consonant endings by net philanthropy, open source and other 
randomness

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Facter not initialized in rspec in puppetlabs-stdlib?

2012-04-16 Thread Jeff McCune
On Sat, Apr 14, 2012 at 8:34 PM, Wil Cooley  wrote:
> On Thursday, April 12, 2012 10:06:25 AM UTC-7, Jeff McCune wrote:
>>
>> The problem is that modules like stdlib need Puppet to be initialized
>> in a manner suitable for testing.  Setting things like confdir and
>> what not.  This means different actions for different versions of
>> Puppet, and stdlib works all the way back through 2.6.
>
> I took the expedient way out and commented out the requires from
> spec_helper. :-\ My tests pass now, at least.
>
> I have now added tests for the has_ip_address and has_ip_network, which are
> more porcelain than has_interface_with.
>
> https://github.com/wcooley/puppetlabs-stdlib/compare/puppetlabs:master...wcooley:has_interface_with_function
>
> If you like it, I will open a ticket and submit a pull request.

Yes, please file a ticket at:

http://projects.puppetlabs.com/projects/stdlib

You'll need to register an account if you don't already have one.

If it's a somewhat substantial patch could you also please sign the CLA at:
https://projects.puppetlabs.com/contributor_licenses/sign

Thanks,
-Jeff McCune

-- 
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]

2012-04-16 Thread Jeff McCune
On Mon, Apr 16, 2012 at 4:14 AM, Afroz Hussain  wrote:
> Hi,
>
> I updated the Puppet Enterprise 2.0 to 2.5.1 and tried to restart the httpd
> and getting following error in /var/log/pe-httpd/puppetdashboard.error.log
>
> [warn] RSA server certificate CommonName (CN) `pe-internal-dashboard' does
> NOT match server name!?

This question might be better suited for the pe-users list. [1]

This is just a warning and not an actual error.  It means the
certificate's Common Name field doesn't match the server name Apache
is using for the virtual host.

Unfortunately this is by design for the time being.  We're having
difficult coming up with a reliable way to issue the certificate used
by the Console's HTTPS vhost.  Ideally, the certificate name will
match the hostname, but this is very difficult to make work reliably
given the state of name resolution in most networks PE is installed
into.  To make installation and upgrades reliable, we simply issue a
certificate named pe-internal-dashboard rather than try to figure out
the hostname.

[1] https://groups.google.com/a/puppetlabs.com/group/pe-users/topics

Hope this helps,
-Jeff

-- 
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] Supported Ruby Versions for Telly

2012-04-16 Thread Jeff McCune
On Mon, Apr 16, 2012 at 11:29 AM, Todd Zullinger  wrote:
> Gary Larizza wrote:
>>
>> Have you checked out the packages that Karanbir Singh has created?  They
>> work fairly well --> http://centos.karan.org/el5/ruby187/
>
>
> They're also not updated for recent security vulnerabilities, which should
> be a concern for anyone deploying them in production.
>
> Basically, this means that Telly won't support el5 as a master, right?

This is my understanding, yes.  We'll support EL5 as a master with
Puppet Enterprise, and as an agent with the vendor provided Ruby, but
the cost of supporting Ruby 1.8.5 running a Puppet Master is quite
high.

I know this isn't ideal, but Ruby 1.8.5 is extremely long in the tooth.

-Jeff

-- 
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] hiera puppet augeas and hash keys ?

2012-04-16 Thread puppetguest

Hi,

if possible can someone post a working example please ?

I am using hiera => puppet => augeas.

cat myserver.yaml
---
myserver:
  "Birthday": '1'
  "Debug": '5'

The no. of settings will change, so i would like to use a hash here.


The hiera lookup works already:

>hiera -c /etc/puppet/hiera.yaml -h myserver
{"Debug"=>"5", "Birthday"=>"1"}


I can save a single value via hiera => puppet => augeas sucessfully
when i know its variable name.

What i am searching for is the proper syntax to use 'hiera_hash'
and save all settings into augeas with 'set $name $value' coming from
the yaml-file.

In perl it would be have been like this:
foreach $key (keys %hash){
print "$key $hash{$key}\n";
}

Thank you

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet-dev] Re: [Puppet Users] Telly: Nagios types moving into Module

2012-04-16 Thread Ken Barber
A pm2rpm tool perhaps Todd? :-).

On Mon, Apr 16, 2012 at 7:36 PM, Todd Zullinger  wrote:
> Michael Stahnke wrote:
>>
>> For the next major Puppet version, code-named Telly, we have some changes
>> coming.  This is the first in a series of emails around these changes and
>> may require some input from the community.
>>
>> For Telly, the nagios types will be moved into a module.  This allows them
>> to be iterated on in isolation from the rest of Puppet's core release cycle
>> and process. In the future we have plans to move several other types into
>> modules that can be individually maintained, improved, tested and used.
>>
>> The module for Nagios will be available on the Forge.
>>
>> The upgrade path is the thing we need some feedback about.  The basic
>> steps to upgrade would be to setup a Telly master, and then install the
>> Nagios module via the Puppet Module Tool, which ships integrated with
>> 2.7.13+ and Telly.
>
>
> Is it possible to package these modules for distros?  In the past, we've had
> a few requests to do this for third-party modules but we didn't do this
> because there wasn't really any standard for it.  With puppet module tool
> being integrated now, perhaps that's something that can be reconsidered.
>
> I'm thinking that for folks using rpm, they'd rather see an update that
> pulls in the same fucntionality as they had before.  And even for new
> installs, I'd personally prefer to install these things via rpm.  If I
> wanted to use a secondary package management system, I could use gems or
> eggs or CPAN, but I don't. ;)
>
> I think it's good to split out these things, as it would allow us to
> properly add a nagios dep to the hypothetical puppet-module-nagios package.
>
> --
> Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
> ~~
> I am free of all prejudice. I hate everyone equally.
>    -- W. C. Fields
>

-- 
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] How to modify a file content?

2012-04-16 Thread Marco Parra D.

Hi Josh
On 16-04-2012 15:24, Josh Cooper wrote:

Hi Marco,

On Mon, Apr 16, 2012 at 10:45 AM, Marco Parra D. 
mailto:marco.parr...@gmail.com>> wrote:


Hi Kelsey,
thank you, Are these the only list of facts?, What makes this list?,


I don't think we have a "facts supported by platform" sort of 
document. Windows does support basic facts, e.g. hostname, domain, 
etc. This is the ticket describing the initial set of facts we added 
support for in 2.7.x: http://projects.puppetlabs.com/issues/8439


It's possible add more facts to windows?


You can always write custom facts. 
http://docs.puppetlabs.com/guides/custom_facts.html


Josh

--
Josh Cooper
Developer, Puppet Labs

--
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.

I'll check the page that you gave me... Thank you...

Regards

--
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] Telly: Nagios types moving into Module

2012-04-16 Thread Tim Mooney

In regard to: Re: [Puppet Users] Telly: Nagios types moving into Module,...:

If I wanted to use a 
secondary package management system, I could use gems or eggs or CPAN, but I 
don't. ;)


+1.

Tim
--
Tim Mooney tim.moo...@ndsu.edu
Enterprise Computing & Infrastructure  701-231-1076 (Voice)
Room 242-J6, IACC Building 701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

--
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] Telly: Nagios types moving into Module

2012-04-16 Thread Todd Zullinger

Michael Stahnke wrote:
For the next major Puppet version, code-named Telly, we have some 
changes coming.  This is the first in a series of emails around these 
changes and may require some input from the community.


For Telly, the nagios types will be moved into a module.  This allows 
them to be iterated on in isolation from the rest of Puppet's core 
release cycle and process. In the future we have plans to move several 
other types into modules that can be individually maintained, 
improved, tested and used.


The module for Nagios will be available on the Forge.

The upgrade path is the thing we need some feedback about.  The basic 
steps to upgrade would be to setup a Telly master, and then install 
the Nagios module via the Puppet Module Tool, which ships integrated 
with 2.7.13+ and Telly.


Is it possible to package these modules for distros?  In the past, 
we've had a few requests to do this for third-party modules but we 
didn't do this because there wasn't really any standard for it.  With 
puppet module tool being integrated now, perhaps that's something that 
can be reconsidered.


I'm thinking that for folks using rpm, they'd rather see an update 
that pulls in the same fucntionality as they had before.  And even for 
new installs, I'd personally prefer to install these things via rpm.  
If I wanted to use a secondary package management system, I could use 
gems or eggs or CPAN, but I don't. ;)


I think it's good to split out these things, as it would allow us to 
properly add a nagios dep to the hypothetical puppet-module-nagios 
package.


--
ToddOpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~
I am free of all prejudice. I hate everyone equally.
-- W. C. Fields



pgpimlSvSIWQQ.pgp
Description: PGP signature


Re: [Puppet Users] Supported Ruby Versions for Telly

2012-04-16 Thread Todd Zullinger

Gary Larizza wrote:
Have you checked out the packages that Karanbir Singh has created?  They 
work fairly well --> http://centos.karan.org/el5/ruby187/


They're also not updated for recent security vulnerabilities, which 
should be a concern for anyone deploying them in production.


Basically, this means that Telly won't support el5 as a master, right?

--
ToddOpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~
The most overlooked advantage to owning a computer is that if they
foul up, there's no law against whacking them around a little.
-- Eric Porterfield



pgpxRuPkSIdmG.pgp
Description: PGP signature


Re: [Puppet Users] How to modify a file content?

2012-04-16 Thread Josh Cooper
Hi Marco,

On Mon, Apr 16, 2012 at 10:45 AM, Marco Parra D. wrote:

>  Hi Kelsey,
> thank you, Are these the only list of facts?,  What makes this list?,
>

I don't think we have a "facts supported by platform" sort of document.
Windows does support basic facts, e.g. hostname, domain, etc. This is the
ticket describing the initial set of facts we added support for in 2.7.x:
http://projects.puppetlabs.com/issues/8439


> It's possible add more facts to windows?
>

You can always write custom facts.
http://docs.puppetlabs.com/guides/custom_facts.html

Josh

-- 
Josh Cooper
Developer, Puppet Labs

-- 
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] Supported Ruby Versions for Telly

2012-04-16 Thread Michael Stahnke
On Sat, Apr 14, 2012 at 8:53 PM, Dan White  wrote:
> Great to hear this, but I am now looking for a reliable way to get Ruby 1.8.7 
> or 1.9.3 onto a RHEL-5 system.  The environment I am working still has RHEL 3 
> and 4 machines running, and I would not hold my breath waiting for transition 
> to RHEL 6 (which does have ruby 1.8.7 in it)
>
> One more thing: When I say "reliable", it has to be able to convince a 
> non-technical PHB type.
>
> Suggestions ?

Other than the suggestions already listed in this thread, you might
just want to not move to Telly.  Obviously you're running things that
MUCH older than what telly is setup to do.

Another option would be to run Puppet Enterprise (which includes Ruby
1.8.7), but doesn't support RHEL 3 or 4.  I'd probably talk to my boss
about what end-of-life really means ;)



>
> On Apr 13, 2012, at 2:59 PM, Michael Stahnke wrote:
>
>> Puppet Labs is happy to announce full support for Ruby 1.9.3 will be part of
>> the next major release of Puppet, codenamed Telly.  Ruby 1.8.7 and 1.9.3 are
>> considered the primary supported Ruby versions, on all platforms including
>> Unix, Linux, Windows, and MacOS-X.  Ruby 1.8.5 is also supported, on the 
>> agent
>> only.
>>
>> The Puppet 2.7 series featured initial support for the Ruby 1.9 series, and 
>> we
>> are happy to see that work completed and brought forward to full production
>> support in the forthcoming release.
>>
>> Other Ruby versions including 1.8.6, 1.9.1, and 1.9.2 are not officially
>> supported. Ruby implementations other than the "MRI" series are not 
>> officially
>> supported. We will accept patches that fix issues on other (non MRI)
>> Ruby systems.
>>
>> 1.9.3 was selected due to its inclusion in Fedora 17 (Beefy Miracle) and
>> Ubuntu Precise Pangolin.
>>
>> Previews of Telly should be available in May. If you'd like to see some of 
>> the
>> changes happening today, you are also welcome to run Puppet's master branch.
>>
>> If you have questions or concerns, feel free to respond here.
>>
>> Mike Stahnke
>> Community Manager
>
> --
> 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] How to modify a file content?

2012-04-16 Thread Marco Parra D.

Hi Kelsey,
thank you, Are these the only list of facts?, What makes this list?, 
It's possible add more facts to windows?


Thank you

Regards.!


On 16-04-2012 14:33, Kelsey Hightower wrote:
On Mon, Apr 16, 2012 at 1:30 PM, Marco Parra D. 
mailto:marco.parr...@gmail.com>> wrote:


Hi Josh,
Where can I find the complete fact's list to use on windows?...

thank you in advance!

Regards..


You should be able to run Facter directly on the system in question.


On 16-04-2012 12:55, Josh Cooper wrote:

Hi Marco,

On Mon, Apr 16, 2012 at 7:22 AM, Marco Parra D.
mailto:marco.parr...@gmail.com>> wrote:

Hi guys, I trying to modify a file on Windows using puppet,
 I got a template file like this:
[default]
host = SOmeNAme

[WinEventLog:Security]
disabled = 1

is copied using puppet to the windows machine as C:\Program
Files\Soft1\inputs.conf

And I need to replace the host line with the real name of the
windows machine:

i.e.: host = machine1

Is this possible using puppet for windows?

Regards.


Yes, definitely. You should be able to specify the file content
parameter as a template:

  file { 'C:\Program Files\Soft1\inputs.conf':
ensure => present,
content => template('module/template.erb')
  }

and then in your template template.erb, you can have it resolve
the value of the host property using the agent's hostname fact:

  host = <%= @hostname %>

This page provides more information about puppet templates:
http://docs.puppetlabs.com/guides/templating.html

Josh

-- 
Josh Cooper

Developer, Puppet Labs

-- 
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.




--
Kelsey Hightower
Solutions Engineer
Puppet Labs
1-678-471-9501

--
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] How to modify a file content?

2012-04-16 Thread Kelsey Hightower
On Mon, Apr 16, 2012 at 1:30 PM, Marco Parra D. wrote:

>  Hi Josh,
> Where can I find the complete fact's list to use on windows?...
>
> thank you in advance!
>
> Regards..
>

You should be able to run Facter directly on the system in question.


>
> On 16-04-2012 12:55, Josh Cooper wrote:
>
> Hi Marco,
>
> On Mon, Apr 16, 2012 at 7:22 AM, Marco Parra D. 
> wrote:
>
>> Hi guys, I trying to modify a file on Windows using puppet,  I got a
>> template file like this:
>> [default]
>> host = SOmeNAme
>>
>> [WinEventLog:Security]
>> disabled = 1
>>
>> is copied using puppet to the windows machine as C:\Program
>> Files\Soft1\inputs.conf
>>
>> And I need to replace the host line with the real name of the windows
>> machine:
>>
>> i.e.: host = machine1
>>
>> Is this possible using puppet for windows?
>>
>> Regards.
>
>
>  Yes, definitely. You should be able to specify the file content
> parameter as a template:
>
>file { 'C:\Program Files\Soft1\inputs.conf':
>  ensure => present,
> content => template('module/template.erb')
>   }
>
>  and then in your template template.erb, you can have it resolve the
> value of the host property using the agent's hostname fact:
>
>host = <%= @hostname %>
>
>  This page provides more information about puppet templates:
> http://docs.puppetlabs.com/guides/templating.html
>
>  Josh
>
>  --
> Josh Cooper
> Developer, Puppet Labs
>
> --
> 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.
>



-- 
Kelsey Hightower
Solutions Engineer
Puppet Labs
1-678-471-9501

-- 
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] How to modify a file content?

2012-04-16 Thread Marco Parra D.

Hi Josh,
Where can I find the complete fact's list to use on windows?...

thank you in advance!

Regards..

On 16-04-2012 12:55, Josh Cooper wrote:

Hi Marco,

On Mon, Apr 16, 2012 at 7:22 AM, Marco Parra D. 
mailto:marco.parr...@gmail.com>> wrote:


Hi guys, I trying to modify a file on Windows using puppet,  I got
a template file like this:
[default]
host = SOmeNAme

[WinEventLog:Security]
disabled = 1

is copied using puppet to the windows machine as C:\Program
Files\Soft1\inputs.conf

And I need to replace the host line with the real name of the
windows machine:

i.e.: host = machine1

Is this possible using puppet for windows?

Regards.


Yes, definitely. You should be able to specify the file content 
parameter as a template:


  file { 'C:\Program Files\Soft1\inputs.conf':
ensure => present,
content => template('module/template.erb')
  }

and then in your template template.erb, you can have it resolve the 
value of the host property using the agent's hostname fact:


  host = <%= @hostname %>

This page provides more information about puppet templates: 
http://docs.puppetlabs.com/guides/templating.html


Josh

--
Josh Cooper
Developer, Puppet Labs

--
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] How to modify a file content?

2012-04-16 Thread Marco Parra D.

Hi Josh
On 16-04-2012 12:55, Josh Cooper wrote:

Hi Marco,

On Mon, Apr 16, 2012 at 7:22 AM, Marco Parra D. 
mailto:marco.parr...@gmail.com>> wrote:


Hi guys, I trying to modify a file on Windows using puppet,  I got
a template file like this:
[default]
host = SOmeNAme

[WinEventLog:Security]
disabled = 1

is copied using puppet to the windows machine as C:\Program
Files\Soft1\inputs.conf

And I need to replace the host line with the real name of the
windows machine:

i.e.: host = machine1

Is this possible using puppet for windows?

Regards.


Yes, definitely. You should be able to specify the file content 
parameter as a template:


  file { 'C:\Program Files\Soft1\inputs.conf':
ensure => present,
content => template('module/template.erb')
  }

and then in your template template.erb, you can have it resolve the 
value of the host property using the agent's hostname fact:


  host = <%= @hostname %>

This page provides more information about puppet templates: 
http://docs.puppetlabs.com/guides/templating.html


Josh

--
Josh Cooper
Developer, Puppet Labs

--
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.

It works perfect, thank you again!

:)

Regards.!

--
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: configured puppet server as client now no updates are working

2012-04-16 Thread niraj
Hi Psychobyte,
  Can you please post you site.pp and nodes.pp file which u have in 
server.
On Monday, April 16, 2012 10:15:25 PM UTC+5:30, psychobyte wrote:

> Hi,
>
> My puppet server was working up until I configured it to be a puppet 
> client.  I applied the configuration on the server which seemed to work 
> fine.  However, now when ever a client or itself 
> asks for an updated configuration it always comes back with a successful 
> poll, no updates, and the configuration version changed.  So configuration 
> changes are not being applied anymore.
> Is there some cache that's not being cleared? Is there a way of reversing 
> this?
>
> test-puppet ~ # puppetd -t
> info: Caching catalog for test-puppet.lab.lcl
> info: Applying configuration version '1334594015'
> notice: Finished catalog run in 0.02 seconds
>
> 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/-/ZmBl6eP898cJ.
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] How to modify a file content?

2012-04-16 Thread Marco Parra D.

On 16-04-2012 12:55, Josh Cooper wrote:

Hi Marco,

On Mon, Apr 16, 2012 at 7:22 AM, Marco Parra D. 
mailto:marco.parr...@gmail.com>> wrote:


Hi guys, I trying to modify a file on Windows using puppet,  I got
a template file like this:
[default]
host = SOmeNAme

[WinEventLog:Security]
disabled = 1

is copied using puppet to the windows machine as C:\Program
Files\Soft1\inputs.conf

And I need to replace the host line with the real name of the
windows machine:

i.e.: host = machine1

Is this possible using puppet for windows?

Regards.


Yes, definitely. You should be able to specify the file content 
parameter as a template:


  file { 'C:\Program Files\Soft1\inputs.conf':
ensure => present,
content => template('module/template.erb')
  }

and then in your template template.erb, you can have it resolve the 
value of the host property using the agent's hostname fact:


  host = <%= @hostname %>

This page provides more information about puppet templates: 
http://docs.puppetlabs.com/guides/templating.html


Josh

--
Josh Cooper
Developer, Puppet Labs

--
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.

Hi Josh, I'll try this, thanks a lot...

Regards..

--
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] configured puppet server as client now no updates are working

2012-04-16 Thread psychobyte
Hi,

My puppet server was working up until I configured it to be a puppet 
client.  I applied the configuration on the server which seemed to work 
fine.  However, now when ever a client or itself 
asks for an updated configuration it always comes back with a successful 
poll, no updates, and the configuration version changed.  So configuration 
changes are not being applied anymore.
Is there some cache that's not being cleared? Is there a way of reversing 
this?

test-puppet ~ # puppetd -t
info: Caching catalog for test-puppet.lab.lcl
info: Applying configuration version '1334594015'
notice: Finished catalog run in 0.02 seconds

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/-/J7ehDlU1CUcJ.
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] regsubst and regex

2012-04-16 Thread Antidot SAS
Ok, I totally forget that replacement part is not a search :D




On Mon, Apr 16, 2012 at 5:00 PM, Thomas Bellman  wrote:

> On 2012-04-16 15:57, Antidot SAS top-posted:
>
> > Thx for the reply it helps.
> >
> > But how come the \2 returns something that I never asked?
>
> It doesn't.  But since there are no occurrances of '^(.*)->(.*)',
> then there are none that get replaced.  Similarly, if you do:
>
>regsubst('foobar', 'x', 'y')
>
> you will get 'foobar', since there *is* no 'x' in 'foobar' that
> can be replaced by a 'y'.
>
>
>/Bellman
>
> --
> 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] content & source

2012-04-16 Thread Antidot SAS
thx

On Mon, Apr 16, 2012 at 6:01 PM, Josh Cooper  wrote:

> On Mon, Apr 16, 2012 at 6:59 AM, Antidot SAS  wrote:
>
>> Hi everyone,
>>
>>
>> Maybe a dump question but what happens if for a file ressource I specify
>> a source and a content? Is there a priority? The resul won't be determinist?
>>
>>
>> Regards,
>> JM
>>
>
> The file resource should generate a validation error as source and content
> are mutually exclusive.
>
> Josh
>
> --
> Josh Cooper
> Developer, Puppet Labs
>
>  --
> 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] content & source

2012-04-16 Thread Josh Cooper
On Mon, Apr 16, 2012 at 6:59 AM, Antidot SAS  wrote:

> Hi everyone,
>
>
> Maybe a dump question but what happens if for a file ressource I specify a
> source and a content? Is there a priority? The resul won't be determinist?
>
>
> Regards,
> JM
>

The file resource should generate a validation error as source and content
are mutually exclusive.

Josh

-- 
Josh Cooper
Developer, Puppet Labs

-- 
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] How to modify a file content?

2012-04-16 Thread Josh Cooper
Hi Marco,

On Mon, Apr 16, 2012 at 7:22 AM, Marco Parra D. wrote:

> Hi guys, I trying to modify a file on Windows using puppet,  I got a
> template file like this:
> [default]
> host = SOmeNAme
>
> [WinEventLog:Security]
> disabled = 1
>
> is copied using puppet to the windows machine as C:\Program
> Files\Soft1\inputs.conf
>
> And I need to replace the host line with the real name of the windows
> machine:
>
> i.e.: host = machine1
>
> Is this possible using puppet for windows?
>
> Regards.


Yes, definitely. You should be able to specify the file content parameter
as a template:

  file { 'C:\Program Files\Soft1\inputs.conf':
ensure => present,
content => template('module/template.erb')
  }

and then in your template template.erb, you can have it resolve the value
of the host property using the agent's hostname fact:

  host = <%= @hostname %>

This page provides more information about puppet templates:
http://docs.puppetlabs.com/guides/templating.html

Josh

-- 
Josh Cooper
Developer, Puppet Labs

-- 
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: Need puppet module for condition copy

2012-04-16 Thread Munna S
Thank you so much San for your time and help.

Can anyone help me with this

-Jeeva

On Mon, Apr 16, 2012 at 9:54 AM, Sans  wrote:

> According to your configuration, I don't think my code will work at all.
> Your setup is quite different then mine and I've no other suggestions for
> you at the moment. Hopefully, someone else will pick it up from here.
> Cheers!!
>
>
>
>
> On Monday, April 16, 2012 1:59:25 PM UTC+1, Jeeva wrote:
>>
>>
>>1. The line: *import 'modules'* in */etc/puppet/manifests/site.pp
>>- i do have site.pp file but dont have the entry for modules. i added
>>the entry but later i saw lot of errors related to modules in log
>>*
>>2. The line: *import 'jb_test'* in* /etc/puppet/manifests/modules.pp
>>- i dont have modules.pp file. But as i said in my previous email, i
>>have customised servername.pp siles
>>*
>>3. The file:* /etc/puppet/modules/jb_test/manifests/jb_config.pp
>>- i created this file
>>*
>>4. The file:* /etc/puppet/modules/jb_test/manifests/init_config.pp
>>- i created this file
>>*
>>5. The file:* /etc/puppet/modules/jb_test/files/group_test
>>- i have this file*
>>6. and finally, in the */etc/puppet/manifests/nodes.pp
>>- I dont have this file in my configuration*
>>
>>
>> On Mon, Apr 16, 2012 at 7:38 AM, Sans  wrote:
>>
>>> humm.. not sure but looks like couple of steps from my previous post
>>> are missing.
>>> Can you pls confirm that you have all of these:
>>>
>>>
>>>1. The line: *import 'modules'* in */etc/puppet/manifests/site.pp*
>>>2. The line: *import 'jb_test'* in* /etc/puppet/manifests/modules.pp*
>>>3. The file:* /etc/puppet/modules/jb_test/manifests/jb_config.pp*
>>>4. The file:* /etc/puppet/modules/jb_test/manifests/init_config.pp*
>>>5. The file:* /etc/puppet/modules/jb_test/files/group_test*
>>>6. and finally, in the */etc/puppet/manifests/nodes.pp*
>>>
>>> node 'vm-jeeva2' {
 include cp_jboss_conf
 }
>>>
>>>
>>> (don't add inherits jeeva_base for the time being)
>>>
>>> Cheers!!
>>>
>>>
>>>
>>>
>>> On Monday, April 16, 2012 1:06:59 PM UTC+1, Jeeva wrote:

 Hi Sans,

 I followed your steps, but i am getting the same error again

 Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]: Could not find class
 cp_jboss_conf for vm-jeeva2.aircell.prod at /etc/puppet/manifests/nodes/
 **vm**-jeeva2.aircell.prod.pp:2 on node vm-jeeva2.aircell.prod
 Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]: Could not find class
 cp_jboss_conf for vm-jeeva2.aircell.prod at /etc/puppet/manifests/nodes/
 **vm**-jeeva2.aircell.prod.pp:2 on node vm-jeeva2.aircell.prod
 Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]:
 (//vm-jeeva2.aircell.prod/**Pupp**et) Could not retrieve catalog from
 remote server: Error 400 on SERVER: Could not find class cp_jboss_conf for
 vm-jeeva2.aircell.prod at 
 /etc/puppet/manifests/nodes/**vm**-jeeva2.aircell.prod.pp:2
 on node vm-jeeva2.aircell.prod
 Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]:
 (//vm-jeeva2.aircell.prod/**Pupp**et) Using cached catalog
 Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]:
 (//vm-jeeva2.aircell.prod/**Pupp**et) Could not retrieve catalog;
 skipping run

 @All, Just not to confuse anyone, currently my puppet server is working
 as expected. i have lot of modules created and it works. This is how my
 configuration is

 1 ) my site.pp file is under /etc/puppet/manifest/site.pp and below is
 my content
 import 'nodes/*'
 $puppetserver = 'puppet-server.domain.com'

 2) All my modules is under below path

 /etc/puppet/modules/

 3) under below path i have all my .pp files . eg

 /etc/puppet/manifests/nodes/**se**rver1.pp
 /etc/puppet/manifests/nodes/**se**rver2.pp
 /etc/puppet/manifests/nodes/**se**rver3.pp
 /etc/puppet/manifests/nodes/**se**rver4.pp

  addition to this i have a jeeva_base.pp file where i include all my
 modules. below is the portion of its content
 ---
 node jeeva_base {
  include all_scripts
 include dev_jboss_jeeva
 }
 ---
 below is the content of my server1.pp file . i have created individual
 .pp file for each server which inherits jeeva_base node.
 --
 node server1 inherits jeeva_base {
 }
 ---

 As i said above, this is my requirement.

 we have 3 version of jboss running in our environment in different
 servers. eg. jboss4 in server1, jboss5 in server2 , jboss6 in server3 , and
 no jboss in server 4 , etc

 on each server, jboss config file sits under different path.
 eg: in server 1 it sits under /opt/jboss4/
   in server 2 it sits unde

[Puppet Users] Re: Creating classes for individual nodes

2012-04-16 Thread Josh
Thanks everyone! This is a good start. I'll have to research most of
this but at least I know what to research now. Thanks.

Josh

On Apr 12, 10:19 am, Brian Gallew  wrote:
> I'm absolutely with John on this.  As an example, for our JBoss application
> we need the configuration file to be different based on the the hostname
> (we only host one app per host/VM) and environment
> (dev/integration/qa/staging/production).  Further, some "dev" boxes need to
> allow the developers to hand-update their configs.  So what I have is a
> templated configuration file that has all the configuration information in
> it for all the environments, and only the pertinent information gets
> shipped to the Puppet client.  Further, I wrap this in a define{} so that
> the file Puppet actually manages is "server.properties-default".  There is
> an exec{} in the define which checks for a "server.properties-noupdate"
> file.  If that file exists, the exec{} bails.  If it doesn't, then it
> rsync's the -default file onto the "server.properties" file that JBoss
> references.  Finally, the define{} also creates a
> "server.properties-README" which tells the developer about how the file is
> managed and what they can do if they want to override Puppet.
>
> On Wed, Apr 11, 2012 at 1:52 PM, jcbollinger wrote:
>
>
>
>
>
>
>
>
>
> > On Apr 11, 12:04 pm, Josh  wrote:
> > > This is more of a style question than implementation. I have a bunch of
> > > nodes running the same software but in many cases they need config files
> > > that are customized for that specific node. I was thinking I could push
> > all
> > > the main files from the app through a central class and have separate
> > > classes for each individual node that has the config files. Is this the
> > > best way to do this or does it go against the purpose of using puppet?
>
> > There is no inherent problem with that approach, but for a little
> > extra effort you can get something that will be easier to maintain.
> > I'm not a big fan of parameterized classes myself, but I heartily
> > endorse an external data store, accessed via Hiera.  Instead of using
> > per-node classes, record per-node data where needed.  You can use that
> > data to fill templates, choose among alternatives in your manifests,
> > set resource properties, etc..
>
> > > Also, for implementation, is it best practice to create a separate module
> > > and class for each node where the class includes only that module?
> > Thanks.
>
> > I would say not.  It might or might not make sense to put the per-node
> > classes in the module with the main classes for the application in
> > question, but I certainly see no reason to separate them from each
> > other.  But the question is moot if you choose a cleaner strategy.
>
> > 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-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 Certificate's

2012-04-16 Thread Sean McGrath
Gary, thanks very much for that. I got that to work as I wanted after
a bit of fighting with other issues of my own creation. So I am very
grateful to you for your help.

If you ever in Dublin, Ireland. Look me up, I owe you a favor so I'm
willing to pay back, within reason of course.

Best

Sean

On Apr 12, 5:21 pm, Gary Larizza  wrote:
> Hey Guys,
>
> Let me try to step through this one step at a time.  I recommend
> downloading one of our VMs that we host for testing puppet (I'm using the
> VM we use for training located here 
> -->http://downloads.puppetlabs.com/training/puppet-vmware.zipbut there's also
> one for VirtualBox too 
> -->http://downloads.puppetlabs.com/training/puppet-vbox.zip) to test this
> setup.  If you do that, make sure DNS and networking are working (So, setup
> host entries on your laptop for each VM, setup the hostname and FQDN ON
> EACH VM, and make sure each VM can ping the VM Master).  I'm using three
> VMs (a master and two agents): nodemaster.puppetlabs.vm,
> node1.puppetlabs.vm, and node2.puppetlabs.vm.  Once DNS resolves and is
> working, setup Puppet on the master FIRST, and then setup the remaining
> nodes as agents.  Again, I recommend using the VMs and using Puppet
> Enterprise because it makes it MUCH EASIER to setup Puppet - just use the
> puppet-enterprise-installer script (once you get the process of using a
> single cert and multiple node_names DOWN, THEN you can start on some actual
> machines).
>
> Now we can start customizing Puppet.  There are a couple of key steps that
> need to be taken since we're shipping around a single cert for all machines:
>
> 1. When you stand up a PE Agent, it's going to contact the master and setup
> a Certificate Signing Request.  Because of this, go to the master node's
> $ssldir (which, on Puppet Enterprise, is /etc/puppetlabs/puppet/ssl.  If
> you want to find the $ssldir on YOUR master, just run `puppet config print
> ssldir` and it will print it out for you) and remove the CSRs that are in
> the ca/requests/ directory (they should be named after your nodes).
>
> 2. Next, lets generate the single certificate that will be shopped around.
>  You will need to use the same 'certname' on every node.  This is the name
> of the node as SSL is aware (in my case I'm using 'macs.puppetlabs.vm').
>  Do this by doing `puppet cert generate macs.puppetlabs.vm` on your MASTER
> machine.  The master will generate the certs and your $ssldir will look
> something like this:
>
> ssl
>
> |-- ca
>
> |   |-- ca_crl.pem
>
> |   |-- ca_crt.pem
>
> |   |-- ca_key.pem
>
> |   |-- ca_pub.pem
>
> |   |-- inventory.txt
>
> |   |-- private
>
> |   |   `-- ca.pass
>
> |   |-- requests
>
> |   |-- serial
>
> |   `-- signed
>
> |       |-- macs.puppetlabs.vm.pem
>
> |       |-- nodemaster.puppetlabs.vm.pem
>
> |       |-- pe-internal-broker.pem
>
> |       |-- pe-internal-dashboard.pem
>
> |       |-- pe-internal-mcollective-servers.pem
>
> |       |-- pe-internal-peadmin-mcollective-client.pem
>
> |       `-- pe-internal-puppet-console-mcollective-client.pem
>
> |-- certificate_requests
>
> |-- certs
>
> |   |-- ca.pem
>
> |   |-- macs.puppetlabs.vm.pem
>
> |   |-- nodemaster.puppetlabs.vm.pem
>
> |   |-- pe-internal-broker.pem
>
> |   |-- pe-internal-mcollective-servers.pem
>
> |   |-- pe-internal-peadmin-mcollective-client.pem
>
> |   `-- pe-internal-puppet-console-mcollective-client.pem
>
> |-- crl.pem
>
> |-- private
>
> |-- private_keys
>
> |   |-- macs.puppetlabs.vm.pem
>
> |   |-- nodemaster.puppetlabs.vm.pem
>
> |   |-- pe-internal-broker.pem
>
> |   |-- pe-internal-mcollective-servers.pem
>
> |   |-- pe-internal-peadmin-mcollective-client.pem
>
> |   `-- pe-internal-puppet-console-mcollective-client.pem
>
> `-- public_keys
>
>     |-- foo.puppetlabs.vm.pem
>
>     |-- macs.puppetlabs.vm.pem
>
>     |-- nodemaster.puppetlabs.vm.pem
>
>     |-- pe-internal-broker.pem
>
>     |-- pe-internal-mcollective-servers.pem
>
>     |-- pe-internal-peadmin-mcollective-client.pem
>
>     `-- pe-internal-puppet-console-mcollective-client.pem
>
> 3.  There are three files you need to collect on your master and ship
> around to all of your nodes.  They are ALL in the $ssldir, so these paths
> are relative to THAT directory.  The three files are:
>
>    - $ssldir/private_keys/macs.puppetlabs.vm.pem on the master  ->  gets
>    copied to the agent's $ssldir/private_keys directory
>    - $ssldir/public_keys/macs.puppetlabs.vm.pem on the master   ->  gets
>    copied to the agent's $ssldir/public_keys directory
>    - $ssldir/ca/signed/macs.puppetlabs.vm.pem on the master       ->  gets
>    copied to the agent's $ssldir/certs directory
>
> 4.  You need to modify /etc/puppetlabs/puppet/auth.conf on the master so
> every node can access the find action on the catalog REST endpoint for the
> master (i.e. The Mac nodes can get their catalog).  Look for this stanza in
> auth.conf:
>
> # allow nodes to retrieve their own catalog (ie their configuration)
> path ~ ^/catalog/([^

Re: [Puppet Users] regsubst and regex

2012-04-16 Thread Thomas Bellman
On 2012-04-16 15:57, Antidot SAS top-posted:

> Thx for the reply it helps.
> 
> But how come the \2 returns something that I never asked?

It doesn't.  But since there are no occurrances of '^(.*)->(.*)',
then there are none that get replaced.  Similarly, if you do:

regsubst('foobar', 'x', 'y')

you will get 'foobar', since there *is* no 'x' in 'foobar' that
can be replaced by a 'y'.


/Bellman

-- 
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 definitions and hashes/arrays syntax problem.

2012-04-16 Thread jcbollinger


On Apr 13, 10:17 am, Rocky  wrote:
>                                        weight => '100'

Also, you're missing a comma after each appearance of that entry.


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-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: Need puppet module for condition copy

2012-04-16 Thread Sans
According to your configuration, I don't think my code will work at all. 
Your setup is quite different then mine and I've no other suggestions for 
you at the moment. Hopefully, someone else will pick it up from here. 
Cheers!!



On Monday, April 16, 2012 1:59:25 PM UTC+1, Jeeva wrote:
>
>
>1. The line: *import 'modules'* in */etc/puppet/manifests/site.pp
>- i do have site.pp file but dont have the entry for modules. i added 
>the entry but later i saw lot of errors related to modules in log
>*
>2. The line: *import 'jb_test'* in* /etc/puppet/manifests/modules.pp
>- i dont have modules.pp file. But as i said in my previous email, i 
>have customised servername.pp siles
>* 
>3. The file:* /etc/puppet/modules/jb_test/manifests/jb_config.pp
>- i created this file
>*
>4. The file:* /etc/puppet/modules/jb_test/manifests/init_config.pp
>- i created this file
>*
>5. The file:* /etc/puppet/modules/jb_test/files/group_test
>- i have this file*
>6. and finally, in the */etc/puppet/manifests/nodes.pp
>- I dont have this file in my configuration*
>
>
> On Mon, Apr 16, 2012 at 7:38 AM, Sans  wrote:
>
>> humm.. not sure but looks like couple of steps from my previous post 
>> are missing. 
>> Can you pls confirm that you have all of these:
>>
>>
>>1. The line: *import 'modules'* in */etc/puppet/manifests/site.pp*
>>2. The line: *import 'jb_test'* in* /etc/puppet/manifests/modules.pp* 
>>3. The file:* /etc/puppet/modules/jb_test/manifests/jb_config.pp*
>>4. The file:* /etc/puppet/modules/jb_test/manifests/init_config.pp*
>>5. The file:* /etc/puppet/modules/jb_test/files/group_test* 
>>6. and finally, in the */etc/puppet/manifests/nodes.pp*
>>
>> node 'vm-jeeva2' {
>>> include cp_jboss_conf
>>> }
>>
>>
>> (don't add inherits jeeva_base for the time being)
>>
>> Cheers!!
>>
>>
>>
>>
>> On Monday, April 16, 2012 1:06:59 PM UTC+1, Jeeva wrote:
>>>
>>> Hi Sans,
>>>
>>> I followed your steps, but i am getting the same error again
>>>
>>> Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]: Could not find class 
>>> cp_jboss_conf for vm-jeeva2.aircell.prod at /etc/puppet/manifests/nodes/
>>> **vm-jeeva2.aircell.prod.pp:2 on node vm-jeeva2.aircell.prod
>>> Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]: Could not find class 
>>> cp_jboss_conf for vm-jeeva2.aircell.prod at /etc/puppet/manifests/nodes/
>>> **vm-jeeva2.aircell.prod.pp:2 on node vm-jeeva2.aircell.prod
>>> Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]: 
>>> (//vm-jeeva2.aircell.prod/**Puppet) Could not retrieve catalog from 
>>> remote server: Error 400 on SERVER: Could not find class cp_jboss_conf for 
>>> vm-jeeva2.aircell.prod at 
>>> /etc/puppet/manifests/nodes/**vm-jeeva2.aircell.prod.pp:2 
>>> on node vm-jeeva2.aircell.prod
>>> Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]: 
>>> (//vm-jeeva2.aircell.prod/**Puppet) Using cached catalog
>>> Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]: 
>>> (//vm-jeeva2.aircell.prod/**Puppet) Could not retrieve catalog; 
>>> skipping run
>>>  
>>> @All, Just not to confuse anyone, currently my puppet server is working 
>>> as expected. i have lot of modules created and it works. This is how my 
>>> configuration is 
>>>
>>> 1 ) my site.pp file is under /etc/puppet/manifest/site.pp and below is 
>>> my content
>>> import 'nodes/*'
>>> $puppetserver = 'puppet-server.domain.com'
>>>
>>> 2) All my modules is under below path 
>>>
>>> /etc/puppet/modules/
>>>
>>> 3) under below path i have all my .pp files . eg 
>>>
>>> /etc/puppet/manifests/nodes/**server1.pp
>>> /etc/puppet/manifests/nodes/**server2.pp
>>> /etc/puppet/manifests/nodes/**server3.pp
>>> /etc/puppet/manifests/nodes/**server4.pp
>>>
>>>  addition to this i have a jeeva_base.pp file where i include all my 
>>> modules. below is the portion of its content
>>> --**-
>>> node jeeva_base {
>>>  include all_scripts
>>> include dev_jboss_jeeva
>>> }
>>> --**-
>>> below is the content of my server1.pp file . i have created individual 
>>> .pp file for each server which inherits jeeva_base node. 
>>> --**
>>> node server1 inherits jeeva_base {
>>> }
>>> --**-
>>>
>>> As i said above, this is my requirement.
>>>
>>> we have 3 version of jboss running in our environment in different 
>>> servers. eg. jboss4 in server1, jboss5 in server2 , jboss6 in server3 , and 
>>> no jboss in server 4 , etc
>>>
>>> on each server, jboss config file sits under different path.
>>> eg: in server 1 it sits under /opt/jboss4/
>>>   in server 2 it sits under /opt/jboss5/
>>>   in server 3 it sits under /opt/jboss6/
>>>   in server 4 no jboss is running
>>>
>>> now i have 3 different configuration file for each version of jboss 
>>> which i need to replace. eg.
>>>  file1,  i need to replace it t

[Puppet Users] Re: node-specific resources outside of a general-purpose module

2012-04-16 Thread jcbollinger


On Apr 16, 3:13 am, Jonathon Anderson  wrote:
> On Monday, April 9, 2012 5:35:09 PM UTC+3, jcbollinger wrote:
>
> > I'm not following why defined types present a special problem here.
>
> They aren't a special problem: they simply haven't *solved* the problem.
>  If as generalized as I can get is defining some types, where do I put the
> declaration of these types so that they get applied to my nodes?


You put them into classes that are declared on your nodes -- but that
can't be the answer you're looking for.  If Jeff's response does not
adequately address your question then perhaps an example would help.
What kind of defined type instances are you struggling to find a home
for?


> It's entirely possible that this is just a namespacing question: I've seen
> references to a `site` module where such site-specific classes should go,
> and, as I've said, we're already using modules with a `s_` prefix for this
> purpose; but I'm looking for what the normal thing is.  If modules are not
> supposed to be site-specific, where do I put my site-specific config?


As a matter of best practices, modules should not contain site-
specific *data*.  Instead, they should obtain such data from an
external source, one or more of node facts, external data via a
service such as hiera, or class parameters.  Also as a matter of best
practices, all classes should be in modules.  These principles do not
conflict.

If you have classes that are site-specific in the sense that nobody
else would want to do the things they do (as opposed to containing
site-specific data), then I don't see any problem with putting them in
one or more modules.  If you want, you can add a directory to your
module path for such modules, but I don't see any special need to do
so.


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-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] Is paramater ordering non-deterministic?

2012-04-16 Thread Nan Liu
On Mon, Apr 16, 2012 at 6:22 AM, Robert Rothenberg  wrote:
> So will the setting of the values for $owner and $prefix be deterministic,
> when set inside a class or resource definition?

Yes. The issue with parameters in class declaration is described in
further details here:
http://projects.puppetlabs.com/issues/9848

> Also, what if I want to be able to override these with user settings?
> (That's one of the reasons that they are parameters in the first place.)

John's example works with the edge case where you actually want to set
a variable to '', you'll see our documentation list 'UNSET' as the
default for this reason:
http://docs.puppetlabs.com/guides/parameterized_classes.html

Thanks,

Nan

-- 
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] How to modify a file content?

2012-04-16 Thread Marco Parra D.
Hi guys, I trying to modify a file on Windows using puppet,  I got a 
template file like this:

[default]
host = SOmeNAme

[WinEventLog:Security]
disabled = 1

is copied using puppet to the windows machine as C:\Program 
Files\Soft1\inputs.conf


And I need to replace the host line with the real name of the windows 
machine:


i.e.: host = machine1

Is this possible using puppet for windows?

Regards.

--
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: Is paramater ordering non-deterministic?

2012-04-16 Thread jcbollinger


On Apr 16, 8:22 am, Robert Rothenberg  wrote:
> So will the setting of the values for $owner and $prefix be deterministic,
> when set inside a class or resource definition?


Manifest code inside a class or definition is processed in lexical
order.

Note also that some programming languages behave similarly to Puppet,
in that their specifications do not require function arguments to be
evaluated in order.  C, for example.


> Also, what if I want to be able to override these with user settings?
> (That's one of the reasons that they are parameters in the first place.)


This is the usual idiom:

class foo(
$owner,
$user_prefix  = '',
$user_etc_dir = ''
   ) {
$prefix  = $user_prefix ? { '' => "/opt/${owner}", default =>
$user_prefix }
$etc_dir = $user_etc_dir ? { '' => "${prefix}/etc", default =>
$user_etc_dir }

...
 }


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-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] content & source

2012-04-16 Thread Antidot SAS
Hi everyone,


Maybe a dump question but what happens if for a file ressource I specify a
source and a content? Is there a priority? The resul won't be determinist?


Regards,
JM

-- 
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] regsubst and regex

2012-04-16 Thread Antidot SAS
Thx for the reply it helps.

But how come the \2 returns something that I never asked?





On Mon, Apr 16, 2012 at 3:47 PM, Thomas Bellman  wrote:

> On 2012-04-16 15:26, Antidot SAS wrote:
>
> > A quick question for you, here is the code:
> > $tt=regsubst("test","^(.*)->(.*)",'\2')
> >
> > Doesn't return: undef or nil, it does return:  "test"
>
> As expected and intended.
>
> > Niether does $tt=regsubst("test","^(.?)->(.*)",'\2')
> > or $tt=regsubst("test","^(.+?)->(.*)",'\2').
> >
> > Is there a way to return undef if the string doesn't include
> '->something' ?
>
> Perhaps something like this:
>
>$x = 'test'
>$temp = regsubst($x, '^(.*)->(.*)', '\2')
>if $temp == $x {
># No substitution done, must mean there is no "->" in $x
>$tt = undef
>} else {
>$tt = $temp
>}
>
> Or perhaps this:
>
>$tt = regsubst($x, '^(.*)->(.*)|.*', '\2')
>
> It will however give you the empty string (""), not undef, if there is
> no "->" in the string.
>
>
>/Bellman
>
> --
> 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 definitions and hashes/arrays syntax problem.

2012-04-16 Thread jcbollinger


On Apr 13, 10:17 am, Rocky  wrote:
> Hi, I have this definiton for keepalived. And i need to feed the template
> this array that i will loop trough.
>
> site.pp definition snippet:
>
> >  keepalived::vrrp_virtual_server {
>
>                real_servers = { realserver1 => { ip => '192.168.33.10',


Variables in Puppet manifests are designated by an initial '$' sigil:

$real_servers = ...

(The sigil is left off when you refer to local Puppet variables in
templates, however.)


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-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: New CA, why do clients with old certs still work?

2012-04-16 Thread jcbollinger


On Apr 13, 1:40 pm, Chip Schweiss  wrote:
> I'm in the process of scalling my puppet master to two server with a
> separate CA.   My plan was to establish a new CA and reissue
> certificates.   Part way through the process I noticed a behavior that
> seems a bit alarming.
>
> With one of my clients pointing to the new CA and new Puppetmaster but with
> the old certificate I ran a 'puppetd --test --server puppet01.mydomain'
>
> I was expecting it to fail validation and then regenerate the client
> certificate.  However it ran without error.
>
> Thinking maybe it's still hitting the orginal CA, I backed-up and wiped the
> ssl dir on the puppetmaster and restarted the pupetmaster to generate a new
> CA.   The client still works.  There are no signed certificates for this
> client on either puppetmaster or CA now and it still runs.
>
> Am I missing something about how the puppetmaster decides it's okay to talk
> to a client, or is all the security simply on the client side, and the
> puppetmaster trusts any puppet client?


I'm about confused about what you mean by the client "pointing to the
new CA" and Puppet "hitting the original CA".  The CA is only involved
in signing certificates.  It is not actively involved in verifying
certificates (though verifiers do use the CA's certificate).
Admitedly, that distinction can be somewhat muddy when the
Puppetmaster serves as its own CA, but it more-or-less still holds.

If your client already has a valid certificate, regardless of which CA
signed it, then that is the certificate it will present.  If the
master can verify that certificate then it will accept the client.

If you want the master to reject certificates signed by the old CA,
then you must configure it so that it does not trust that CA.  Even
better, also revoke all the certificates signed by the old CA and
install the corresponding CRL in the master.


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-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] regsubst and regex

2012-04-16 Thread Thomas Bellman
On 2012-04-16 15:26, Antidot SAS wrote:

> A quick question for you, here is the code:
> $tt=regsubst("test","^(.*)->(.*)",'\2')
> 
> Doesn't return: undef or nil, it does return:  "test"

As expected and intended.

> Niether does $tt=regsubst("test","^(.?)->(.*)",'\2')
> or $tt=regsubst("test","^(.+?)->(.*)",'\2').
> 
> Is there a way to return undef if the string doesn't include '->something' ?

Perhaps something like this:

$x = 'test'
$temp = regsubst($x, '^(.*)->(.*)', '\2')
if $temp == $x {
# No substitution done, must mean there is no "->" in $x
$tt = undef
} else {
$tt = $temp
}

Or perhaps this:

$tt = regsubst($x, '^(.*)->(.*)|.*', '\2')

It will however give you the empty string (""), not undef, if there is
no "->" in the string.


/Bellman

-- 
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: override/replace native types

2012-04-16 Thread Guillaume Rousse

Le 16/04/2012 15:02, jcbollinger a écrit :

Moreover, I don't find the current behavior that bad.  Is it better to
continue running the service with an out-of-date configuration?  Is it
better to delay discovering the problem until the machine is
restarted, or until you or some other admin tries to restart the
service manually?  If it were my server, the answers to both questions
would be "no".
I wholefully agree. My final objective is to test, reload is everything 
is OK, and notifies otherwise so as to have the problem be corrected 
ASAP. I described only initial step to make the point easier.


I don't want to interfere with native distribution initscripts, mainly 
for maintenance reasons. However, using a custom wrapper could be the 
solution here.

--
BOFH excuse #297:

Too many interrupts

--
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: Define node environment on puppet master nodes.pp?

2012-04-16 Thread jcbollinger


On Apr 12, 5:26 pm, "Will S. G."  wrote:
> Hello,
>
> Is there a way to define an environment for the prospective nodes in
> nodes.pp (maybe a default node?) I'd like to be able to define it there and
> then have my puppet module configure the node puppet.conf (erb template)
> based on the parameters that’s passed on from the master. Possible?


If present, the special node name "default" will match any node that
is not matched by another node definition (including one actually
named "default", if there is any).

I'm having trouble seeing how that will actually help you, though,
because you have to have Puppet already running on the client.  Also,
it is tricky (but I think possible) to make Puppet reconfigure itself
in such a way that future runs would select a different node
definition.  You would need to deal with installing the corresponding
cryptographic certificate.


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-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] regsubst and regex

2012-04-16 Thread Antidot SAS
Hi everyone,


A quick question for you, here is the code:
$tt=regsubst("test","^(.*)->(.*)",'\2')

Doesn't return: undef or nil, it does return:  "test"


Niether does $tt=regsubst("test","^(.?)->(.*)",'\2')
or $tt=regsubst("test","^(.+?)->(.*)",'\2').

Is there a way to return undef if the string doesn't include '->something' ?


Regards,
JM

-- 
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: service restart upon notify

2012-04-16 Thread jcbollinger


On Apr 12, 3:07 pm, puppetguest  wrote:
> I have choosen to split my module into several .pp files as i have
> seen in an example and makes it cleaner i think.
>
> \modules\mysoftware\
> init.pp
> install.pp
> config.pp
> service.pp
>
> Is that recommended or too many disadvantages ?


The recommended method is to put each class and each definition in its
own file.  If there is a class with the same qualified name as the
module then it goes in the init.pp; all other classes and definitions
should go into files whose names correspond to the name of the class
or definition they contain.

How you assign resources to classes is an entirely separate question.
That may be more what you were asking about, but if you want opinions
on that question then you'll need to show us what you're doing.


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-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] Is paramater ordering non-deterministic?

2012-04-16 Thread Robert Rothenberg
So will the setting of the values for $owner and $prefix be deterministic, 
when set inside a class or resource definition?

Also, what if I want to be able to override these with user settings? 
(That's one of the reasons that they are parameters in the first place.)

On Monday, April 16, 2012 2:14:36 PM UTC+1, Henrik Lindberg wrote:
>
> The evaluation order of the parameters is not deterministic as I learned 
> when implementing validation of references in Geppetto. (BTW, Geppetto 
> issues warnings/errors when trying to reference potentially 
> uninitialized variables as in your example).
>
> You need to move the logic computing the resulting defaults inside the 
> class to be able to use the $owner and $prefix values.
>
> Regards
> - henrik
>
> On 2012-16-04 12:39, Robert Rothenberg wrote:
> > I've run into the following issue with parameters that are dependent on
> > each other. Suppose I have the following class:
> >
> > |   class foo(
> >  $owner,
> >  $prefix  = "/opt/${owner}",
> >  $etc_dir = "${prefix}/etc"
> > ) {
> >
> > file{"${etc_dir}":
> >  ensure =>  directory,
> >  owner  =>  $owner,
> >  group   =>  $owner,
> >  mode   =>  0660,
> >
> >  ...
> >
> >   }|
> >
> >
> > The order that the parameters are defined appears to be
> > non-deterministic, so that sometimes $etc_dir is defined before $prefix.
> > Which means that $etc is set to '/etc', and of course, this restricts
> > the permissions on /etc, which breaks the server (including preventing
> > any user, including root, from sudoing!). Fortunately, this was found
> > while testing manifests on disposable virtual machines. I shudder to
> > think what would have happened if we didn't figure out the cause and
> > deployed this on actual servers.
> >
> > So, am I correct in assuming that the order of parameter setting is
> > non-deterministic (and so should avoid setting them like above), or is
> > there something else going on?
> >
> > If parameter order is not deterministic, I do think it should be
> > explicitly documented, with a warning about what can go wrong.
> > (Apologies if I've been daft and missed an existing mention of this
> > somewhere.)
> >
> > FWIW, I added a note to http://projects.puppetlabs.com/issues/4408 about
> > this issue.
> >
> >
> >
>
>

-- 
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/-/r2OAYubbE-oJ.
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: Does one puppet master support multiply users to manage their resources?

2012-04-16 Thread jcbollinger


On Apr 12, 10:06 pm, runner  wrote:
> Hi,
>
> I am a new user of puppet. We want every user of our group to manage
> software in his/her machines. How can puppet support this? Thank you.


Puppet does not prevent users from employing the ordinary tools (yum,
apt, etc.) for managing software.  You could consider just giving
users the ability to run yum via sudo, instead of complicating things
by involving Puppet.

Do note, by the way, that allowing users to install or update software
of their choice on their computers makes it easy for them to
completely subvert their systems, whether they are using their
systems' tools directly or via Puppet.  If you have some idea that
Puppet can prevent that then give it up now.

If you still want to delegate some degree of responsibility for
software management to users, and to do it via Puppet, then you could
look at putting per-machine config files in a source repository, such
as Subversion.  Rely on the repository's access controls to protect
those files from unauthorized changes.  On the master, pull down the
latest config files at least as often as the client run interval, and
build a module around using Hiera to load the data into Package
resources.


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-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] Is paramater ordering non-deterministic?

2012-04-16 Thread Henrik Lindberg
The evaluation order of the parameters is not deterministic as I learned 
when implementing validation of references in Geppetto. (BTW, Geppetto 
issues warnings/errors when trying to reference potentially 
uninitialized variables as in your example).


You need to move the logic computing the resulting defaults inside the 
class to be able to use the $owner and $prefix values.


Regards
- henrik

On 2012-16-04 12:39, Robert Rothenberg wrote:

I've run into the following issue with parameters that are dependent on
each other. Suppose I have the following class:

|   class foo(
 $owner,
 $prefix  = "/opt/${owner}",
 $etc_dir = "${prefix}/etc"
) {

file{"${etc_dir}":
 ensure =>  directory,
 owner  =>  $owner,
 group   =>  $owner,
 mode   =>  0660,

 ...

  }|


The order that the parameters are defined appears to be
non-deterministic, so that sometimes $etc_dir is defined before $prefix.
Which means that $etc is set to '/etc', and of course, this restricts
the permissions on /etc, which breaks the server (including preventing
any user, including root, from sudoing!). Fortunately, this was found
while testing manifests on disposable virtual machines. I shudder to
think what would have happened if we didn't figure out the cause and
deployed this on actual servers.

So, am I correct in assuming that the order of parameter setting is
non-deterministic (and so should avoid setting them like above), or is
there something else going on?

If parameter order is not deterministic, I do think it should be
explicitly documented, with a warning about what can go wrong.
(Apologies if I've been daft and missed an existing mention of this
somewhere.)

FWIW, I added a note to http://projects.puppetlabs.com/issues/4408 about
this issue.





--
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/-/AjNp3Hlh8woJ.
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 dashboard and mysql server is not localhost

2012-04-16 Thread Fabien COMBERNOUS

On 16/04/2012 14:03, Fabien COMBERNOUS wrote:

[...]

Then i used the migrate and got the following output :
server1:puppet-dashboard root#  rake RAILS_ENV=production db:migrate
(in /usr/share/puppet-dashboard)
rake aborted!
uninitialized constant MysqlCompat::MysqlRes

I missed something ?


The answer is with MacOSX Lion :
install_name_tool -change libmysqlclient.18.dylib 
/usr/local/mysql/lib/libmysqlclient.18.dylib  
/Library/Ruby/Gems/1.8/gems/mysql-2.8.1/lib/mysql_api.bundle


--
*Fabien COMBERNOUS*
/unix system engineer/
www.kezia.com 
*Tel: +33(0)4 6787 0704 / +33(0)6 2584 0337*
Kezia

--
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: override/replace native types

2012-04-16 Thread jcbollinger


On Apr 13, 4:08 am, Guillaume Rousse  wrote:
> Hello list.
>
> I'd like to implement a basic 'onlyif' property, as existing in 'exec'
> type, to 'service' type. Rather than patching the original puppet code,
> I think I could use the custom type mechanism, and implement my own
> 'conditional_service' type. However, in order to keep the benefit of
> existing providers, I think renaming the type isn't the best solution.
>
> So, would it possible to either inherit the original type definition,
> and just add the new property, or distributing a modified type copy as
> part of a module would also replace original type definition for this
> module ?


No.

That is, you *can* subclass the built-in type and add a parameter, but
you cannot expect the existing type's providers to work with your
subclass.  In fact, it is likely that the new behavior you want needs
to be in the provider(s) anyway.


> BTW, the exact intent is to allow to test the configuration file syntax
> before reloading a service, and avoid reloading it with an invalid
> state. Something as:
>
> file { "/etc/openldap/slapd.conf":
>    content => template("slapd.conf.erb"),
>    notify  => Service["slapd"]
>
> }
>
> service { "slapd":
>    ensure => "running",
>    onlyif => "/usr/sbin/slaptest"}


I'm with Craig that it would be best to rely on the initscript to
perform the test.

Moreover, I don't find the current behavior that bad.  Is it better to
continue running the service with an out-of-date configuration?  Is it
better to delay discovering the problem until the machine is
restarted, or until you or some other admin tries to restart the
service manually?  If it were my server, the answers to both questions
would be "no".


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-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: Need puppet module for condition copy

2012-04-16 Thread Munna S
   1. The line: *import 'modules'* in */etc/puppet/manifests/site.pp
   - i do have site.pp file but dont have the entry for modules. i added
   the entry but later i saw lot of errors related to modules in log
   *
   2. The line: *import 'jb_test'* in* /etc/puppet/manifests/modules.pp
   - i dont have modules.pp file. But as i said in my previous email, i
   have customised servername.pp siles
   *
   3. The file:* /etc/puppet/modules/jb_test/manifests/jb_config.pp
   - i created this file
   *
   4. The file:* /etc/puppet/modules/jb_test/manifests/init_config.pp
   - i created this file
   *
   5. The file:* /etc/puppet/modules/jb_test/files/group_test
   - i have this file*
   6. and finally, in the */etc/puppet/manifests/nodes.pp
   - I dont have this file in my configuration*


On Mon, Apr 16, 2012 at 7:38 AM, Sans  wrote:

> humm.. not sure but looks like couple of steps from my previous post
> are missing.
> Can you pls confirm that you have all of these:
>
>
>1. The line: *import 'modules'* in */etc/puppet/manifests/site.pp*
>2. The line: *import 'jb_test'* in* /etc/puppet/manifests/modules.pp*
>3. The file:* /etc/puppet/modules/jb_test/manifests/jb_config.pp*
>4. The file:* /etc/puppet/modules/jb_test/manifests/init_config.pp*
>5. The file:* /etc/puppet/modules/jb_test/files/group_test*
>6. and finally, in the */etc/puppet/manifests/nodes.pp*
>
> node 'vm-jeeva2' {
>> include cp_jboss_conf
>> }
>
>
> (don't add inherits jeeva_base for the time being)
>
> Cheers!!
>
>
>
>
> On Monday, April 16, 2012 1:06:59 PM UTC+1, Jeeva wrote:
>>
>> Hi Sans,
>>
>> I followed your steps, but i am getting the same error again
>>
>> Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]: Could not find class
>> cp_jboss_conf for vm-jeeva2.aircell.prod at /etc/puppet/manifests/nodes/*
>> *vm-jeeva2.aircell.prod.pp:2 on node vm-jeeva2.aircell.prod
>> Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]: Could not find class
>> cp_jboss_conf for vm-jeeva2.aircell.prod at /etc/puppet/manifests/nodes/*
>> *vm-jeeva2.aircell.prod.pp:2 on node vm-jeeva2.aircell.prod
>> Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]:
>> (//vm-jeeva2.aircell.prod/**Puppet) Could not retrieve catalog from
>> remote server: Error 400 on SERVER: Could not find class cp_jboss_conf for
>> vm-jeeva2.aircell.prod at 
>> /etc/puppet/manifests/nodes/**vm-jeeva2.aircell.prod.pp:2
>> on node vm-jeeva2.aircell.prod
>> Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]:
>> (//vm-jeeva2.aircell.prod/**Puppet) Using cached catalog
>> Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]:
>> (//vm-jeeva2.aircell.prod/**Puppet) Could not retrieve catalog; skipping
>> run
>>
>> @All, Just not to confuse anyone, currently my puppet server is working
>> as expected. i have lot of modules created and it works. This is how my
>> configuration is
>>
>> 1 ) my site.pp file is under /etc/puppet/manifest/site.pp and below is my
>> content
>> import 'nodes/*'
>> $puppetserver = 'puppet-server.domain.com'
>>
>> 2) All my modules is under below path
>>
>> /etc/puppet/modules/
>>
>> 3) under below path i have all my .pp files . eg
>>
>> /etc/puppet/manifests/nodes/**server1.pp
>> /etc/puppet/manifests/nodes/**server2.pp
>> /etc/puppet/manifests/nodes/**server3.pp
>> /etc/puppet/manifests/nodes/**server4.pp
>>
>>  addition to this i have a jeeva_base.pp file where i include all my
>> modules. below is the portion of its content
>> --**-
>> node jeeva_base {
>>  include all_scripts
>> include dev_jboss_jeeva
>> }
>> --**-
>> below is the content of my server1.pp file . i have created individual
>> .pp file for each server which inherits jeeva_base node.
>> --**
>> node server1 inherits jeeva_base {
>> }
>> --**-
>>
>> As i said above, this is my requirement.
>>
>> we have 3 version of jboss running in our environment in different
>> servers. eg. jboss4 in server1, jboss5 in server2 , jboss6 in server3 , and
>> no jboss in server 4 , etc
>>
>> on each server, jboss config file sits under different path.
>> eg: in server 1 it sits under /opt/jboss4/
>>   in server 2 it sits under /opt/jboss5/
>>   in server 3 it sits under /opt/jboss6/
>>   in server 4 no jboss is running
>>
>> now i have 3 different configuration file for each version of jboss which
>> i need to replace. eg.
>>  file1,  i need to replace it to jboss4
>> file2 , i need to replace it to jboss5
>> file3 , i need to replace it to jboss6
>> also we need to keep in mind that it should not create a files/folder on
>> server4 which doesnt have jboss.
>>
>> Now i need a module which checks the jboss path on each server and should
>> replace the sepcific file if it finds the specific path. eg
>>
>> if it finds /opt/jboss4, then it should replace file1, if it finds
>> /opt/jboss5, then replace file2 and so on. But

Re: [Puppet Users] Re: Need puppet module for condition copy

2012-04-16 Thread Sans
humm.. not sure but looks like couple of steps from my previous post 
are missing. 
Can you pls confirm that you have all of these:


   1. The line: *import 'modules'* in */etc/puppet/manifests/site.pp*
   2. The line: *import 'jb_test'* in* /etc/puppet/manifests/modules.pp*
   3. The file:* /etc/puppet/modules/jb_test/manifests/jb_config.pp*
   4. The file:* /etc/puppet/modules/jb_test/manifests/init_config.pp*
   5. The file:* /etc/puppet/modules/jb_test/files/group_test*
   6. and finally, in the */etc/puppet/manifests/nodes.pp*

node 'vm-jeeva2' {
> include cp_jboss_conf
> }


(don't add inherits jeeva_base for the time being)

Cheers!!



On Monday, April 16, 2012 1:06:59 PM UTC+1, Jeeva wrote:
>
> Hi Sans,
>
> I followed your steps, but i am getting the same error again
>
> Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]: Could not find class 
> cp_jboss_conf for vm-jeeva2.aircell.prod at 
> /etc/puppet/manifests/nodes/vm-jeeva2.aircell.prod.pp:2 on node 
> vm-jeeva2.aircell.prod
> Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]: Could not find class 
> cp_jboss_conf for vm-jeeva2.aircell.prod at 
> /etc/puppet/manifests/nodes/vm-jeeva2.aircell.prod.pp:2 on node 
> vm-jeeva2.aircell.prod
> Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]: 
> (//vm-jeeva2.aircell.prod/Puppet) Could not retrieve catalog from remote 
> server: Error 400 on SERVER: Could not find class cp_jboss_conf for 
> vm-jeeva2.aircell.prod at 
> /etc/puppet/manifests/nodes/vm-jeeva2.aircell.prod.pp:2 on node 
> vm-jeeva2.aircell.prod
> Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]: 
> (//vm-jeeva2.aircell.prod/Puppet) Using cached catalog
> Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]: 
> (//vm-jeeva2.aircell.prod/Puppet) Could not retrieve catalog; skipping run
>  
> @All, Just not to confuse anyone, currently my puppet server is working as 
> expected. i have lot of modules created and it works. This is how my 
> configuration is 
>
> 1 ) my site.pp file is under /etc/puppet/manifest/site.pp and below is my 
> content
> import 'nodes/*'
> $puppetserver = 'puppet-server.domain.com'
>
> 2) All my modules is under below path 
>
> /etc/puppet/modules/
>
> 3) under below path i have all my .pp files . eg 
>
> /etc/puppet/manifests/nodes/server1.pp
> /etc/puppet/manifests/nodes/server2.pp
> /etc/puppet/manifests/nodes/server3.pp
> /etc/puppet/manifests/nodes/server4.pp
>
>  addition to this i have a jeeva_base.pp file where i include all my 
> modules. below is the portion of its content
> ---
> node jeeva_base {
>  include all_scripts
> include dev_jboss_jeeva
> }
> ---
> below is the content of my server1.pp file . i have created individual .pp 
> file for each server which inherits jeeva_base node. 
> --
> node server1 inherits jeeva_base {
> }
> ---
>
> As i said above, this is my requirement.
>
> we have 3 version of jboss running in our environment in different 
> servers. eg. jboss4 in server1, jboss5 in server2 , jboss6 in server3 , and 
> no jboss in server 4 , etc
>
> on each server, jboss config file sits under different path.
> eg: in server 1 it sits under /opt/jboss4/
>   in server 2 it sits under /opt/jboss5/
>   in server 3 it sits under /opt/jboss6/
>   in server 4 no jboss is running
>
> now i have 3 different configuration file for each version of jboss which 
> i need to replace. eg.
>  file1,  i need to replace it to jboss4
> file2 , i need to replace it to jboss5
> file3 , i need to replace it to jboss6
> also we need to keep in mind that it should not create a files/folder on 
> server4 which doesnt have jboss. 
>
> Now i need a module which checks the jboss path on each server and should 
> replace the sepcific file if it finds the specific path. eg
>
> if it finds /opt/jboss4, then it should replace file1, if it finds 
> /opt/jboss5, then replace file2 and so on. But if no jboss path is found 
> then dont perform any thing on that server. 
>
> As suggested by Gary ( initial conversation) , gary helped me to create 
> the custom facts. but it didnt work. Not sure what went wrong. 
> in general, my requirement is very simple. just do a check on each server 
> for specific path. if found, then copy/replace respective file , if not 
> found then dont perform any action on that server. 
> I hope i didnt confuse anyone. 
>  
> Thanks,
> Jeeva
>  
>  
>  
> On Mon, Apr 16, 2012 at 5:54 AM, Munna S <19.mu...@gmail.com> wrote:
>
>> Hi Sans
>> i am trying it now. will let you know the output soon. Also in my site.pp 
>> i have the below content
>>
>> import 'nodes/*'
>> $puppetserver = 'puppet-server.domain.com'
>>  
>>  
>>  
>> I do have many modules , which works as expected.
>>  
>> Thanks,
>> Jeeva
>>  
>> cat /etc/puppet/manifests/site.pp
>>  On Mon, Apr 16, 2012 at 5:36 AM, Sans  wrote:
>>
>>> It's definitely a

Re: [Puppet Users] Could not send report: Error 400 on SERVER: execution expired

2012-04-16 Thread wen1023 wu
Hi

   I had met the problem,so I want to know the answer.

在 2012年4月16日 下午7:31,Bernd Adamowicz 写道:

> Hi all!
>
> One of my Puppet masters has to compile some 3800 stored configurations
> which takes a very long time to proceed. Example log:
>
> Apr 16 13:17:13 mymaster puppet-agent[15249]: Finished catalog run in
> 954.58 seconds
> Apr 16 13:18:35 mymaster puppet-master[11422]: execution expired
> Apr 16 13:18:35 mymaster puppet-agent[15249]: Could not send report: Error
> 400 on SERVER: execution expired
>
> Seems, this long run leads to the 'execution expired' error. Is there a
> way to change the timeout for reports?
>
> Thanks Bernd
>
> --
> 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: Need puppet module for condition copy

2012-04-16 Thread Munna S
Hi Sans,

I followed your steps, but i am getting the same error again

Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]: Could not find class
cp_jboss_conf for vm-jeeva2.aircell.prod at
/etc/puppet/manifests/nodes/vm-jeeva2.aircell.prod.pp:2 on node
vm-jeeva2.aircell.prod
Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]: Could not find class
cp_jboss_conf for vm-jeeva2.aircell.prod at
/etc/puppet/manifests/nodes/vm-jeeva2.aircell.prod.pp:2 on node
vm-jeeva2.aircell.prod
Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]:
(//vm-jeeva2.aircell.prod/Puppet) Could not retrieve catalog from remote
server: Error 400 on SERVER: Could not find class cp_jboss_conf for
vm-jeeva2.aircell.prod at
/etc/puppet/manifests/nodes/vm-jeeva2.aircell.prod.pp:2 on node
vm-jeeva2.aircell.prod
Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]:
(//vm-jeeva2.aircell.prod/Puppet) Using cached catalog
Apr 16 11:29:39 pil-vm-pup-01 puppet-master[8092]:
(//vm-jeeva2.aircell.prod/Puppet) Could not retrieve catalog; skipping run

@All, Just not to confuse anyone, currently my puppet server is working as
expected. i have lot of modules created and it works. This is how my
configuration is

1 ) my site.pp file is under /etc/puppet/manifest/site.pp and below is my
content
import 'nodes/*'
$puppetserver = 'puppet-server.domain.com'

2) All my modules is under below path

/etc/puppet/modules/

3) under below path i have all my .pp files . eg

/etc/puppet/manifests/nodes/server1.pp
/etc/puppet/manifests/nodes/server2.pp
/etc/puppet/manifests/nodes/server3.pp
/etc/puppet/manifests/nodes/server4.pp

 addition to this i have a jeeva_base.pp file where i include all my
modules. below is the portion of its content
---
node jeeva_base {
 include all_scripts
include dev_jboss_jeeva
}
---
below is the content of my server1.pp file . i have created individual .pp
file for each server which inherits jeeva_base node.
--
node server1 inherits jeeva_base {
}
---

As i said above, this is my requirement.

we have 3 version of jboss running in our environment in different servers.
eg. jboss4 in server1, jboss5 in server2 , jboss6 in server3 , and no jboss
in server 4 , etc

on each server, jboss config file sits under different path.
eg: in server 1 it sits under /opt/jboss4/
  in server 2 it sits under /opt/jboss5/
  in server 3 it sits under /opt/jboss6/
  in server 4 no jboss is running

now i have 3 different configuration file for each version of jboss which i
need to replace. eg.
 file1,  i need to replace it to jboss4
file2 , i need to replace it to jboss5
file3 , i need to replace it to jboss6
also we need to keep in mind that it should not create a files/folder on
server4 which doesnt have jboss.

Now i need a module which checks the jboss path on each server and should
replace the sepcific file if it finds the specific path. eg

if it finds /opt/jboss4, then it should replace file1, if it finds
/opt/jboss5, then replace file2 and so on. But if no jboss path is found
then dont perform any thing on that server.

As suggested by Gary ( initial conversation) , gary helped me to create the
custom facts. but it didnt work. Not sure what went wrong.
in general, my requirement is very simple. just do a check on each server
for specific path. if found, then copy/replace respective file , if not
found then dont perform any action on that server.
I hope i didnt confuse anyone.

Thanks,
Jeeva



On Mon, Apr 16, 2012 at 5:54 AM, Munna S <19.mu...@gmail.com> wrote:

> Hi Sans
> i am trying it now. will let you know the output soon. Also in my site.pp
> i have the below content
>
> import 'nodes/*'
> $puppetserver = 'puppet-server.domain.com'
>
>
>
> I do have many modules , which works as expected.
>
> Thanks,
> Jeeva
>
> cat /etc/puppet/manifests/site.pp
> On Mon, Apr 16, 2012 at 5:36 AM, Sans  wrote:
>
>> It's definitely a class loading problem and I don't think Jeeva is using
>> "modules" at all.
>>
>> Jeeva:
>> Could you pls try the things I said in my previous post and see if that
>> works? Cheers!!
>>
>>
>>
>> On Monday, April 16, 2012 1:34:31 AM UTC+1, Wil Cooley wrote:
>>>
>>> On Apr 13, 10:49 am, Munna S <19.mu...@gmail.com> wrote:
>>> > I followed your steps. now i am getting below error
>>> >
>>> > Apr 13 17:42:44 pil-vm-pup-01 puppet-master[7899]: Could not find
>>> class
>>> > dev_jboss_jeeva for vm-jeeva2.aircell.prod at
>>>
>>> ...
>>>
>>> > i have jeeva_base.pp file under /etc/puppet/manifests/nodes and below
>>> is
>>> > its content
>>> > --**--
>>> > node jeeva_base {
>>> > include dev_jboss_jeeva}
>>> >
>>> > --**
>>> >
>>> > also i have a another .pp file by name vm-jeeva2 under
>>> > /etc/puppet/manifests/nodes and below is its content. we have seperate
>>> .pp
>>> > file for each server 

Re: [Puppet Users] puppet dashboard and mysql server is not localhost

2012-04-16 Thread Fabien COMBERNOUS

Thank you for your answer.

I added the hosts parameter in the file :
# config/database.yml

production:
  database: dashboard
  hosts: server2
  username: dashboard
  password: dashboard
  encoding: utf8
  adapter: mysql

Then i used the migrate and got the following output :
server1:puppet-dashboard root#  rake RAILS_ENV=production db:migrate
(in /usr/share/puppet-dashboard)
rake aborted!
uninitialized constant MysqlCompat::MysqlRes

I missed something ?

On 16/04/2012 13:36, Mike Becker wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

That is possible you just need to edit the hosts parameter. The
Dashboard is a rails application don't forget to migrate your database
afterwards,
Regards,
Mike

Am 16.04.2012 12:19, schrieb Fabien COMBERNOUS:

Hi,

I'm installing puppet dashboard on a server1.
I have an already existing mysql service, hosted on server2. Is it
possible to configure database.yml in the puppet dashboard to use the
host server2 instead of localhost ?

Regards,

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPjARVAAoJEJbRlombcANxKhYH/ijuL/TU6fVuO6Fy4WB29jPJ
wsXMe7KCV0FsAGtNE13L3j+6qHBKNZpbZ72FF/V5hAa5dk5tukLV5il3ZRyEEGxY
3KFyWMtIBA5w9ozmOEpE6XYZQwhVYUDY/q+e7EIYjvJBzdlwuPvQe2xgrulgTjhU
kM1WY8P7SivYcGN1HAZxqjtGJJzpVdJqdCmHoObyIorEyo+fxz7/7nO2108lWrIA
ImomaTI1L/vW+Mmba7y8jc1mYrefy/4GIVVxOHK1S86WtW3TCxVDZa4XzLQqQUjK
ZPGEfHAcNir2YcVn8FiAbVzROKhKxyIYvMy19D29JYkPCoOtKnWOe/1ZYs/Kztk=
=9ZLV
-END PGP SIGNATURE-





--
*Fabien COMBERNOUS*
/unix system engineer/
www.kezia.com 
*Tel: +33(0)4 6787 0704 / +33(0)6 2584 0337*
Kezia

--
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 dashboard and mysql server is not localhost

2012-04-16 Thread Mike Becker
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

That is possible you just need to edit the hosts parameter. The
Dashboard is a rails application don't forget to migrate your database
afterwards,
Regards,
Mike

Am 16.04.2012 12:19, schrieb Fabien COMBERNOUS:
> Hi,
> 
> I'm installing puppet dashboard on a server1.
> I have an already existing mysql service, hosted on server2. Is it
> possible to configure database.yml in the puppet dashboard to use the
> host server2 instead of localhost ?
> 
> Regards,

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPjARVAAoJEJbRlombcANxKhYH/ijuL/TU6fVuO6Fy4WB29jPJ
wsXMe7KCV0FsAGtNE13L3j+6qHBKNZpbZ72FF/V5hAa5dk5tukLV5il3ZRyEEGxY
3KFyWMtIBA5w9ozmOEpE6XYZQwhVYUDY/q+e7EIYjvJBzdlwuPvQe2xgrulgTjhU
kM1WY8P7SivYcGN1HAZxqjtGJJzpVdJqdCmHoObyIorEyo+fxz7/7nO2108lWrIA
ImomaTI1L/vW+Mmba7y8jc1mYrefy/4GIVVxOHK1S86WtW3TCxVDZa4XzLQqQUjK
ZPGEfHAcNir2YcVn8FiAbVzROKhKxyIYvMy19D29JYkPCoOtKnWOe/1ZYs/Kztk=
=9ZLV
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Could not send report: Error 400 on SERVER: execution expired

2012-04-16 Thread Bernd Adamowicz
Hi all!

One of my Puppet masters has to compile some 3800 stored configurations which 
takes a very long time to proceed. Example log:

Apr 16 13:17:13 mymaster puppet-agent[15249]: Finished catalog run in 954.58 
seconds
Apr 16 13:18:35 mymaster puppet-master[11422]: execution expired
Apr 16 13:18:35 mymaster puppet-agent[15249]: Could not send report: Error 400 
on SERVER: execution expired

Seems, this long run leads to the 'execution expired' error. Is there a way to 
change the timeout for reports?

Thanks Bernd

-- 
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]

2012-04-16 Thread Afroz Hussain
Hi,

I updated the Puppet Enterprise 2.0 to 2.5.1 and tried to restart the httpd
and getting following error in /var/log/pe-httpd/puppetdashboard.error.log

[warn] RSA server certificate CommonName (CN) `pe-internal-dashboard' does
NOT match server name!?

-- 
Thanks,
Aphroj Hussain

-- 
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] Question regarding multi-OS NTP manifest

2012-04-16 Thread Jesse
Hi all,

I'm jumping into learning puppet with the modules on Puppetlabs
websites, but I'm running into a few issues and I could use some help.
I'm currently working on the second exercise here:

http://docs.puppetlabs.com/learning/variables.html

I can write a manifest that installs NTP for CentOS:

package { 'ntp':
  ensure => installed,
}

file { '/etc/ntp.conf':
owner   => 'root',
group   => 'root',
mode=> '640',
content => "server 0.rhel.pool.ntp.org",
notify  => Service['ntpd'],
require => Package['ntp'],
}

service { 'ntpd':
  ensure => running,
  enable => true,
  hasstatus  => true,
  hasrestart => true,
}

But when I try to use the $case variable to select the correct OS, I
get an error. Here's my manifest:

package { 'ntp':
ensure => installed,
}
file { '/etc/ntp.conf':
content => "server 0.rhel.pool.ntp.org",
owner   => 'root',
mode=> '640',
require =>  Package['ntp'],
}
case $operatingsystem {
centos, redhat: { $ntp = "ntp" }
debain, ubuntu: { $ntp = "ntpd" }
default: { fail("Unrecognized operating system for webserver") }
}

if $ntp == 'ntp' {
  service { 'ntp':
name   => $ntp,
ensure => running,
enable => true,
hasrestart => true,
hasstatus  => true,
  }
}
else {
service { 'ntpd':
  name   => $ntp,
  ensure => running,
  enable => true,
  hasstatus  => true,
  hasrestart => true,
}
  }

I've tried to reorder things a few different ways but I have a feeling
this is related to how I'm using the case variable and the if/else
statement. My error is this:

err: /Stage[main]//Service[ntp]/ensure: change from stopped to running
failed: Could not start Service[ntp]: Execution of '/sbin/service ntp
start' returned 1:  at /root/learning-manifests/ntp.pp:24

Which confuses me, because the after the manifest is finished the /etc/
ntp.conf file is written and configured correctly, NTP is installed,
but it's calling '/sbin/service ntp start' as opposed to '/etc/init.d/
ntp start.'

When I run the vanilla script, everything configures correctly and
ntp(d) is started. Why is my second script using /sbin when it seems
that it should be using /etc/init.d/?

Thanks!

Jesse

-- 
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] Is paramater ordering non-deterministic?

2012-04-16 Thread Robert Rothenberg
I've run into the following issue with parameters that are dependent on 
each other. Suppose I have the following class:

  class foo(
$owner,
$prefix  = "/opt/${owner}",
$etc_dir = "${prefix}/etc"
   ) {

   file{"${etc_dir}":
ensure => directory,
owner  => $owner,
group   => $owner,
mode   => 0660,

...

 }


The order that the parameters are defined appears to be non-deterministic, 
so that sometimes $etc_dir is defined before $prefix. Which means that $etc 
is set to '/etc', and of course, this restricts the permissions on /etc, 
which breaks the server (including preventing any user, including root, 
from sudoing!).  Fortunately, this was found while testing manifests on 
disposable virtual machines. I shudder to think what would have happened if 
we didn't figure out the cause and deployed this on actual servers.

So, am I correct in assuming that the order of parameter setting is 
non-deterministic (and so should avoid setting them like above), or is 
there something else going on?

If parameter order is not deterministic, I do think it should be explicitly 
documented, with a warning about what can go wrong. (Apologies if I've been 
daft and missed an existing mention of this somewhere.)

FWIW, I added a note to http://projects.puppetlabs.com/issues/4408 about 
this issue.





-- 
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/-/AjNp3Hlh8woJ.
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] puppet dashboard and mysql server is not localhost

2012-04-16 Thread Fabien COMBERNOUS

Hi,

I'm installing puppet dashboard on a server1.
I have an already existing mysql service, hosted on server2. Is it 
possible to configure database.yml in the puppet dashboard to use the 
host server2 instead of localhost ?


Regards,
--
*Fabien COMBERNOUS*
/unix system engineer/
www.kezia.com 
*Tel: +33(0)4 6787 0704 / +33(0)6 2584 0337*

--
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: Need puppet module for condition copy

2012-04-16 Thread Munna S
Hi Sans
i am trying it now. will let you know the output soon. Also in my site.pp i
have the below content

import 'nodes/*'
$puppetserver = 'puppet-server.domain.com'



I do have many modules , which works as expected.

Thanks,
Jeeva

cat /etc/puppet/manifests/site.pp
On Mon, Apr 16, 2012 at 5:36 AM, Sans  wrote:

> It's definitely a class loading problem and I don't think Jeeva is using
> "modules" at all.
>
> Jeeva:
> Could you pls try the things I said in my previous post and see if that
> works? Cheers!!
>
>
>
> On Monday, April 16, 2012 1:34:31 AM UTC+1, Wil Cooley wrote:
>>
>> On Apr 13, 10:49 am, Munna S <19.mu...@gmail.com> wrote:
>> > I followed your steps. now i am getting below error
>> >
>> > Apr 13 17:42:44 pil-vm-pup-01 puppet-master[7899]: Could not find class
>> > dev_jboss_jeeva for vm-jeeva2.aircell.prod at
>>
>> ...
>>
>> > i have jeeva_base.pp file under /etc/puppet/manifests/nodes and below
>> is
>> > its content
>> > --**--
>> > node jeeva_base {
>> > include dev_jboss_jeeva}
>> >
>> > --**
>> >
>> > also i have a another .pp file by name vm-jeeva2 under
>> > /etc/puppet/manifests/nodes and below is its content. we have seperate
>> .pp
>> > file for each server name. one server is vm-jeeva2.
>> > --
>> > node vm-jeeva2 inherits jeeva_base {}
>> >
>> > 
>> >
>> > what could be the problem ?
>>
>> Where is the class dev_jboss_jeeva defined? You mentioned above an
>> 'init.pp', which would be usual if you were using modules, but it does
>> not seem like you are using modules.
>>
>> It sounds like the problem you are having is wholly outside of the
>> complicated machinations of what you're trying to do. It looks more
>> like you have a much simpler class-loading problem.
>>
>> Here are a few things to try:
>>   * Comment out all of the stuff from dev_jboss_jeeva and replace it
>> with a "warning" function call, to log that everything is working
>> right:
>>   class dev_jboss_jeeva {
>> warning("dev_jboss_jeeva has successfully loaded")
>>   }
>>   * Copy your class dev_jboss_jeeva { ... } right before the "node
>> jeeva_base" and see if you see your warning message (I suggest warning
>> instead of info because info sometimes requires using --verbose on the
>> command line; warning will always show):
>>   class dev_jboss_jeeva {
>> warning("dev_jboss_jeeva was here")
>>   }
>>   node jeeva_base {
>> include dev_jboss_jeeva
>>   }
>>
>> If you see the message with the class defined right before the node,
>> but not wherever else you have it, then you know the problem is that
>> it is unable to actually find the class and you should give specifics
>> about that instead.
>>
>> Wil
>
>  --
> 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/-/_Puid9FxhfAJ.
>
> 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: Need puppet module for condition copy

2012-04-16 Thread Sans
It's definitely a class loading problem and I don't think Jeeva is using 
"modules" at all. 

Jeeva:
Could you pls try the things I said in my previous post and see if that 
works? Cheers!! 



On Monday, April 16, 2012 1:34:31 AM UTC+1, Wil Cooley wrote:
>
> On Apr 13, 10:49 am, Munna S <19.mu...@gmail.com> wrote: 
> > I followed your steps. now i am getting below error 
> > 
> > Apr 13 17:42:44 pil-vm-pup-01 puppet-master[7899]: Could not find class 
> > dev_jboss_jeeva for vm-jeeva2.aircell.prod at 
>
> ... 
>
> > i have jeeva_base.pp file under /etc/puppet/manifests/nodes and below is 
> > its content 
> >  
> > node jeeva_base { 
> > include dev_jboss_jeeva} 
> > 
> > -- 
> > 
> > also i have a another .pp file by name vm-jeeva2 under 
> > /etc/puppet/manifests/nodes and below is its content. we have seperate 
> .pp 
> > file for each server name. one server is vm-jeeva2. 
> > -- 
> > node vm-jeeva2 inherits jeeva_base {} 
> > 
> >  
> > 
> > what could be the problem ? 
>
> Where is the class dev_jboss_jeeva defined? You mentioned above an 
> 'init.pp', which would be usual if you were using modules, but it does 
> not seem like you are using modules. 
>
> It sounds like the problem you are having is wholly outside of the 
> complicated machinations of what you're trying to do. It looks more 
> like you have a much simpler class-loading problem. 
>
> Here are a few things to try: 
>   * Comment out all of the stuff from dev_jboss_jeeva and replace it 
> with a "warning" function call, to log that everything is working 
> right: 
>   class dev_jboss_jeeva { 
> warning("dev_jboss_jeeva has successfully loaded") 
>   } 
>   * Copy your class dev_jboss_jeeva { ... } right before the "node 
> jeeva_base" and see if you see your warning message (I suggest warning 
> instead of info because info sometimes requires using --verbose on the 
> command line; warning will always show): 
>   class dev_jboss_jeeva { 
> warning("dev_jboss_jeeva was here") 
>   } 
>   node jeeva_base { 
> include dev_jboss_jeeva 
>   } 
>
> If you see the message with the class defined right before the node, 
> but not wherever else you have it, then you know the problem is that 
> it is unable to actually find the class and you should give specifics 
> about that instead. 
>
> Wil

-- 
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/-/_Puid9FxhfAJ.
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] pluginsync - custom fact with 0 size

2012-04-16 Thread ScOut3R
Dear List,

i'm running Puppet version 2.7.1 (Natty backport) on both sides. I
have a custom fact in [module]/lib/facter/customfact.rb and i have
enabled pluginsync on both the server and client side. When i'm
running the agent it shows the following output:


puppetd --test --noop
info: Retrieving plugin
notice: /File[/var/lib/puppet/lib/facter/customfact.rb]/content:
content changed '{md5}d41d8cd98f00b204e9800998ecf8427e' to '{md5}
e57687d165dc489c3738d481583c1062'
info: Loading downloaded plugin /var/lib/puppet/lib/facter/
latestkernel.rb
info: Loading facts in latestkernel
info: Loading facts in latestkernel
info: Caching catalog for some.domain.tld
info: Applying configuration version '1334569173'
notice: /Stage...module stuff
notice: Finished catalog run in 1.67 seconds

But the plugin on the client is an empty file:

ls -l /var/lib/puppet/lib/facter/
total 0
-rw-rw-r-- 1 root root 0 Apr 16 11:43 customfact.rb

I've tried to find a solution for this but as you see i'm lost. Do you
have any idea what might causing this?

Best regards,
Mate

-- 
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] collecting resources for iteration in a template

2012-04-16 Thread Jonathon Anderson
I have a `sysctl::variable` defined type that creates files in 
`/etc/sysctl.d`.  Some operating systems (*cough*SLES10*cough*) don't read 
sysctl settings from `/etc/sysctl.d`, though, and expect all settings to be 
in a single file, `/etc/sysctl.conf`.  For such operating systems, I'd like 
to define the content of that file with a template that references the 
values of the `sysctl::variable`s.

In the Puppet DSL I can collect all fragments with language like 
`Sysctl::Variable<| |>`.  How can I do something similar in a template such 
that I can access the variable names and values?  For example:

<%
variables = magic('Sysctl::Variable<||>')
variables.each do |variable| -%>
<%= variable.name %> = <%= variable.value %>
<% end -%>

-- 
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/-/BDDUjVBiAI4J.
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] node-specific resources outside of a general-purpose module

2012-04-16 Thread Jonathon Anderson
On Monday, April 9, 2012 6:12:48 PM UTC+3, Nan Liu wrote:
>
> You can use create_resources to make this a bit more flexible and
> dynamic with the ability to specify resources in your ENC:
>
Either that doesn't actually apply to my question, or using it as a 
solution horrifies me.

-- 
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/-/Rmet2oQnac4J.
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: node-specific resources outside of a general-purpose module

2012-04-16 Thread Jonathon Anderson
On Monday, April 9, 2012 5:35:09 PM UTC+3, jcbollinger wrote:
>
> I'm not following why defined types present a special problem here.


They aren't a special problem: they simply haven't *solved* the problem. 
 If as generalized as I can get is defining some types, where do I put the 
declaration of these types so that they get applied to my nodes?

It's entirely possible that this is just a namespacing question: I've seen 
references to a `site` module where such site-specific classes should go, 
and, as I've said, we're already using modules with a `s_` prefix for this 
purpose; but I'm looking for what the normal thing is.  If modules are not 
supposed to be site-specific, where do I put my site-specific config?

-- 
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/-/qwi6W4v1D9MJ.
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.