Re: [Puppet Users] Reading Puppet reports with Python

2010-09-28 Thread Douglas Garstang
On Tue, Sep 28, 2010 at 11:06 AM, Rob McBroom wrote:

> On Sep 28, 2010, at 1:25 PM, Douglas Garstang wrote:
>
> It's not true and you're taking a particularly shitty attitude for
>> someone who is asking for help Doug.
>>
>>
> It is true, and you're taking a particularly sensitive attitude for someone
> that doesn't know me Nigel.
>
>
> If this was your first post, maybe. But you could fill an encyclopedia with
> examples of you being a dick to people trying to help you on this list.
>

We are a sensitive lot aren't we. All I said was that the !ruby tags were
pointless and somehow that was interpreted as a personal attack.

Doug.

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



Re: [Puppet Users] problem with overriding in two sub classes of the same parent class

2010-09-28 Thread Patrick

On Sep 28, 2010, at 7:53 AM, luke.bigum wrote:

> Hi all,
> 
> I'm working with class inheritance and run into a problem with a node
> including two child classes of the same parent class. The two child
> classes use the plusignment operator to append to the 'subscrube'
> metaparm of the same resource in the parent class.
> 
> The error is:
> 
> err: Could not retrieve catalog from remote server: Error 400 on
> SERVER: Parameter 'subscribe' is already set on Service[httpd] by
> # at /etc/puppet/manifests/site.pp:
> 16; cannot redefine at /etc/puppet/manifests/site.pp:24 on node test
> 
> I kind of understand why it doesn't work, but is there a way to
> achieve what I'm trying to do?

If you are using this as an example and you want it to work in the general 
case, I don't know how.  If you're asking how to make the example work, use 
notify instead of subscribe.

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



[Puppet Users] problem with overriding in two sub classes of the same parent class

2010-09-28 Thread luke.bigum
Hi all,

I'm working with class inheritance and run into a problem with a node
including two child classes of the same parent class. The two child
classes use the plusignment operator to append to the 'subscrube'
metaparm of the same resource in the parent class.

The error is:

err: Could not retrieve catalog from remote server: Error 400 on
SERVER: Parameter 'subscribe' is already set on Service[httpd] by
# at /etc/puppet/manifests/site.pp:
16; cannot redefine at /etc/puppet/manifests/site.pp:24 on node test

I kind of understand why it doesn't work, but is there a way to
achieve what I'm trying to do? I've tried playing with virtual
resources for service[httpd] but I can't get that to work either. This
is the site.pp:

#Master Puppet configuration file

class httpd {
  service { "httpd":
enable  => true,
ensure  => true,
hasrestart  => true,
hasstatus   => true,
  }
}

class httpd::ssl inherits httpd {
  package { "mod_ssl": ensure => present, }

  Service["httpd"] {
subscribe +> Package["mod_ssl"],
  }
}

class httpd::svn inherits httpd {
  package { "mod_dav_svn": ensure => present, }

  Service["httpd"] {
subscribe +> Package["mod_dav_svn"],
  }
}

node test {
  include httpd::ssl
  include httpd::svn
}

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



List behavior (was Re: [Puppet Users] Reading Puppet reports with Python)

2010-09-28 Thread James Turnbull
Douglas Garstang wrote:
> It's not true and you're taking a particularly shitty attitude for
> someone who is asking for help Doug.
> 
> 
> It is true, and you're taking a particularly sensitive attitude for
> someone that doesn't know me Nigel.
> 

Douglas

I've asked in the past that you take a different tone when asking for
help. Nigel went out of his way to help you out - as have a number of
others - and your response and attitude is often totally unacceptable.

I've also had feedback from others in the community that they are sick
of having to read aggressive, offensive and abrasive posts from you -
those that don't mute all of your posts already.

This is a final warning.  If you don't moderate your behavior I will ban
you from the list.

I suggest you read:

http://slash7.com/2006/12/22/vampires/

This will hopefully help you understand why you're having issues on this
list.

Kind Regards

James Turnbull

-- 
Puppet Labs - http://www.puppetlabs.com
C: 503-734-8571

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



Re: [Puppet Users] Reading Puppet reports with Python

2010-09-28 Thread Peter Meier
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

>> It's not true and you're taking a particularly shitty attitude for 
>> someone who is asking for help Doug.
>> 
>> 
>> It is true, and you're taking a particularly sensitive attitude for
>> someone that doesn't know me Nigel.
> 
> 
> If this was your first post, maybe. But you could fill an
> encyclopedia with examples of you being a dick to people trying to
> help you on this list.
> 

http://groups.google.com/groups/profile?hl=en&enc_user=Wszv3BcAAADOr23LoVoQQ1XoTfpZUyf8HqZiDvCVswhrZ6TQxKj0ww

obviously a lot of people don't know him...

~pete
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyiRA4ACgkQbwltcAfKi3+9rACaA1dTntp/pEj5f5iTLwU/63st
1ZUAmgPf3pEzSJBYE70hQGGqiK3a2hnk
=r+x/
-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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Proposal to remove redundant info in source => parameters

2010-09-28 Thread Peter Meier
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

> So back on a serious note... Is this definitely a deal breaker ? I
> really don't want us to be US-centric...

it wouldn't be one for me and I still stick with sg keyboards.

~pete
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyiQ70ACgkQbwltcAfKi390gQCgldW2Q7VIqUfv0SJ3kjZKEHRg
KsAAnionImj1J9Zl5sP1qoos5LHiDh++
=FnVe
-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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Reading Puppet reports with Python

2010-09-28 Thread Rob McBroom
On Sep 28, 2010, at 1:25 PM, Douglas Garstang wrote:

> It's not true and you're taking a particularly shitty attitude for
> someone who is asking for help Doug.
> 
> 
> It is true, and you're taking a particularly sensitive attitude for someone 
> that doesn't know me Nigel.


If this was your first post, maybe. But you could fill an encyclopedia with 
examples of you being a dick to people trying to help you on this list.

-- 
Rob McBroom


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



[Puppet Users] Exec dependent on directory

2010-09-28 Thread Dan Urist
I have the following test code in a manifest:

>   file {
> '/tmp/testdir':
>   ensure => directory,
>   owner => root,
>   group => root,
>   mode  => 0755,
>   checksum => mtime;
>   }
> 
>   exec {
> 'testdir_updated':
>   command => 'touch /tmp/testdir_updated',
>   subscribe => File['/tmp/testdir'],
>   refreshonly => true;
>   }

This doesn't appear to work; i.e. if I touch /tmp/testdir or add a file
to it (which changes the mtime of the directory), the exec doesn't get
run. It runs with every puppetd invocation if I remove 'refreshonly =>
true'.

I'm using puppet v.2.6.1 on Ubuntu Lucid. I could swear this used to
work, and I thought this is/was a common technique. Am I missing
something, or is this a bug?

-- 
Dan Urist
dur...@ucar.edu
303-497-2459

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



Re: [Puppet Users] Variables with class inheritance and templates

2010-09-28 Thread Bruce Richardson
On Tue, Sep 28, 2010 at 09:01:25AM -0700, Darren Worrall wrote:
> 
> Is this a bug, or a limitation of class inheritance? (ie, base classes
> are evaluated completely, and subclasses are only allowed to modify
> things after the fact?)
> 

They're not classes, they shouldn't have been called classes, it only
upsets people who understand OO languages and make intelligent
assumptions based on this.  The only things you can really override in a
subclass are properties of resources defined in the superclass.  This is
almost the only thing that class inheritance is useful for (not quite,
but the points are quite subtle and you need to have banged your head on
some of Puppet's walls before you can appreciate them).

Don't set variables to explicit variables inside a class unless you
really know what you are doing.  For the most part, set variables at
manifest or node level and include your classes at the appropriate level.

If you get your head around the way this works, some of it is very
powerful and elegant.  But whatever the party line, some of it is also
inelegant and hard to work with.  I tend to use node inheritance trees
for defining variables at the appropriate level and class heirarchies to
define function.  Then I include the appropriate high-level classes in
the right nodes.  With care, you can minimise the verbosity in node
definitions but it is still noisier than it should be, because of the
inheritance model.  Look around at the way most people write their
puppet configs and you'll find node definitions littered at the top
level with all the classes a node needs, because it isn't safe to
include them earlier if you're going to want to override values for a
subset of nodes.  This makes node configuration repetitive where it
should be DRY and a potential source of error.  Still, puppet's the best
option around.

-- 
Bruce

The ice-caps are melting, tra-la-la-la.  All the world is drowning,
tra-la-la-la-la.  -- Tiny Tim.

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



Re: [Puppet Users] Reading Puppet reports with Python

2010-09-28 Thread Douglas Garstang
On Tue, Sep 28, 2010 at 10:13 AM, Nigel Kersten wrote:

> On Tue, Sep 28, 2010 at 10:08 AM, Douglas Garstang
>  wrote:
> >
> > On Tue, Sep 28, 2010 at 9:50 AM, Eduardo S. Scarpellini
> >  wrote:
> >>
> >> Douglas,
> >> I've started my tests with Python + Puppet Yaml yesterday, based on
> >>
> http://www.mailinglistarchive.com/html/puppet-users@googlegroups.com/2010-05/msg00539.html
> ,
> >> and I'm having the same difficulties.
> >> I shall keep working on this script today and I'll post the solution, if
> I
> >> can find it.
> >>
> >>
> >
> > Eduardo,
> > That's about the only document I found on the subject too. I don't know
> why
> > the report document has to be so complicated. The !ruby tags are
> completely
> > unnecessary. I'm not about to go and learn ruby, as I dislike it
> immensely.
> > I guess it might be possible to pre-process the re
>
> Upon what basis are you saying that the Ruby tags are completely
> unnecessary?
>
>
On the basis that they don't actually contain any useful data.


> It's not true and you're taking a particularly shitty attitude for
> someone who is asking for help Doug.
>
>
It is true, and you're taking a particularly sensitive attitude for someone
that doesn't know me Nigel.



> Have you ever dumped Python objects to YAML and tried to read them from
> Ruby?
>
>
No, I don't like Ruby.



>
> I've just worked out how to solve your problem but haven't finished it.
>
> I have no desire to do so now.
>
>
> Good grief.


> Here is what I've worked out so far. If you have issues, go read the
> pyYAML documentation and YAML spec like I just did.
>
>
> def sym_representer(dumper, data):
>  return dumper.represent_scalar(u'!ruby/sym', u'%sd%s' % data)
>
> def sym_constructor(loader, node):
>  value = loader.construct_scalar(node)
>  return "foo" # you're going to have to work out how to make your
> constructor work.
>
> yaml.add_constructor(u'!ruby/sym', sym_constructor)
>
>
>
I already read it, but didn't understand it within the context of the
problem I was trying to solve.

Doug.

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



Re: [Puppet Users] Reading Puppet reports with Python

2010-09-28 Thread Nigel Kersten
On Tue, Sep 28, 2010 at 10:08 AM, Douglas Garstang
 wrote:
>
> On Tue, Sep 28, 2010 at 9:50 AM, Eduardo S. Scarpellini
>  wrote:
>>
>> Douglas,
>> I've started my tests with Python + Puppet Yaml yesterday, based on
>> http://www.mailinglistarchive.com/html/puppet-users@googlegroups.com/2010-05/msg00539.html,
>> and I'm having the same difficulties.
>> I shall keep working on this script today and I'll post the solution, if I
>> can find it.
>>
>>
>
> Eduardo,
> That's about the only document I found on the subject too. I don't know why
> the report document has to be so complicated. The !ruby tags are completely
> unnecessary. I'm not about to go and learn ruby, as I dislike it immensely.
> I guess it might be possible to pre-process the re

Upon what basis are you saying that the Ruby tags are completely unnecessary?

It's not true and you're taking a particularly shitty attitude for
someone who is asking for help Doug.

Have you ever dumped Python objects to YAML and tried to read them from Ruby?


I've just worked out how to solve your problem but haven't finished it.

I have no desire to do so now.


Here is what I've worked out so far. If you have issues, go read the
pyYAML documentation and YAML spec like I just did.


def sym_representer(dumper, data):
  return dumper.represent_scalar(u'!ruby/sym', u'%sd%s' % data)

def sym_constructor(loader, node):
  value = loader.construct_scalar(node)
  return "foo" # you're going to have to work out how to make your
constructor work.

yaml.add_constructor(u'!ruby/sym', sym_constructor)


http://pyyaml.org/wiki/PyYAMLDocumentation#Constructorsrepresentersresolvers

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



Re: [Puppet Users] Classes and Inheritence

2010-09-28 Thread Disconnect
You need to include or inherit the class that defines the service before you
can notify it. (Or just redefine the service in the other module.)

There is no link between smtpexternal and smtp.

On Tue, Sep 28, 2010 at 12:15 PM, Matt Wallace
wrote:

>
> Hi all,
>
> I'm going out of my mind trying to get my head around inheritance in Puppet
> 0.25.
>
> I have a module named smtp which contains a number of classes for setting
> up
> the various configurations that we have for SMTP Servers based on Exim.
>
> I have a class called SMTP which has a service defined as "exim".
>
> I have a sub-class named smtpexternal which contains a configuration file
> provided from the smtp module and which needs to notify the "exim" service
> defined in the smtp class.
>
> The simplified version is as follows:
>
> class smtp {
>
>package {"exim-mysql":
>ensure => 'installed';
>}
>
>service{"sendmail":
>ensure => stopped,
>}
>
>package{"sendmail":
>ensure => absent,
>}
>
># sendmail uninstalls the LSB, so we need to re-install it here...
> :(
>package{"redhat-lsb":
>ensure => installed;
>}
>
>iptables{"SMTP Access for Exim":
>proto => "tcp",
>dport => "25",
>jump => "ACCEPT",
>}
>service{ "exim":
>ensure => "running",
>hasrestart => true,
>}
>
> class smtpexternal{
>
>include 'mysql'
>
>file{"external-exim.conf":
>source => "puppet:///modules/smtp/external-exim.conf",
>owner => "root",
>group => "mail",
>mode => "440",
>path => "/etc/exim/exim.conf",
>notify => Service['exim']
>}
> }
> }
>
> The issue I have is that when I include the smtp::smtpexternal class on a
> node, it errors with the following:
>
> err: Could not run Puppet configuration client: Could not find dependent
> Service[exim] for File[external-exim.conf] at
> /usr/share/puppet/modules/smtp/manifests/init.pp
>
>
> How do I get smtpexternal to notify smtp's exim service - or am I
> approaching
> this from the wrong direction?
>
> Thanks in advance,
>
> Matt
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>

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



Re: [Puppet Users] Reading Puppet reports with Python

2010-09-28 Thread Douglas Garstang
On Tue, Sep 28, 2010 at 9:51 AM, Nigel Kersten wrote:

> On Tue, Sep 28, 2010 at 9:29 AM, Douglas Garstang
>  wrote:
> > Has anyone got/seen Python code to read puppet reports?
> > I added a bunch of these:
> > class PuppetReport(yaml.YAMLObject):
> >   yaml_tag = u'!ruby/object:Puppet::Transaction::Report'
> >   def __init__(self, host, logs, metrics, records, time):
> > self.host = host
> > self.logs = logs
> > self.metrics = metrics
> > self.records = records
> > self.time = time
> > However, the Python YAML parser fails with:
> > "yaml.constructor.ConstructorError: expected a mapping node, but found
> > scalar"
> > On the ruby/sym line:
> > !ruby/sym config_retrieval: 0.853000164031982
> > I don't know how to define the classes to accept a scalar data type
> rather
> > than a mapping node data type, and Mr Google is giving me ZERO answers.
>
> Huh. This must have changed, as I was doing it in exactly the same
> way. Is that actually from an old list message of mine?
>
> I think you've misread the error message. It basically doesn't know
> what to do with !ruby/sym at all.
>
> It may turn out nowadays to be simpler to do the parsing in Ruby and
> loading the puppet libraries so you get all this for free.
>
> I'll have a poke around and see if I can work out how to coerce
> !ruby/sym to something Python can understand.
>
>
>
Nigel, yep. It's an old message post of yours. I tried it too, and had the
same issue as Eduardo.

It seems that it fails on !ruby/sym because:

yaml.constructor.ConstructorError: expected a mapping node, but found scalar
  in "/var/lib/puppet/reports/foo.com/201009281644.yaml", line 3, column 5

where the code has:

class PuppetObj1(yaml.YAMLObject):
yaml_tag = u'!ruby/sym'
def __init__(self, attr):
self.attr = attr

I really don't know how a scalar node is supposed to differ from a mapping
node in the python code.

Doug.


Doug.

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



Re: [Puppet Users] Reading Puppet reports with Python

2010-09-28 Thread Douglas Garstang
On Tue, Sep 28, 2010 at 9:50 AM, Eduardo S. Scarpellini <
scarpell...@gmail.com> wrote:

> Douglas,
> I've started my tests with Python + Puppet Yaml yesterday, based on
> http://www.mailinglistarchive.com/html/puppet-users@googlegroups.com/2010-05/msg00539.html,
> and I'm having the same difficulties.
> I shall keep working on this script today and I'll post the solution, if I
> can find it.
>
>
>
Eduardo,

That's about the only document I found on the subject too. I don't know why
the report document has to be so complicated. The !ruby tags are completely
unnecessary. I'm not about to go and learn ruby, as I dislike it immensely.
I guess it might be possible to pre-process the re

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



Re: [Puppet Users] Reading Puppet reports with Python

2010-09-28 Thread Douglas Garstang
On Tue, Sep 28, 2010 at 9:50 AM, Eduardo S. Scarpellini <
scarpell...@gmail.com> wrote:

> Douglas,
> I've started my tests with Python + Puppet Yaml yesterday, based on
> http://www.mailinglistarchive.com/html/puppet-users@googlegroups.com/2010-05/msg00539.html,
> and I'm having the same difficulties.
> I shall keep working on this script today and I'll post the solution, if I
> can find it.
>
>
>
Eduardo,

That's about the only document I found on the subject too. I don't know why
the report document has to be so complicated. The !ruby tags are completely
unnecessary. I'm not about to go and learn ruby, as I dislike it immensely.
I guess it might be possible to pre-process the reports and strip the !ruby
tags out before trying to load the yaml document with python.

Doug.

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



Re: [Puppet Users] Reading Puppet reports with Python

2010-09-28 Thread Nigel Kersten
On Tue, Sep 28, 2010 at 9:29 AM, Douglas Garstang
 wrote:
> Has anyone got/seen Python code to read puppet reports?
> I added a bunch of these:
> class PuppetReport(yaml.YAMLObject):
>   yaml_tag = u'!ruby/object:Puppet::Transaction::Report'
>   def __init__(self, host, logs, metrics, records, time):
>     self.host = host
>     self.logs = logs
>     self.metrics = metrics
>     self.records = records
>     self.time = time
> However, the Python YAML parser fails with:
> "yaml.constructor.ConstructorError: expected a mapping node, but found
> scalar"
> On the ruby/sym line:
>     !ruby/sym config_retrieval: 0.853000164031982
> I don't know how to define the classes to accept a scalar data type rather
> than a mapping node data type, and Mr Google is giving me ZERO answers.

Huh. This must have changed, as I was doing it in exactly the same
way. Is that actually from an old list message of mine?

I think you've misread the error message. It basically doesn't know
what to do with !ruby/sym at all.

It may turn out nowadays to be simpler to do the parsing in Ruby and
loading the puppet libraries so you get all this for free.

I'll have a poke around and see if I can work out how to coerce
!ruby/sym to something Python can understand.



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

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



Re: [Puppet Users] Reading Puppet reports with Python

2010-09-28 Thread Eduardo S. Scarpellini
Douglas,
I've started my tests with Python + Puppet Yaml yesterday, based on
http://www.mailinglistarchive.com/html/puppet-users@googlegroups.com/2010-05/msg00539.html,
and I'm having the same difficulties.
I shall keep working on this script today and I'll post the solution, if I
can find it.

2010/9/28 Douglas Garstang 

> Has anyone got/seen Python code to read puppet reports?
>
> I added a bunch of these:
>
> class PuppetReport(yaml.YAMLObject):
>   yaml_tag = u'!ruby/object:Puppet::Transaction::Report'
>   def __init__(self, host, logs, metrics, records, time):
> self.host = host
> self.logs = logs
> self.metrics = metrics
> self.records = records
> self.time = time
>
> However, the Python YAML parser fails with:
> "yaml.constructor.ConstructorError: expected a mapping node, but found
> scalar"
>
> On the ruby/sym line:
> !ruby/sym config_retrieval: 0.853000164031982
>
> I don't know how to define the classes to accept a scalar data type rather
> than a mapping node data type, and Mr Google is giving me ZERO answers.
>
> Doug.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
 Eduardo S. Scarpellini


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



Re: [Puppet Users] Re: YUMREPO { productname => PowerEdge 2650}

2010-09-28 Thread R.I.Pienaar

- "CraftyTech"  wrote:

> puppet --version = 0.25.5.. Regex would be nice..


then see http://docs.puppetlabs.com/guides/language_tutorial.html#selectors


> 
> On Sep 28, 12:32 pm, "R.I.Pienaar"  wrote:
> > - "CraftyTech"  wrote:
> > > I wonder if I could use an if/then statement for this one, or
> perhaps
> > > an function that picks up the 2650 from the value "PowerEdge
> > > 2650"
> >
> > what version puppet do you use? recent ones have regex this would
> probably work for you
> >
> >
> >
> >
> >
> >
> >
> > > On Sep 28, 12:00 pm, "R.I.Pienaar"  wrote:
> > > > - "CraftyTech"  wrote:
> > > > > Interesting I used the notice with the single quote as
> you
> > > > > suggested.. and I get the notice with only one single
> quotation:
> > > -->
> > > > > notice: Scope(Class[basic_dev::files]): The product is:
> > > 'PowerEdge
> > > > > 2650 <--  It spits it out with only one single quotation...
> >
> > > > so there's some weird things in the fact which is why its not
> > > working for 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-us...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > puppet-users+unsubscr...@googlegroups.com.
> > > For more options, visit this group at
> > >http://groups.google.com/group/puppet-users?hl=en.
> >
> > --
> > R.I.Pienaar
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To post to this group, send email to puppet-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.

-- 
R.I.Pienaar

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



[Puppet Users] Re: Environments and wiki documentation

2010-09-28 Thread tortuegeniale
Yes, I'm running 0.24.5
In this case it should be good to specify this versioning maybe


On 28 sep, 17:28, Nigel Kersten  wrote:
> On Tue, Sep 28, 2010 at 12:58 AM, Atlantis Boengkih
>
>
>
>  wrote:
> > Hello,
>
> > First, please excuse my english.
>
> > I've had some troubles setting up environments. After a few hours digging 
> > for the misconfiguration, it appears that I did not declare my environments 
> > in the main section of my clients puppet.conf.
>
> > The wiki show the environment definition:
> > [puppetd]
> >    environment = development
>
> > But it lack the environments definition:
> > [main]environments=production,testing,development,staging
>
> > Please, if this is my mistake, excuse my words, but if not I think this has 
> > to be more clearly defined, as i thinnk I'm not the only one falling into 
> > this trap.
>
> Which version of Puppet are you running Atlantis?
>
> I believe you used to need to list the environments like this in
> 0.24.x, but 0.25.x and 2.6.x don't need to.
>
>
>
> > --
> > atlantis
>
> > -BEGIN PGP SIGNATURE-
> > Version: GnuPG v1.4.9 (GNU/Linux)
>
> > iEYEARECAAYFAkyhoEMACgkQ/5SzkUTnu24JtACdHd2Dy45iqojJbgUmUvhMcjX2
> > lEkAoO0uRVWY7CZC47f0vOxQX0siWCRV
> > =RPUT
> > -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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: YUMREPO { productname => PowerEdge 2650}

2010-09-28 Thread CraftyTech
puppet --version = 0.25.5.. Regex would be nice..

On Sep 28, 12:32 pm, "R.I.Pienaar"  wrote:
> - "CraftyTech"  wrote:
> > I wonder if I could use an if/then statement for this one, or perhaps
> > an function that picks up the 2650 from the value "PowerEdge
> > 2650"
>
> what version puppet do you use? recent ones have regex this would probably 
> work for you
>
>
>
>
>
>
>
> > On Sep 28, 12:00 pm, "R.I.Pienaar"  wrote:
> > > - "CraftyTech"  wrote:
> > > > Interesting I used the notice with the single quote as you
> > > > suggested.. and I get the notice with only one single quotation:
> > -->
> > > > notice: Scope(Class[basic_dev::files]): The product is:
> > 'PowerEdge
> > > > 2650 <--  It spits it out with only one single quotation...
>
> > > so there's some weird things in the fact which is why its not
> > working for 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-us...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > puppet-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/puppet-users?hl=en.
>
> --
> R.I.Pienaar

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



Re: [Puppet Users] Proposal to remove redundant info in source => parameters

2010-09-28 Thread Nigel Kersten
On Tue, Sep 28, 2010 at 9:06 AM, James Turnbull  wrote:
> Brice Figureau wrote:
>> On Tue, 2010-09-28 at 08:23 -0700, Nigel Kersten wrote:
>>> [heavilly snipped because answer OT]
>>> After looking up a few of the major non-US keyboard layouts, I'm
>>> really not sure '~' makes sense anymore. How do you people use Unixes?
>>> :)
>
> Is OSX Unix? :)

It is. They paid the money :)


>> I dumped my azerty keyboard in favor of an US one as soon as I started
>> programming/admining :)
>> Now I struggle to add accented vowels when I write in French :)
>
> What will you do without your outrageous accent? Oh "write in French"... :P

He could get a Mac. :) accented vowels are trivial on OS X US keyboards.

So back on a serious note... Is this definitely a deal breaker ? I
really don't want us to be US-centric...

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



Re: [Puppet Users] Variables with class inheritance and templates

2010-09-28 Thread Tony G.
Darren,

On Tue, Sep 28, 2010 at 11:01 AM, Darren Worrall wrote:

> With a manifest like so:
>
> class base {
>  $myvar = '1234'
>  file {
>'/tmp/foo':
>  content => template('test.erb')
>  }
> }
>
> class newbase inherits base {
>  $myvar = '5678'
> }
>
> node default {
>  include newbase
> }
>
> And test.erb with <%= myvar %>
>
> /tmp/foo contains 1234, when I would expect it to contain 5678.
>
> Is this a bug, or a limitation of class inheritance? (ie, base classes
> are evaluated completely, and subclasses are only allowed to modify
> things after the fact?)
>
> Cheers :)
>

Is the way scoping works, you can take more complete explanation here
http://projects.puppetlabs.com/projects/puppet/wiki/Frequently_Asked_Questions#Class+Inheritance+and+Variable+Scope

Basically the value of the inner scope is the one being used and not
overridden as one might expect.


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


-- 
Tony
http://blog.tonyskapunk.net

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



Re: [Puppet Users] Re: YUMREPO { productname => PowerEdge 2650}

2010-09-28 Thread R.I.Pienaar

- "CraftyTech"  wrote:

> I wonder if I could use an if/then statement for this one, or perhaps
> an function that picks up the 2650 from the value "PowerEdge
> 2650"

what version puppet do you use? recent ones have regex this would probably work 
for you

> 
> 
> 
> On Sep 28, 12:00 pm, "R.I.Pienaar"  wrote:
> > - "CraftyTech"  wrote:
> > > Interesting I used the notice with the single quote as you
> > > suggested.. and I get the notice with only one single quotation:
> -->
> > > notice: Scope(Class[basic_dev::files]): The product is:
> 'PowerEdge
> > > 2650 <--  It spits it out with only one single quotation...
> >
> > so there's some weird things in the fact which is why its not
> working for 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-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.

-- 
R.I.Pienaar

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



[Puppet Users] Reading Puppet reports with Python

2010-09-28 Thread Douglas Garstang
Has anyone got/seen Python code to read puppet reports?

I added a bunch of these:

class PuppetReport(yaml.YAMLObject):
  yaml_tag = u'!ruby/object:Puppet::Transaction::Report'
  def __init__(self, host, logs, metrics, records, time):
self.host = host
self.logs = logs
self.metrics = metrics
self.records = records
self.time = time

However, the Python YAML parser fails with:
"yaml.constructor.ConstructorError: expected a mapping node, but found
scalar"

On the ruby/sym line:
!ruby/sym config_retrieval: 0.853000164031982

I don't know how to define the classes to accept a scalar data type rather
than a mapping node data type, and Mr Google is giving me ZERO answers.

Doug.

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



[Puppet Users] Re: YUMREPO { productname => PowerEdge 2650}

2010-09-28 Thread CraftyTech
I wonder if I could use an if/then statement for this one, or perhaps
an function that picks up the 2650 from the value "PowerEdge 2650"



On Sep 28, 12:00 pm, "R.I.Pienaar"  wrote:
> - "CraftyTech"  wrote:
> > Interesting I used the notice with the single quote as you
> > suggested.. and I get the notice with only one single quotation: -->
> > notice: Scope(Class[basic_dev::files]): The product is: 'PowerEdge
> > 2650 <--  It spits it out with only one single quotation...
>
> so there's some weird things in the fact which is why its not working for 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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Classes and Inheritence

2010-09-28 Thread Matt Wallace

Hi all,

I'm going out of my mind trying to get my head around inheritance in Puppet 
0.25.

I have a module named smtp which contains a number of classes for setting up 
the various configurations that we have for SMTP Servers based on Exim.

I have a class called SMTP which has a service defined as "exim".

I have a sub-class named smtpexternal which contains a configuration file 
provided from the smtp module and which needs to notify the "exim" service 
defined in the smtp class.

The simplified version is as follows:

class smtp {

package {"exim-mysql":
ensure => 'installed';
}

service{"sendmail":
ensure => stopped,
}

package{"sendmail":
ensure => absent,
}

# sendmail uninstalls the LSB, so we need to re-install it here... :(
package{"redhat-lsb":
ensure => installed;
}

iptables{"SMTP Access for Exim":
proto => "tcp",
dport => "25",
jump => "ACCEPT",
}
service{ "exim":
ensure => "running",
hasrestart => true,
}

class smtpexternal{

include 'mysql'

file{"external-exim.conf":
source => "puppet:///modules/smtp/external-exim.conf",
owner => "root",
group => "mail",
mode => "440",
path => "/etc/exim/exim.conf",
notify => Service['exim']
}
}
}

The issue I have is that when I include the smtp::smtpexternal class on a 
node, it errors with the following:

err: Could not run Puppet configuration client: Could not find dependent 
Service[exim] for File[external-exim.conf] at 
/usr/share/puppet/modules/smtp/manifests/init.pp


How do I get smtpexternal to notify smtp's exim service - or am I approaching 
this from the wrong direction?

Thanks in advance,

Matt

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



Re: [Puppet Users] Proposal to remove redundant info in source => parameters

2010-09-28 Thread James Turnbull
Brice Figureau wrote:
> On Tue, 2010-09-28 at 08:23 -0700, Nigel Kersten wrote:
>> [heavilly snipped because answer OT]
>> After looking up a few of the major non-US keyboard layouts, I'm
>> really not sure '~' makes sense anymore. How do you people use Unixes?
>> :)

Is OSX Unix? :)

> 
> I dumped my azerty keyboard in favor of an US one as soon as I started
> programming/admining :) 
> Now I struggle to add accented vowels when I write in French :)

What will you do without your outrageous accent? Oh "write in French"... :P

James

-- 
Puppet Labs - http://www.puppetlabs.com
C: 503-734-8571

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



[Puppet Users] Variables with class inheritance and templates

2010-09-28 Thread Darren Worrall
With a manifest like so:

class base {
  $myvar = '1234'
  file {
'/tmp/foo':
  content => template('test.erb')
  }
}

class newbase inherits base {
  $myvar = '5678'
}

node default {
  include newbase
}

And test.erb with <%= myvar %>

/tmp/foo contains 1234, when I would expect it to contain 5678.

Is this a bug, or a limitation of class inheritance? (ie, base classes
are evaluated completely, and subclasses are only allowed to modify
things after the fact?)

Cheers :)

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



Re: [Puppet Users] Re: YUMREPO { productname => PowerEdge 2650}

2010-09-28 Thread R.I.Pienaar

- "CraftyTech"  wrote:

> Interesting I used the notice with the single quote as you
> suggested.. and I get the notice with only one single quotation: -->
> notice: Scope(Class[basic_dev::files]): The product is: 'PowerEdge
> 2650 <--  It spits it out with only one single quotation...


so there's some weird things in the fact which is why its not working for 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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: YUMREPO { productname => PowerEdge 2650}

2010-09-28 Thread CraftyTech
Interesting I used the notice with the single quote as you
suggested.. and I get the notice with only one single quotation: -->
notice: Scope(Class[basic_dev::files]): The product is: 'PowerEdge
2650 <--  It spits it out with only one single quotation...

On Sep 28, 11:35 am, "R.I.Pienaar"  wrote:
> - "CraftyTech"  wrote:
> > R.I.Pienaar,
>
> > I'm using puppet 0.25.5, and that syntax is not working for me.
> > notify("The product is: '${productname}'": }, ... There's a trailing
> > squiggly bracket that wasn't previously opened.  How would I
> > incorporate this in my class:?
>
> sorry, make it notify{"the product is: '${producname}': } the point is that 
> we're notifying the value of the variables surrounded by ''s so we can see if 
> there's any whitespace in the variable.
>
> you can do it with notice too.  I recall a bug in these facts on some dell 
> machines where they get padded with whitespce and your case selector would 
> need to include the whitespace
>
>
>
>
>
>
>
> >      yumrepo { "domain_OMSA":
> >      baseurl => $productname ? {
> >      "PowerEdge 2650" => 'http://build.dev.domain.com:1234/OMSA5.5',
> >      default => 'http://build.dev.domain.com:1234/OMSA6.2'},
> >      descr => "domain's OMSA Repo for $operatingsystem-$architecture-
> > $operatingsystemrelease ",
> >      enabled => 1,
> >      gpgcheck => 0,
> >      notify("The product is: '${productname}'": }
> >  >      }
>
> > Thanks for your help..
>
> > On Sep 28, 11:14 am, "R.I.Pienaar"  wrote:
> > > - "CraftyTech"  wrote:
> > > > I used a notice statement: notice("The product is: ${productname}
> > "),
> > > > and it shows the product name the way it should: "notice:
> > > > Scope(Class[basic_dev::files]): The product is: PowerEdge 2650".
> >  I'm
> > > > at a lost here.. I'm not sure what's going on.  I tried removing
> > the
> > > > repo all together, just to see how it'd be evaluated, and it came
> > > > back
> > > > with the same default value, as opposed to with the $productname
> > > > value...
>
> > > you didnt use it like i suggested, have another looks.
>
> > > > On Sep 28, 10:48 am, "R.I.Pienaar"  wrote:
> > > > > - "CraftyTech"  wrote:
> > > > > > Thanks for the feedback Matt, but no, it didn't work.  Here's
> > the
> > > > > > repo
> > > > > > I'm trying to define:
>
> > > > > >      yumrepo { "domain_OMSA":
> > > > > >      baseurl => $productname ? {
> > > > > >      "PowerEdge 2650" =>
> > > > 'http://build.dev.domain.com:1234/OMSA5.5',
> > > > > >      default => 'http://build.dev.domain.com:1234/OMSA6.2'},
> > > > > >      descr => "domain's OMSA Repo for
> > > > $operatingsystem-$architecture-
> > > > > > $operatingsystemrelease ",
> > > > > >      enabled => 1,
> > > > > >      gpgcheck => 0
> > > > > >      }
> > > > > > So far I've tried "PowerEdge 2650", "${PowerEdge 2650}",
> > > > 'PowerEdge
> > > > > > 2650', "PowerEdge\ 2650", and none have worked so far.  It
> > keeps
> > > > just
> > > > > > using using the default URL.
>
> > > > > you might have some trailing spaces in your fact value.
>
> > > > > do a notify("The product is: '${productname}'": } and look in
> > the
> > > > logs
>
> > > > --
> > > > You received this message because you are subscribed to the
> > Google
> > > > Groups "Puppet Users" group.
> > > > To post to this group, send email to
> > puppet-us...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > puppet-users+unsubscr...@googlegroups.com.
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/puppet-users?hl=en.
>
> > > --
> > > R.I.Pienaar
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Puppet Users" group.
> > To post to this group, send email to puppet-us...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > puppet-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/puppet-users?hl=en.
>
> --
> R.I.Pienaar

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



Re: [Puppet Users] Proposal to remove redundant info in source => parameters

2010-09-28 Thread Brice Figureau
On Tue, 2010-09-28 at 08:23 -0700, Nigel Kersten wrote:
> [heavilly snipped because answer OT]
> After looking up a few of the major non-US keyboard layouts, I'm
> really not sure '~' makes sense anymore. How do you people use Unixes?
> :)

I dumped my azerty keyboard in favor of an US one as soon as I started
programming/admining :) 
Now I struggle to add accented vowels when I write in French :)
-- 
Brice Figureau
Follow the latest Puppet Community evolutions on www.planetpuppet.org!

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



Re: [Puppet Users] Re: YUMREPO { productname => PowerEdge 2650}

2010-09-28 Thread R.I.Pienaar

- "CraftyTech"  wrote:

> R.I.Pienaar,
> 
> I'm using puppet 0.25.5, and that syntax is not working for me.
> notify("The product is: '${productname}'": }, ... There's a trailing
> squiggly bracket that wasn't previously opened.  How would I
> incorporate this in my class:?


sorry, make it notify{"the product is: '${producname}': } the point is that 
we're notifying the value of the variables surrounded by ''s so we can see if 
there's any whitespace in the variable.

you can do it with notice too.  I recall a bug in these facts on some dell 
machines where they get padded with whitespce and your case selector would need 
to include the whitespace


> 
>  yumrepo { "domain_OMSA":
>  baseurl => $productname ? {
>  "PowerEdge 2650" => 'http://build.dev.domain.com:1234/OMSA5.5',
>  default => 'http://build.dev.domain.com:1234/OMSA6.2' },
>  descr => "domain's OMSA Repo for $operatingsystem-$architecture-
> $operatingsystemrelease ",
>  enabled => 1,
>  gpgcheck => 0,
>  notify("The product is: '${productname}'": }
>   }
> 
> Thanks for your help..
> 
> On Sep 28, 11:14 am, "R.I.Pienaar"  wrote:
> > - "CraftyTech"  wrote:
> > > I used a notice statement: notice("The product is: ${productname}
> "),
> > > and it shows the product name the way it should: "notice:
> > > Scope(Class[basic_dev::files]): The product is: PowerEdge 2650".
>  I'm
> > > at a lost here.. I'm not sure what's going on.  I tried removing
> the
> > > repo all together, just to see how it'd be evaluated, and it came
> > > back
> > > with the same default value, as opposed to with the $productname
> > > value...
> >
> > you didnt use it like i suggested, have another looks.
> >
> >
> >
> >
> >
> >
> >
> > > On Sep 28, 10:48 am, "R.I.Pienaar"  wrote:
> > > > - "CraftyTech"  wrote:
> > > > > Thanks for the feedback Matt, but no, it didn't work.  Here's
> the
> > > > > repo
> > > > > I'm trying to define:
> >
> > > > >      yumrepo { "domain_OMSA":
> > > > >      baseurl => $productname ? {
> > > > >      "PowerEdge 2650" =>
> > > 'http://build.dev.domain.com:1234/OMSA5.5',
> > > > >      default => 'http://build.dev.domain.com:1234/OMSA6.2'},
> > > > >      descr => "domain's OMSA Repo for
> > > $operatingsystem-$architecture-
> > > > > $operatingsystemrelease ",
> > > > >      enabled => 1,
> > > > >      gpgcheck => 0
> > > > >      }
> > > > > So far I've tried "PowerEdge 2650", "${PowerEdge 2650}",
> > > 'PowerEdge
> > > > > 2650', "PowerEdge\ 2650", and none have worked so far.  It
> keeps
> > > just
> > > > > using using the default URL.
> >
> > > > you might have some trailing spaces in your fact value.
> >
> > > > do a notify("The product is: '${productname}'": } and look in
> the
> > > logs
> >
> > > --
> > > You received this message because you are subscribed to the
> Google
> > > Groups "Puppet Users" group.
> > > To post to this group, send email to
> puppet-us...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > puppet-users+unsubscr...@googlegroups.com.
> > > For more options, visit this group at
> > >http://groups.google.com/group/puppet-users?hl=en.
> >
> > --
> > R.I.Pienaar
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To post to this group, send email to puppet-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.

-- 
R.I.Pienaar

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



Re: [Puppet Users] Environments and wiki documentation

2010-09-28 Thread Nigel Kersten
On Tue, Sep 28, 2010 at 12:58 AM, Atlantis Boengkih
 wrote:
> Hello,
>
> First, please excuse my english.
>
> I've had some troubles setting up environments. After a few hours digging for 
> the misconfiguration, it appears that I did not declare my environments in 
> the main section of my clients puppet.conf.
>
>
> The wiki show the environment definition:
> [puppetd]
>    environment = development
>
>
> But it lack the environments definition:
> [main]environments=production,testing,development,staging
>
> Please, if this is my mistake, excuse my words, but if not I think this has 
> to be more clearly defined, as i thinnk I'm not the only one falling into 
> this trap.

Which version of Puppet are you running Atlantis?

I believe you used to need to list the environments like this in
0.24.x, but 0.25.x and 2.6.x don't need to.



>
>
> --
> atlantis
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkyhoEMACgkQ/5SzkUTnu24JtACdHd2Dy45iqojJbgUmUvhMcjX2
> lEkAoO0uRVWY7CZC47f0vOxQX0siWCRV
> =RPUT
> -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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: YUMREPO { productname => PowerEdge 2650}

2010-09-28 Thread CraftyTech
R.I.Pienaar,

I'm using puppet 0.25.5, and that syntax is not working for me.
notify("The product is: '${productname}'": }, ... There's a trailing
squiggly bracket that wasn't previously opened.  How would I
incorporate this in my class:?

 yumrepo { "domain_OMSA":
 baseurl => $productname ? {
 "PowerEdge 2650" => 'http://build.dev.domain.com:1234/OMSA5.5',
 default => 'http://build.dev.domain.com:1234/OMSA6.2' },
 descr => "domain's OMSA Repo for $operatingsystem-$architecture-
$operatingsystemrelease ",
 enabled => 1,
 gpgcheck => 0,
 notify("The product is: '${productname}'": }
 - "CraftyTech"  wrote:
> > I used a notice statement: notice("The product is: ${productname} "),
> > and it shows the product name the way it should: "notice:
> > Scope(Class[basic_dev::files]): The product is: PowerEdge 2650".  I'm
> > at a lost here.. I'm not sure what's going on.  I tried removing the
> > repo all together, just to see how it'd be evaluated, and it came
> > back
> > with the same default value, as opposed to with the $productname
> > value...
>
> you didnt use it like i suggested, have another looks.
>
>
>
>
>
>
>
> > On Sep 28, 10:48 am, "R.I.Pienaar"  wrote:
> > > - "CraftyTech"  wrote:
> > > > Thanks for the feedback Matt, but no, it didn't work.  Here's the
> > > > repo
> > > > I'm trying to define:
>
> > > >      yumrepo { "domain_OMSA":
> > > >      baseurl => $productname ? {
> > > >      "PowerEdge 2650" =>
> > 'http://build.dev.domain.com:1234/OMSA5.5',
> > > >      default => 'http://build.dev.domain.com:1234/OMSA6.2'},
> > > >      descr => "domain's OMSA Repo for
> > $operatingsystem-$architecture-
> > > > $operatingsystemrelease ",
> > > >      enabled => 1,
> > > >      gpgcheck => 0
> > > >      }
> > > > So far I've tried "PowerEdge 2650", "${PowerEdge 2650}",
> > 'PowerEdge
> > > > 2650', "PowerEdge\ 2650", and none have worked so far.  It keeps
> > just
> > > > using using the default URL.
>
> > > you might have some trailing spaces in your fact value.
>
> > > do a notify("The product is: '${productname}'": } and look in the
> > logs
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Puppet Users" group.
> > To post to this group, send email to puppet-us...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > puppet-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/puppet-users?hl=en.
>
> --
> R.I.Pienaar

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



Re: [Puppet Users] Proposal to remove redundant info in source => parameters

2010-09-28 Thread Nigel Kersten
On Mon, Sep 27, 2010 at 10:08 PM, Luke Kanies  wrote:
> On Sep 27, 2010, at 7:04 AM, Brice Figureau wrote:
>
>> Hi,
>>
>> It looks like I missed your original e-mail to puppet-dev.
>>
>> On Fri, 2010-09-24 at 11:20 -0700, Nigel Kersten wrote:
>>> [cross-posting as I'd like to know whether my intuition about this
>>> being the most common case is correct]
>>>
>>>
>>> class foo {
>>>
>>>  file { "/etc/foo.conf":
>>>    source => "puppet:///modules/foo/foo.conf",
>>>  }
>>>
>>> }
>>>
>>> For me, every single one of my source specifications refers to a file
>>> inside the current module. My intuition is that this is the most
>>> common case outside my own deployment, so why don't we optimize for
>>> it?
>>>
>>> class foo {
>>>
>>>  file { "/etc/foo.conf":
>>>    source => "foo.conf",
>>>  }
>>>
>>> }
>>>
>>> eg the proposal is that if you don't specify the protocol, server
>>> address, modules prefix, module name, it is assumed you are referring
>>> to a file path relative to the 'files' subdirectory of the current
>>> module.
>>>
>>> If you wish to fully specify the source URI, you're free to do so.
>>
>> My issue with your proposal is that at first glance it will look like a
>> local copy (which should require an absolute path) and not a remote
>> copy. This certainly violate the least surprise paradigm for new users.
>>
>> What about a new URI scheme (ie module) which would do the same:
>>
>> class foo {
>>   file { "/etc/foo.conf":
>>     source => "module://foo.conf",
>>   }
>> }
>
> Another option is a new function:
>
> class foo {
>  file { "/etc/foo.conf":
>    source => expand("foo.conf")
>  }
> }
>
> Then all of the smarts could be in expand().
>
> OTOH, I think it's a bit think in terms of syntax.  Backticks? :)

I think it's too heavy and too tacked on.

After looking up a few of the major non-US keyboard layouts, I'm
really not sure '~' makes sense anymore. How do you people use Unixes?
:)

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



Re: [Puppet Users] Re: YUMREPO { productname => PowerEdge 2650}

2010-09-28 Thread R.I.Pienaar

- "CraftyTech"  wrote:

> I used a notice statement: notice("The product is: ${productname} "),
> and it shows the product name the way it should: "notice:
> Scope(Class[basic_dev::files]): The product is: PowerEdge 2650".  I'm
> at a lost here.. I'm not sure what's going on.  I tried removing the
> repo all together, just to see how it'd be evaluated, and it came
> back
> with the same default value, as opposed to with the $productname
> value...

you didnt use it like i suggested, have another looks.


> 
> On Sep 28, 10:48 am, "R.I.Pienaar"  wrote:
> > - "CraftyTech"  wrote:
> > > Thanks for the feedback Matt, but no, it didn't work.  Here's the
> > > repo
> > > I'm trying to define:
> >
> > >      yumrepo { "domain_OMSA":
> > >      baseurl => $productname ? {
> > >      "PowerEdge 2650" =>
> 'http://build.dev.domain.com:1234/OMSA5.5',
> > >      default => 'http://build.dev.domain.com:1234/OMSA6.2'},
> > >      descr => "domain's OMSA Repo for
> $operatingsystem-$architecture-
> > > $operatingsystemrelease ",
> > >      enabled => 1,
> > >      gpgcheck => 0
> > >      }
> > > So far I've tried "PowerEdge 2650", "${PowerEdge 2650}",
> 'PowerEdge
> > > 2650', "PowerEdge\ 2650", and none have worked so far.  It keeps
> just
> > > using using the default URL.
> >
> > you might have some trailing spaces in your fact value.
> >
> > do a notify("The product is: '${productname}'": } and look in the
> logs
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To post to this group, send email to puppet-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.

-- 
R.I.Pienaar

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



[Puppet Users] Re: YUMREPO { productname => PowerEdge 2650}

2010-09-28 Thread CraftyTech
I used a notice statement: notice("The product is: ${productname} "),
and it shows the product name the way it should: "notice:
Scope(Class[basic_dev::files]): The product is: PowerEdge 2650".  I'm
at a lost here.. I'm not sure what's going on.  I tried removing the
repo all together, just to see how it'd be evaluated, and it came back
with the same default value, as opposed to with the $productname
value...

On Sep 28, 10:48 am, "R.I.Pienaar"  wrote:
> - "CraftyTech"  wrote:
> > Thanks for the feedback Matt, but no, it didn't work.  Here's the
> > repo
> > I'm trying to define:
>
> >      yumrepo { "domain_OMSA":
> >      baseurl => $productname ? {
> >      "PowerEdge 2650" => 'http://build.dev.domain.com:1234/OMSA5.5',
> >      default => 'http://build.dev.domain.com:1234/OMSA6.2'},
> >      descr => "domain's OMSA Repo for $operatingsystem-$architecture-
> > $operatingsystemrelease ",
> >      enabled => 1,
> >      gpgcheck => 0
> >      }
> > So far I've tried "PowerEdge 2650", "${PowerEdge 2650}", 'PowerEdge
> > 2650', "PowerEdge\ 2650", and none have worked so far.  It keeps just
> > using using the default URL.
>
> you might have some trailing spaces in your fact value.
>
> do a notify("The product is: '${productname}'": } and look in the logs

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



Re: [Puppet Users] Re: YUMREPO { productname => PowerEdge 2650}

2010-09-28 Thread R.I.Pienaar

- "CraftyTech"  wrote:

> Thanks for the feedback Matt, but no, it didn't work.  Here's the
> repo
> I'm trying to define:
> 
>  yumrepo { "domain_OMSA":
>  baseurl => $productname ? {
>  "PowerEdge 2650" => 'http://build.dev.domain.com:1234/OMSA5.5',
>  default => 'http://build.dev.domain.com:1234/OMSA6.2' },
>  descr => "domain's OMSA Repo for $operatingsystem-$architecture-
> $operatingsystemrelease ",
>  enabled => 1,
>  gpgcheck => 0
>  }
> So far I've tried "PowerEdge 2650", "${PowerEdge 2650}", 'PowerEdge
> 2650', "PowerEdge\ 2650", and none have worked so far.  It keeps just
> using using the default URL.


you might have some trailing spaces in your fact value.

do a notify("The product is: '${productname}'": } and look in the logs 

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



[Puppet Users] Re: YUMREPO { productname => PowerEdge 2650}

2010-09-28 Thread CraftyTech
Thanks for the feedback Matt, but no, it didn't work.  Here's the repo
I'm trying to define:

 yumrepo { "domain_OMSA":
 baseurl => $productname ? {
 "PowerEdge 2650" => 'http://build.dev.domain.com:1234/OMSA5.5',
 default => 'http://build.dev.domain.com:1234/OMSA6.2' },
 descr => "domain's OMSA Repo for $operatingsystem-$architecture-
$operatingsystemrelease ",
 enabled => 1,
 gpgcheck => 0
 }
So far I've tried "PowerEdge 2650", "${PowerEdge 2650}", 'PowerEdge
2650', "PowerEdge\ 2650", and none have worked so far.  It keeps just
using using the default URL.

Thanks,

Henry

On Sep 28, 10:28 am, Matt Wallace  wrote:
> On Tuesday 28 Sep 2010 15:12:34 CraftyTech wrote:
>
> > Hello All,
>
> >      How do I specify a variable that has a space in it?  I'm trying
> > to setup a yum repo that has two different baseurl's based on the
> > product name ($productname).  Default goes one way, but if the product
> > is "PowerEdge 2650" then is a different URL.  The thing is, that is
> > only picking up the default.  How should I specify the value with the
> > space in the middle?  I tried "PowerEdge 2650", "${PowerEdge 2650}",
> > and 'PowerEdge 2650', and none have worked so far.  Do I need to use
> > Regex for this, or is there a discreprancy in my syntax?
>
> > Thanks,
>
> > Henry
>
> I've not tried it myself, but have you checked to see if "PowerEdge\ 2650"
> works?
>
> M.

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



Re: [Puppet Users] YUMREPO { productname => PowerEdge 2650}

2010-09-28 Thread Tony G.
Henry,


On Tue, Sep 28, 2010 at 9:12 AM, CraftyTech  wrote:

> Hello All,
>
> How do I specify a variable that has a space in it?  I'm trying
> to setup a yum repo that has two different baseurl's based on the
> product name ($productname).  Default goes one way, but if the product
> is "PowerEdge 2650" then is a different URL.  The thing is, that is
> only picking up the default.  How should I specify the value with the
> space in the middle?  I tried "PowerEdge 2650", "${PowerEdge 2650}",
> and 'PowerEdge 2650', and none have worked so far.  Do I need to use
> Regex for this, or is there a discreprancy in my syntax?
>
>
The baseurl you use has a white space on it? e.g. "
http://yourserver/somelocation/RPMS.poweredge 2650" ?

If that's not the case then you can simply do an assignment of the repo name
to whatever you have based on the productname(assuming this is provided by
facter) variable.

$reponame = $productname ? {
  "PowerEdge 2650" => "poweredge2650",
  "PowerEdge 2950" => "poweredge2950",
   default => "poweredge",
}

Then use it in the baseurl attribute of yumrepo:
baseurl => "http://yourserver/somelocation.RPMS.$reponame";

Hope that helps.


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


-- 
Tony
http://blog.tonyskapunk.net

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



Re: [Puppet Users] YUMREPO { productname => PowerEdge 2650}

2010-09-28 Thread Matt Wallace
On Tuesday 28 Sep 2010 15:12:34 CraftyTech wrote:
> Hello All,
> 
>  How do I specify a variable that has a space in it?  I'm trying
> to setup a yum repo that has two different baseurl's based on the
> product name ($productname).  Default goes one way, but if the product
> is "PowerEdge 2650" then is a different URL.  The thing is, that is
> only picking up the default.  How should I specify the value with the
> space in the middle?  I tried "PowerEdge 2650", "${PowerEdge 2650}",
> and 'PowerEdge 2650', and none have worked so far.  Do I need to use
> Regex for this, or is there a discreprancy in my syntax?
> 
> Thanks,
> 
> Henry


I've not tried it myself, but have you checked to see if "PowerEdge\ 2650" 
works?

M.

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



[Puppet Users] YUMREPO { productname => PowerEdge 2650}

2010-09-28 Thread CraftyTech
Hello All,

 How do I specify a variable that has a space in it?  I'm trying
to setup a yum repo that has two different baseurl's based on the
product name ($productname).  Default goes one way, but if the product
is "PowerEdge 2650" then is a different URL.  The thing is, that is
only picking up the default.  How should I specify the value with the
space in the middle?  I tried "PowerEdge 2650", "${PowerEdge 2650}",
and 'PowerEdge 2650', and none have worked so far.  Do I need to use
Regex for this, or is there a discreprancy in my syntax?

Thanks,

Henry

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



[Puppet Users] questions about certs on 2.6.1

2010-09-28 Thread Arnau Bria
Hi all,

I've a second puppet server (test) where I copied ONLY ca* from prod
server. This server is running 2.6.1 + mongrel with SSLVerifyClient
optional.

I have 2 strange behaviours which I'd like to comment with some expert
user.

1.-)
 I'm running new clients against this "new" server, they request
the sign, and then I can sign the client from master:

Client#  puppetd --server ser01-test.pic.es --test
info: Creating a new SSL key for tditaller013.pic.es
warning: peer certificate won't be verified in this SSL session
info: Caching certificate for ca
warning: peer certificate won't be verified in this SSL session
warning: peer certificate won't be verified in this SSL session
info: Creating a new SSL certificate request for client.pic.es
info: Certificate Request fingerprint (md5): 
6E:F9:CC:81:72:F1:E8:51:CE:BD:97:67:19:9B:6C:22
warning: peer certificate won't be verified in this SSL session
warning: peer certificate won't be verified in this SSL session
warning: peer certificate won't be verified in this SSL session
Exiting; no certificate found and waitforcert is disabled

server#  puppetca --list 
client.pic.es
#  puppetca --sign client.pic.es
notice: Signed certificate request for client.pic.es
notice: Removing file Puppet::SSL::CertificateRequest client.pic.es at 
'/var/lib/puppet/ssl/ca/requests/client.pic.es.pem'

that's fine.
But when I run an "old" client, which already have ca from prod server
(which is the same a test one), it runs with no problem:

Old-client# puppetd --server ser01-test.pic.es --test
info: Caching catalog at /var/lib/puppet/localconfig.yaml
notice: Starting catalog run
notice: Finished catalog run in 0.29 seconds

And I can't see it at server side:
#  puppetca --list  --all
+ test.pic.es (BB:1A:38:12:F8:83:EF:C6:D6:93:C2:1E:EB:FD:E2:89)
+ client.pic.es (87:08:04:8F:9B:CE:17:F6:1A:56:15:90:15:72:92:09)

*notice old-client is not listed.

So, seems that old clients are attached to test server and cert
security is not considered.

I can clean its cert, but nothing happens:

# puppetca --clean oldclient.pic.es
notice: Revoked certificate with serial 1781



2.-) If I revoke (clean) a cert of a client, the cert is revoke but
client is able to run against server:

Server:

#  puppetca --list  --all
+ test.pic.es (BB:1A:38:12:F8:83:EF:C6:D6:93:C2:1E:EB:FD:E2:89)
+ client.pic.es (87:08:04:8F:9B:CE:17:F6:1A:56:15:90:15:72:92:09)

#  puppetca --clean client.pic.es
notice: Revoked certificate with serial 2008
notice: Removing file Puppet::SSL::Certificate client.pic.es at 
'/var/lib/puppet/ssl/ca/signed/client.pic.es.pem'
notice: Removing file Puppet::SSL::Certificate client.pic.es at 
'/var/lib/puppet/ssl/certs/client.pic.es.pem'

client:
#  puppetd --server ser01-test.pic.es --test
info: Caching catalog for client.pic.es
info: Applying configuration version '1285678851'
notice: Finished catalog run in 0.01 seconds


Is it a desired behaviour? if yes, how may I revoke certs so clients
can't connect to master again?



TIA,
Arnau

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



[Puppet Users] Re: Proposal to remove redundant info in source => parameters

2010-09-28 Thread quicksilver03
Please no backticks or other characters like "~", those of us who do
not have a U.S. keyboard layout have a hard time typing them (2-to-3
keys combinations in some cases).

On Sep 28, 7:33 am, Patrick  wrote:
> On Sep 27, 2010, at 10:08 PM, Luke Kanies wrote:
>
>
>
>
>
> > On Sep 27, 2010, at 7:04 AM, Brice Figureau wrote:
>
> >> Hi,
>
> >> It looks like I missed your original e-mail to puppet-dev.
>
> >> On Fri, 2010-09-24 at 11:20 -0700, Nigel Kersten wrote:
> >>> [cross-posting as I'd like to know whether my intuition about this
> >>> being the most common case is correct]
>
> >>> class foo {
>
> >>> file { "/etc/foo.conf":
> >>>   source => "puppet:///modules/foo/foo.conf",
> >>> }
>
> >>> }
>
> >>> For me, every single one of my source specifications refers to a file
> >>> inside the current module. My intuition is that this is the most
> >>> common case outside my own deployment, so why don't we optimize for
> >>> it?
>
> >>> class foo {
>
> >>> file { "/etc/foo.conf":
> >>>   source => "foo.conf",
> >>> }
>
> >>> }
>
> >>> eg the proposal is that if you don't specify the protocol, server
> >>> address, modules prefix, module name, it is assumed you are referring
> >>> to a file path relative to the 'files' subdirectory of the current
> >>> module.
>
> >>> If you wish to fully specify the source URI, you're free to do so.
>
> >> My issue with your proposal is that at first glance it will look like a
> >> local copy (which should require an absolute path) and not a remote
> >> copy. This certainly violate the least surprise paradigm for new users.
>
> >> What about a new URI scheme (ie module) which would do the same:
>
> >> class foo {
> >>  file { "/etc/foo.conf":
> >>    source => "module://foo.conf",
> >>  }
> >> }
>
> > Another option is a new function:
>
> > class foo {
> >  file { "/etc/foo.conf":
> >    source => expand("foo.conf")
> >  }
> > }
>
> > Then all of the smarts could be in expand().
>
> > OTOH, I think it's a bit think in terms of syntax.  Backticks? :)
>
> Single quotes are popular enough that I think backticks would be a nightmare.

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



[Puppet Users] Environments and wiki documentation

2010-09-28 Thread Atlantis Boengkih
Hello,

First, please excuse my english.

I've had some troubles setting up environments. After a few hours digging for 
the misconfiguration, it appears that I did not declare my environments in the 
main section of my clients puppet.conf.


The wiki show the environment definition:
[puppetd]
environment = development


But it lack the environments definition:
[main]environments=production,testing,development,staging

Please, if this is my mistake, excuse my words, but if not I think this has to 
be more clearly defined, as i thinnk I'm not the only one falling into this 
trap.


--
atlantis


signature.asc
Description: Digital signature


Re: [Puppet Users] Determining if puppet ran ok.

2010-09-28 Thread Ohad Levy
On Tue, Sep 28, 2010 at 2:35 AM, Douglas Garstang
wrote:

> Nigel, having just done a quick run through of the reporting for the first
> time, I'll just stick with the yaml files. They should provide what I need.
> It's a bit hard to automate a GUI.
>
What does that mean? which kind of automation are you looking for?

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