[Puppet Users] Include the class of modules in master manifest

2012-02-03 Thread sateesh
Hi,

How to include the class of module in the manifests. Please find below
the details of file location. The puppet location is /etc/puppet/

In that location I have manifests and modules folder.
In modules, I have module "abc" in which I have xyz manifest.
xyz has following code located in /etc/puppet/modules/abc/manifests/
xyz.pp:

class abc::xyz{
  ...code here...
}

now I want to include the abc::xyz class in the root manifests file
located in /etc/puppet/manifests/site.pp.

I am able to include the statement "include abc", but when I try to
include "include abc::xyz", I am getting "Could not find class
abc::xyz" error when I run the command "puppet apply --verbose
site.pp"

Please let me know how to include that class in site.pp.

Thanks in advance,
Sateesh B.

-- 
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: Upgrade 2.7.9 to 2.7.10; puppet client hangs

2012-02-03 Thread Vasil Mikhalenya
mv 
/usr/lib/ruby/site_ruby/1.8/puppet/util/instrumentation/listeners/process_name.rb
/usr/lib/ruby/site_ruby/1.8/puppet/util/instrumentation/listeners/process_name.rb.bck

works for me too

facter puppetversion rubyversion virtual lsbdistdescription
lsbdistdescription => CentOS release 5.7 (Final)
puppetversion => 2.7.10
rubyversion => 1.8.5
virtual => physical

Thanks


On Fri, Feb 3, 2012 at 6:45 AM, Grant Byers  wrote:
> FYI
>
> I had this same problem after an upgrade from 2.7.9 to 2.7.10. I'm running a
> CentOS 5.7 OpenVZ VPS & don't have access to update the kernel ;
>
>   # uname -r
>   2.6.18-274.7.1.el5.028stab095.1
>
>   # facter puppetversion rubyversion virtual
>   puppetversion => 2.7.10
>   rubyversion => 1.8.5
>   virtual => openvzve
>
> Following another thread related to a performance regression in puppet
> 2.7.10 ;
>
>   http://projects.puppetlabs.com/issues/12310
>
> I decided to remove puppet/util/instrumentation/listeners/process_name.rb &
> test. I can confirm that this has resolved my problem.
>
> Regards,
> Grant
>
> mv
> /usr/lib/ruby/site_ruby/1.8/puppet/util/instrumentation/listeners/process_name.rb
> /usr/lib/ruby/site_ruby/1.8/puppet/util/instrumentation/listeners/process_name.rb.bad
>
>
>
> On 29 January 2012 08:07, Stefan Heijmans  wrote:
>>
>> Tried the same puppet setup in my homelab, no problems after upgrading.
>> Looking at the diffs, one of them was a kernel difference;
>> - test environment RHEL57 2.6.18-274.12.1.el5
>> - homelab            RHEL57 2.6.18-274.17.1.el5
>>
>> Remembered this bug; http://projects.puppetlabs.com/issues/10418, it
>> was updated with positive result on RHEL57 2.6.18-274.17.1.el5 kernel.
>> So the problem is now fixed with a new kernel in the test environment.
>>
>> Stefan.
>>
>> --
>> 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/-/JJwRMD6U0nkJ.
>>
>> 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.



-- 
Best regards,
Vasil Mikhalenya

-- 
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: Include the class of modules in master manifest

2012-02-03 Thread sateesh
Got it. Solved the problem.

On Feb 3, 1:19 pm, sateesh  wrote:
> Hi,
>
> How to include the class of module in the manifests. Please find below
> the details of file location. The puppet location is /etc/puppet/
>
> In that location I have manifests and modules folder.
> In modules, I have module "abc" in which I have xyz manifest.
> xyz has following code located in /etc/puppet/modules/abc/manifests/
> xyz.pp:
>
> class abc::xyz{
>   ...code here...
>
> }
>
> now I want to include the abc::xyz class in the root manifests file
> located in /etc/puppet/manifests/site.pp.
>
> I am able to include the statement "include abc", but when I try to
> include "include abc::xyz", I am getting "Could not find class
> abc::xyz" error when I run the command "puppet apply --verbose
> site.pp"
>
> Please let me know how to include that class in site.pp.
>
> Thanks in advance,
> Sateesh B.

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



Re: [Puppet Users] Re: Puppet can't start service (dropbox) but init.d command works manually

2012-02-03 Thread Felix Frank
Hi,

On 02/01/2012 02:01 AM, Richard K. Miller wrote:
> AppArmor is
> on. Could that be a factor?

I certainly believe so. It should be investigated.

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] Search which the agent on which a specified module is been installed

2012-02-03 Thread Felix Frank
Hi,

On 02/01/2012 06:01 AM, sateesh wrote:
> Hi,
> 
> Can we get the list of IPs from server where the specified module is
> installed. There is a search functionality in the Chef to do this. Is
> there any way in puppet?

not that I'm aware of, no.

There are some simple workarounds you might consider, e.g. including
code in your modules that logs hints to the puppetmaster logfile, then
you could do some simple shell one-liners to find the agents that
triggered that code.

But I don't think puppet does anything towards that end for you.

HTH,
Felix

-- 
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: Chef knife equivalent in puppet

2012-02-03 Thread Felix Frank
Hi,

On 02/03/2012 06:38 AM, sateesh wrote:
> The next step is now I need to install some modules that are located
> in the server on to newly created IP. I think in chef the server will
> copy on to the new VM in /tmp location and install the modules on that
> IP. After installing it will delete the copied module. So, is there
> any mechanism in Puppet.

you need to do this master-side. Make sure that a newly strapped VM
always includes your wanted classes.

As to how to do this, I'm not familiar with cloud-provisioner so I
couldn't say. If you can specify the bootstrapping commandline for
puppet, you could do

FACTER_bootstrapvm=true puppetd --test

and in your manifest

if $::bootstrapvm {
  include bootstrap_class
}

HTH,
Felix

-- 
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] ipv6 address facts

2012-02-03 Thread Jure Pečar

Hello,

Consider the following interfaces and addresses:

# ip a l
1: lo:  mtu 16436 qdisc noqueue state UNKNOWN 
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host 
   valid_lft forever preferred_lft forever
2: eth0:  mtu 1500 qdisc pfifo_fast state 
UNKNOWN qlen 1000
link/ether 00:50:56:b3:6a:5d brd ff:ff:ff:ff:ff:ff
inet 192.168.140.1/17 brd 192.168.255.255 scope global eth0
inet6 fe80::250:56ff:feb3:6a5d/64 scope link 
   valid_lft forever preferred_lft forever
3: eth1:  mtu 1500 qdisc pfifo_fast state UP 
qlen 1000
link/ether 00:50:56:b3:6a:5e brd ff:ff:ff:ff:ff:ff
inet6 fd00:1001:0:50:56:b3:6a:5e/64 scope global 
   valid_lft forever preferred_lft forever
inet6 fe80::250:56ff:feb3:6a5e/64 scope link 
   valid_lft forever preferred_lft forever

Now see what facter produces:

# facter | grep addr
ipaddress => 192.168.140.1
ipaddress6 => fd00:1001:0:50:56:b3:6a:5e
ipaddress_eth0 => 192.168.140.1
ipaddress_lo => 127.0.0.1
macaddress => 00:50:56:B3:6A:5D
macaddress_eth0 => 00:50:56:B3:6A:5D
macaddress_eth1 => 00:50:56:B3:6A:5E

I would expect to see a global ipaddress6 being specified for each v6 enabled 
interface (ipaddress6_eth1 in my case), but this is not the case.

facter-1.6.4-1.el6.noarch on rhel6.

I'm only few days into ruby, but as I read the code, it should work as I expect.

Any ideas why I see what I see?


-- 

Jure Pečar 

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



AW: [Puppet Users] Announcement: Geppetto 2.1.2 released

2012-02-03 Thread Bernd Adamowicz
Hi Henrik,

looks great! Discovered lots of warnings and even an error (which Puppet did 
not complain about) after upgrading. Fixed all my Puppet code now and I think 
this is another good step in improving my overall code quality.

Thanks for the work. Looking forward for new releases.

Bernd

> -Ursprüngliche Nachricht-
> Von: puppet-users@googlegroups.com [mailto:puppet-
> us...@googlegroups.com] Im Auftrag von Henrik Lindberg
> Gesendet: Donnerstag, 2. Februar 2012 17:09
> An: puppet-users@googlegroups.com
> Betreff: [Puppet Users] Announcement: Geppetto 2.1.2 released
> 
> Hi,
> I am happy to announce that Geppetto 2.1.2 has been released and is
> available as an update from within Geppetto.
> 
> If you do not already have Geppetto installed, start by downloading
> version 2.1.0 here https://github.com/cloudsmith/geppetto/downloads
> 
> In release 2.1.2
> 
> 
> * Code completion of variables and quick fixes based on closest
>matching names. Works in string interpolation too.
> 
> * Turns on puppet nature automatically when opening editor on a .pp
> file
> 
> * SVN and Git support are now separately updateable (and
>uninstallable). This enables users to switch to Subclipse (from the
>bundled Subversion) to get support for SVN 1.7.
> 
> * Helps correct problems with the confusing addition and removal of
>hyphen as a legal character in variable names. These are now
>validated and quickfixes are available.
> 
> * Save actions preferences that will automatically remove trailing
>whitespace from lines, replace all "funky" spaces (non breaking
>space, and all other variants of space) with regular space, and
>ensuring that file ends with a newline. These save actions are
>configurable for the workspace and projects can have individual
>(persisted) settings.
> 
> * Preferences available for Potential Problems, and Stylistic Problems
>where it is possible to control if these checks should be made and
> if
>they are ignored, flagged as errors or warnings.
> 
> * Checks added for selector expressions and case statements (default,
>duplicated and unreachable entries, etc.)
> 
> * Improved validation:
>- Illegal assignments to numerical variables
>- "false" != false, "true" != true
>- Numerical operations on known non-numerical operands
>  (e.g. 1 + 'hello')
>- Missing comma between entries improved (better message, and
>  quickfix added)
> 
> * Files external to Geppetto workspace can now be opened and edited.
>Geppetto links them to an automatically created special project (and
>unlinks them on close). This makes the files open in a reasonable
>context, and it is possible to navigate to them from error markers
>etc. This is not a substitute for having proper projects, but is
> very
>useful when just wanting to look at/edit/copy text from a file
>available in the filesystem. (Note that files in this special
> project
>resolve references against
>all other files in the same project).
> 
> 
> See https://github.com/cloudsmith/geppetto/wiki/Release-Notes
> for more detailed information about fixed issues.
> 
> Please see http://cloudsmith.github.com/geppetto/faq.html for
> information if you run into problems updating.
> Checkout
> http://cloudsmith.github.com/geppetto/faq.html#2011/06/28/how-do-i-
> update if you don't know how to update.
> 
> Regards
> - henrik
> 
> 
> 
> 
> --
> 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: pass values to puppet-lvm

2012-02-03 Thread Luke
Hmmm that is what I have been doing but for some reason it keeps
messing up. Do I have to do an include or something for the puppet-lvm
module? I mean I already have an import statement for it in my
sites.pp.

On Feb 2, 4:51 pm, jcbollinger  wrote:
> On Feb 2, 1:53 pm, Luke  wrote:
>
>
>
>
>
>
>
>
>
> > Thank you for your help.
>
> > I am pretty new to puppet but am making some progress.
>
> > One question how do I get the:
>
> > lvm::volume {'setvolume':
> >          vg => 'myvg',
> >          pv => '/dev/sdb',
> >          fstype => 'ext3',
> >          name => 'mylv',
> >          size =>'8G',
> >          ensure => 'present',
> >          }
>
> > To work within a node? I can pass variables to classes easy enough
> > within nodes but I can't seem to be able to get the nodes to do
> > anything with  defined resource types.
>
> > Thanks again for the help.
>
> If you are writing node definitions by hand, for example in a nodes.pp
> manifest, then you should be able to just put that code snippet inside
> one or more of them:
>
> node 'mynode' {
>     lvm::volume {'setvolume':
>          vg => 'myvg',
>          pv => '/dev/sdb',
>          fstype => 'ext3',
>          name => 'mylv',
>          size =>'8G',
>          ensure => 'present',
>      }
>
> }
>
> If you are using an external node classifier (ENC) such as Foreman or
> the Puppet Dashboard, however, then you need to know that the ENC
> interface does not support assigning ordinary resources to nodes.
> With an ENC, everything has to be bundled into classes.
>
> 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] Puppet installed using Gem

2012-02-03 Thread sateesh
Hi,

I have installed puppet using gem. Version it is installing is 2.7.10.

I want to set up the client server architecture. So when I am running
the "puppet agent --server  --test", it is giving me the
error

"err: Could not request certificate: Connection refused - connect(2)
Exiting; failed to retrieve certificate and waitforcert is disabled"

I have changed the owner of /var/lib/puppet to puppet:puppet. also
changed the mode to 0755. Still I am getting this error. Please let me
know where I am going wrong.

Thanks in advance,
Sateesh B.

-- 
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: pass values to puppet-lvm

2012-02-03 Thread Felix Frank
Hi,

On 02/03/2012 01:33 PM, Luke wrote:
> Hmmm that is what I have been doing but for some reason it keeps
> messing up. Do I have to do an include or something for the puppet-lvm
> module? I mean I already have an import statement for it in my
> sites.pp.

please share a relevant excerpt from your manifest.

Is an error generated? Please share that as well.

Thanks,
Felix

-- 
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: proper way to mirror apt.puppetlabs.com?

2012-02-03 Thread unixdoes
On Jan 5, 9:42 pm, Aaron Schaefer  wrote:
> On Jan 5, 6:19 pm, Adam Gibbins  wrote:
>
> > The recommendation for mirroring debian repositories is generally to use
> > something like apt-mirror or apt-cacher-ng.  Is there a reason you can't do
> > this?
>
> Our local mirror server is running CentOS, so I didn't think apt-
> mirror was an option, but it looks like we're using debmirror for
> Ubuntu repositories already, so I'll modify our script to add
> apt.puppetlabs.com in there as well. Thanks for pointing me in the
> right direction...I had just set up rsyncing for yum.puppetlabs.com
> without issue and was perplexed by the apt-side of things.

The rsync instructions elsewhere in the group and on google don't seem
to work for me, and nmapping yum.puppetlabs.com shows only 80/443
open.  What's the correct way to mirror the yum repo these days?

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.



[Puppet Users] pip and virtualenv

2012-02-03 Thread lfrodrigues
Hello,

I would like to use pip to install some python modules. The problem is
that I want to keep all my stuff isolated.

I saw this https://projects.puppetlabs.com/issues/7286 about
virtualenv support.

Anyone knows at what stage that is? Any other solution for virtualenv
and pip?

Best regards,

Luis

-- 
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 SSL Problems

2012-02-03 Thread Thomas Jones
I am attempting to implement puppet for a server block of 20. Have set
it up and used for 2 months now. All of a sudden i get SSL problems.
Here is what ive done:

Server - removed Server SSL directory completely(/var/lib/puppetmaster/ssl).
Server(Client) - removed Client SSL directory completely(/var/lib/puppet/ssl).
Client - removed SSL directory completely(/var/lib/puppet/ssl).

I have restarted puppetmaster. Verified its status.

*snip*
[root@puppet-server thomasjones]# /usr/sbin/puppetca --clean --all
[root@puppet-server thomasjones]# /sbin/service puppetmaster start
Starting puppetmaster: [  OK  ]
[root@puppet-server thomasjones]# /sbin/service puppetmaster status
puppetmasterd (pid  19464) is running...
*end snip*

On the external client i have issued

/usr/sbin/puppetd --server puppet-server.domain.com --verbose
--no-daemonize --waitforcert 60

I receive:
*snip*
err: Could not request certificate: Retrieved certificate does not
match private key; please remove certificate from server and
regenerate it with the current key
*end snip*

I check the puppetca:

*snip*
[root@puppet-server thomasjones]# /usr/sbin/puppetca --list --all
+ puppet-server.hitcents.com (D4:CE:87:80:3B:12:8B:94:48:B4:58:04:B6:F8:6D:68)
*end snip*

I would gladly do that if a key existed and i could sign a new one!!! ugh.

Versions are:

[thomasjones@webserver htdocs]$ rpm -qi puppet
Name: puppet   Relocations: (not relocatable)
Version : 2.7.5 Vendor: Dag Apt
Repository, http://dag.wieers.com/apt/
Release : 1.el5.rf  Build Date: Sun 16 Oct
2011 12:38:48 PM CDT
[root@puppet-server thomasjones]# rpm -qi puppet-server
Name: puppet-serverRelocations: (not relocatable)
Version : 2.7.5 Vendor: Dag Apt
Repository, http://dag.wieers.com/apt/
Release : 1.el5.rf  Build Date: Sun 16 Oct
2011 12:38:48 PM CDT

-- 
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: Include the class of modules in master manifest

2012-02-03 Thread Dan White
How, please ?

“Sometimes I think the surest sign that intelligent life exists elsewhere in 
the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)

- sateesh  wrote:
> Got it. Solved the problem.
> 
> On Feb 3, 1:19 pm, sateesh  wrote:
> > Hi,
> >
> > How to include the class of module in the manifests. Please find below
> > the details of file location. The puppet location is /etc/puppet/
> >
> > In that location I have manifests and modules folder.
> > In modules, I have module "abc" in which I have xyz manifest.
> > xyz has following code located in /etc/puppet/modules/abc/manifests/
> > xyz.pp:
> >
> > class abc::xyz{
> >   ...code here...
> >
> > }
> >
> > now I want to include the abc::xyz class in the root manifests file
> > located in /etc/puppet/manifests/site.pp.
> >
> > I am able to include the statement "include abc", but when I try to
> > include "include abc::xyz", I am getting "Could not find class
> > abc::xyz" error when I run the command "puppet apply --verbose
> > site.pp"
> >
> > Please let me know how to include that class in site.pp.
> >
> > Thanks in advance,
> > Sateesh B.
> 
> -- 
> 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: pass values to puppet-lvm

2012-02-03 Thread Luke
Hi,

site.pp

manifests]$ cat site.pp
import "nodes"
import "modules"



manifests]$ cat modules.pp
import "lvm"


cat nodes.pp
node 'luketest.mgmt.mydomain.local' {

lvm::volume {'setvolume':
 vg => 'myvg',
 pv => '/dev/sdb',
 fstype => 'ext3',
 name => 'mylv',
 size =>'8G',
 ensure => 'present',
 }
}

---

The module was originally named puppet-lvm I tried renaming to lvm

but it doesn't matter get the same results

Does the following:

When I name the module lvm. I applys the config but doesn't do
anything.
info: Caching catalog for luketest.mgmt.mydomain.local
info: Applying configuration version '1328241141'
notice: Finished catalog run in 0.03 seconds


manifests]$ cat modules.pp
import "puppet-lvm"


cat nodes.pp
node 'luketest.mgmt.mydomain.local' {

lvm::volume {'setvolume':
 vg => 'myvg',
 pv => '/dev/sdb',
 fstype => 'ext3',
 name => 'mylv',
 size =>'8G',
 ensure => 'present',
 }
}


I also tried the following:

cat nodes.pp
node 'luketest.mgmt.mydomain.local' {

puppet-lvm::lvm::volume {'setvolume':
 vg => 'myvg',
 pv => '/dev/sdb',
 fstype => 'ext3',
 name => 'mylv',
 size =>'8G',
 ensure => 'present',
 }
}

-

but got the following error:

err: Could not retrieve catalog from remote server: Error 400 on
SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError:
Invalid resource type puppet-lvm::lvm::volume at /srv/puppet/manifests/
nodes.pp:10 on node luketest.mgmt.mydomain.local
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run


On Feb 3, 8:59 am, Felix Frank 
wrote:
> Hi,
>
> On 02/03/2012 01:33 PM, Luke wrote:
>
> > Hmmm that is what I have been doing but for some reason it keeps
> > messing up. Do I have to do an include or something for the puppet-lvm
> > module? I mean I already have an import statement for it in my
> > sites.pp.
>
> please share a relevant excerpt from your manifest.
>
> Is an error generated? Please share that as well.
>
> Thanks,
> Felix

-- 
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: pass values to puppet-lvm

2012-02-03 Thread Felix Frank
Hi,

On 02/03/2012 02:37 PM, Luke wrote:
> When I name the module lvm. I applys the config but doesn't do
> anything.
> info: Caching catalog for luketest.mgmt.mydomain.local
> info: Applying configuration version '1328241141'
> notice: Finished catalog run in 0.03 seconds

please repeat with --evaltrace.

Is it supposed to be doing anything?

If evaltrace isn't concluse, you may want to add -dv.

Finally, you can even inspect the catalog in /var/lib/puppet. If it
doesn't mention your LV, something is wrong indeed.

HTH,
Felix

-- 
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 installed using Gem

2012-02-03 Thread Felix Frank
Hi,

On 02/03/2012 01:48 PM, sateesh wrote:
> "err: Could not request certificate: Connection refused - connect(2)

are you absolutely certain the default port is open on your master? It
sure doesn't look like it.

> Exiting; failed to retrieve certificate and waitforcert is disabled"

If you don't have a signed cert yet, you need to specify
--waitforcert=60 (or another number of seconds) as well.

HTH,
Felix

-- 
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: pass values to puppet-lvm

2012-02-03 Thread Luke
[root@luketest ~]# puppet agent --test --evaltrace
info: Caching catalog for luketest.mgmt.mydomain.local
info: Applying configuration version '1328245279'
info: /Schedule[puppet]: valuated in 0.00 seconds
info: /Filebucket[puppet]: valuated in 0.00 seconds
info: /Schedule[never]: valuated in 0.00 seconds
info: /Schedule[daily]: valuated in 0.00 seconds
info: /Schedule[weekly]: valuated in 0.00 seconds
info: /Schedule[monthly]: valuated in 0.00 seconds
info: /Schedule[hourly]: valuated in 0.00 seconds
info: /Whit[/dev/sdb]: valuated in 0.00 seconds
info: /Whit[myvg]: valuated in 0.00 seconds
info: /Whit[mylv]: valuated in 0.00 seconds
info: /Whit[/dev/myvg/mylv]: valuated in 0.00 seconds
notice: Finished catalog run in 0.04 seconds

with dv
--

debug: Puppet::Type::User::ProviderPw: file pw does not exist
debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/
dscl does not exist
debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does
not exist
debug: Failed to load library 'ldap' for feature 'ldap'
debug: Puppet::Type::User::ProviderLdap: feature ldap is missing
debug: Failed to load library 'rubygems' for feature 'rubygems'
debug: Puppet::Type::File::ProviderMicrosoft_windows: feature
microsoft_windows is missing
debug: /File[/var/lib/puppet/state/last_run_summary.yaml]:
Autorequiring File[/var/lib/puppet/state]
debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring File[/
var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/
puppet]
debug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring File[/
var/lib/puppet/ssl/certs]
debug: /File[/var/lib/puppet/state/graphs]: Autorequiring File[/var/
lib/puppet/state]
debug: /File[/var/lib/puppet/clientbucket]: Autorequiring File[/var/
lib/puppet]
debug: /File[/var/lib/puppet/state/state.yaml]: Autorequiring File[/
var/lib/puppet/state]
debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/
puppet]
debug: /File[/var/lib/puppet/ssl/private_keys/
luketest.mgmt.mydomain.local.pem]: Autorequiring File[/var/lib/puppet/
ssl/private_keys]
debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
debug: /File[/etc/puppet/puppet.conf]: Autorequiring File[/etc/puppet]
debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring File[/var/
lib/puppet/ssl]
debug: /File[/var/lib/puppet/ssl/public_keys/
luketest.mgmt.mydomain.local.pem]: Autorequiring File[/var/lib/puppet/
ssl/public_keys]
debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring
File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/client_data]: Autorequiring File[/var/lib/
puppet]
debug: /File[/var/lib/puppet/ssl/certs/
luketest.mgmt.mydomain.local.pem]: Autorequiring File[/var/lib/puppet/
ssl/certs]
debug: /File[/var/lib/puppet/ssl/crl.pem]: Autorequiring File[/var/lib/
puppet/ssl]
debug: /File[/var/lib/puppet/classes.txt]: Autorequiring File[/var/lib/
puppet]
debug: /File[/var/lib/puppet/ssl/private]: Autorequiring File[/var/lib/
puppet/ssl]
debug: /File[/var/lib/puppet/client_yaml]: Autorequiring File[/var/lib/
puppet]
debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/
puppet/ssl]
debug: Finishing transaction 23937560695320
debug: /File[/var/lib/puppet/ssl/private]: Autorequiring File[/var/lib/
puppet/ssl]
debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring File[/
var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/
puppet]
debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/
puppet/ssl]
debug: /File[/var/lib/puppet/ssl/public_keys/
luketest.mgmt.mydomain.local.pem]: Autorequiring File[/var/lib/puppet/
ssl/public_keys]
debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring
File[/var/lib/puppet/ssl]
debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring File[/var/
lib/puppet/ssl]
debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/
puppet]
debug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring File[/
var/lib/puppet/ssl/certs]
debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/ssl/certs/
luketest.mgmt.mydomain.local.pem]: Autorequiring File[/var/lib/puppet/
ssl/certs]
debug: /File[/var/lib/puppet/ssl/crl.pem]: Autorequiring File[/var/lib/
puppet/ssl]
debug: /File[/var/lib/puppet/ssl/private_keys/
luketest.mgmt.mydomain.local.pem]: Autorequiring File[/var/lib/puppet/
ssl/private_keys]
debug: Finishing transaction 23937559797080
debug: Using cached certificate for ca
debug: Using cached certificate for luketest.mgmt.mydomain.local
debug: Finishing transaction 23937559374540
debug: Loaded state in 0.00 seconds
debug: Using cached certificate for ca
debug: Using cached certificate for luketest.mgmt.mydomain.local
debug: Using cached certificate_revocation_list for ca
debug: catalog

[Puppet Users] Re: pass values to puppet-lvm

2012-02-03 Thread Luke
This is the module here that I am trying to get working:

https://github.com/puppetlabs/puppet-lvm

On Feb 3, 9:51 am, Luke  wrote:
> [root@luketest ~]# puppet agent --test --evaltrace
> info: Caching catalog for luketest.mgmt.mydomain.local
> info: Applying configuration version '1328245279'
> info: /Schedule[puppet]: valuated in 0.00 seconds
> info: /Filebucket[puppet]: valuated in 0.00 seconds
> info: /Schedule[never]: valuated in 0.00 seconds
> info: /Schedule[daily]: valuated in 0.00 seconds
> info: /Schedule[weekly]: valuated in 0.00 seconds
> info: /Schedule[monthly]: valuated in 0.00 seconds
> info: /Schedule[hourly]: valuated in 0.00 seconds
> info: /Whit[/dev/sdb]: valuated in 0.00 seconds
> info: /Whit[myvg]: valuated in 0.00 seconds
> info: /Whit[mylv]: valuated in 0.00 seconds
> info: /Whit[/dev/myvg/mylv]: valuated in 0.00 seconds
> notice: Finished catalog run in 0.04 seconds
>
> with dv
> --
>
> debug: Puppet::Type::User::ProviderPw: file pw does not exist
> debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/
> dscl does not exist
> debug: Puppet::Type::User::ProviderUser_role_add: file roleadd does
> not exist
> debug: Failed to load library 'ldap' for feature 'ldap'
> debug: Puppet::Type::User::ProviderLdap: feature ldap is missing
> debug: Failed to load library 'rubygems' for feature 'rubygems'
> debug: Puppet::Type::File::ProviderMicrosoft_windows: feature
> microsoft_windows is missing
> debug: /File[/var/lib/puppet/state/last_run_summary.yaml]:
> Autorequiring File[/var/lib/puppet/state]
> debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring File[/
> var/lib/puppet/ssl]
> debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/
> puppet]
> debug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring File[/
> var/lib/puppet/ssl/certs]
> debug: /File[/var/lib/puppet/state/graphs]: Autorequiring File[/var/
> lib/puppet/state]
> debug: /File[/var/lib/puppet/clientbucket]: Autorequiring File[/var/
> lib/puppet]
> debug: /File[/var/lib/puppet/state/state.yaml]: Autorequiring File[/
> var/lib/puppet/state]
> debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/
> puppet]
> debug: /File[/var/lib/puppet/ssl/private_keys/
> luketest.mgmt.mydomain.local.pem]: Autorequiring File[/var/lib/puppet/
> ssl/private_keys]
> debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
> debug: /File[/etc/puppet/puppet.conf]: Autorequiring File[/etc/puppet]
> debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring File[/var/
> lib/puppet/ssl]
> debug: /File[/var/lib/puppet/ssl/public_keys/
> luketest.mgmt.mydomain.local.pem]: Autorequiring File[/var/lib/puppet/
> ssl/public_keys]
> debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring
> File[/var/lib/puppet/ssl]
> debug: /File[/var/lib/puppet/client_data]: Autorequiring File[/var/lib/
> puppet]
> debug: /File[/var/lib/puppet/ssl/certs/
> luketest.mgmt.mydomain.local.pem]: Autorequiring File[/var/lib/puppet/
> ssl/certs]
> debug: /File[/var/lib/puppet/ssl/crl.pem]: Autorequiring File[/var/lib/
> puppet/ssl]
> debug: /File[/var/lib/puppet/classes.txt]: Autorequiring File[/var/lib/
> puppet]
> debug: /File[/var/lib/puppet/ssl/private]: Autorequiring File[/var/lib/
> puppet/ssl]
> debug: /File[/var/lib/puppet/client_yaml]: Autorequiring File[/var/lib/
> puppet]
> debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet]
> debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/
> puppet/ssl]
> debug: Finishing transaction 23937560695320
> debug: /File[/var/lib/puppet/ssl/private]: Autorequiring File[/var/lib/
> puppet/ssl]
> debug: /File[/var/lib/puppet/ssl/private_keys]: Autorequiring File[/
> var/lib/puppet/ssl]
> debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/
> puppet]
> debug: /File[/var/lib/puppet/ssl/certs]: Autorequiring File[/var/lib/
> puppet/ssl]
> debug: /File[/var/lib/puppet/ssl/public_keys/
> luketest.mgmt.mydomain.local.pem]: Autorequiring File[/var/lib/puppet/
> ssl/public_keys]
> debug: /File[/var/lib/puppet/ssl/certificate_requests]: Autorequiring
> File[/var/lib/puppet/ssl]
> debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
> debug: /File[/var/lib/puppet/ssl/public_keys]: Autorequiring File[/var/
> lib/puppet/ssl]
> debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/
> puppet]
> debug: /File[/var/lib/puppet/ssl/certs/ca.pem]: Autorequiring File[/
> var/lib/puppet/ssl/certs]
> debug: /File[/var/lib/puppet/ssl]: Autorequiring File[/var/lib/puppet]
> debug: /File[/var/lib/puppet/ssl/certs/
> luketest.mgmt.mydomain.local.pem]: Autorequiring File[/var/lib/puppet/
> ssl/certs]
> debug: /File[/var/lib/puppet/ssl/crl.pem]: Autorequiring File[/var/lib/
> puppet/ssl]
> debug: /File[/var/lib/puppet/ssl/private_keys/
> luketest.mgmt.mydomain.local.pem]: Autorequiring File[/var/lib/puppet/
> ssl/private_keys]
> debug: Finishing transaction 23937559797080
> debug: Using cach

Re: [Puppet Users] Re: pass values to puppet-lvm

2012-02-03 Thread Felix Frank
On 02/03/2012 02:51 PM, Luke wrote:
> info: /Whit[/dev/sdb]: valuated in 0.00 seconds
> info: /Whit[myvg]: valuated in 0.00 seconds
> info: /Whit[mylv]: valuated in 0.00 seconds
> info: /Whit[/dev/myvg/mylv]: valuated in 0.00 seconds

Looks like it's working all right. But seeing as the LV exists already,
puppet doesn't need to do anything.

Try and add a new LV in the manifest, watch puppet create it.

HTH,
Felix

-- 
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: pass values to puppet-lvm

2012-02-03 Thread Luke
Hi Felix,

Thats the thing the LV doesn't exist so I don't know why it is acting
like it does:

Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot  Start End  Blocks   Id  System
/dev/sda1   *   1  13  104391   83  Linux
/dev/sda2  14130510377990   8e  Linux LVM

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

Its not even doing anything with /dev/sdb.

It makes me wonder if I am going about implementing it correctly.

Thanks for the help Felix,

On Feb 3, 9:55 am, Felix Frank 
wrote:
> On 02/03/2012 02:51 PM, Luke wrote:
>
> > info: /Whit[/dev/sdb]: valuated in 0.00 seconds
> > info: /Whit[myvg]: valuated in 0.00 seconds
> > info: /Whit[mylv]: valuated in 0.00 seconds
> > info: /Whit[/dev/myvg/mylv]: valuated in 0.00 seconds
>
> Looks like it's working all right. But seeing as the LV exists already,
> puppet doesn't need to do anything.
>
> Try and add a new LV in the manifest, watch puppet create it.
>
> HTH,
> Felix

-- 
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: pass values to puppet-lvm

2012-02-03 Thread Luke
It doesn't matter what I put in it does the same thing:

debug: /Stage[main]//Node[luketest.mgmt.mydomain.local]/
Lvm::Volume[setvolume]/Filesystem[/dev/awesomevg/awesomename]/require:
requires Logical_volume[awesomename]
debug: /Stage[main]//Node[luketest.mgmt.mydomain.local]/
Lvm::Volume[setvolume]/Logical_volume[awesomename]/require: requires
Volume_group[awesomevg]
debug: /Stage[main]//Node[luketest.mgmt.mydomain.local]/
Lvm::Volume[setvolume]/Volume_group[awesomevg]/require: requires
Physical_volume[/dev/sdb

I can even put in a random pv that doesn't exist and it still is all
fat dumb and happy:

debug: Creating default schedules
debug: Loaded state in 0.00 seconds
debug: /Stage[main]//Node[luketest.mgmt.mydomain.local]/
Lvm::Volume[setvolume]/Filesystem[/dev/awesomevg/awesomename]/require:
requires Logical_volume[awesomename]
debug: /Stage[main]//Node[luketest.mgmt.mydomain.local]/
Lvm::Volume[setvolume]/Volume_group[awesomevg]/require: requires
Physical_volume[/dev/awesome]
debug: /Stage[main]//Node[luketest.mgmt.mydomain.local]/
Lvm::Volume[setvolume]/Logical_volume[awesomename]/require: requires
Volume_group[awesomevg]

On Feb 3, 10:04 am, Luke  wrote:
> Hi Felix,
>
> Thats the thing the LV doesn't exist so I don't know why it is acting
> like it does:
>
> Disk /dev/sda: 10.7 GB, 10737418240 bytes
> 255 heads, 63 sectors/track, 1305 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
>
>    Device Boot      Start         End      Blocks   Id  System
> /dev/sda1   *           1          13      104391   83  Linux
> /dev/sda2              14        1305    10377990   8e  Linux LVM
>
> Disk /dev/sdb: 8589 MB, 8589934592 bytes
> 255 heads, 63 sectors/track, 1044 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
>
> Disk /dev/sdb doesn't contain a valid partition table
>
> Its not even doing anything with /dev/sdb.
>
> It makes me wonder if I am going about implementing it correctly.
>
> Thanks for the help Felix,
>
> On Feb 3, 9:55 am, Felix Frank 
> wrote:
>
>
>
>
>
>
>
> > On 02/03/2012 02:51 PM, Luke wrote:
>
> > > info: /Whit[/dev/sdb]: valuated in 0.00 seconds
> > > info: /Whit[myvg]: valuated in 0.00 seconds
> > > info: /Whit[mylv]: valuated in 0.00 seconds
> > > info: /Whit[/dev/myvg/mylv]: valuated in 0.00 seconds
>
> > Looks like it's working all right. But seeing as the LV exists already,
> > puppet doesn't need to do anything.
>
> > Try and add a new LV in the manifest, watch puppet create it.
>
> > HTH,
> > Felix

-- 
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: pass values to puppet-lvm

2012-02-03 Thread Felix Frank
Hi,

On 02/03/2012 03:04 PM, Luke wrote:
> Disk /dev/sdb: 8589 MB, 8589934592 bytes
> 255 heads, 63 sectors/track, 1044 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> 
> Disk /dev/sdb doesn't contain a valid partition table
> 
> Its not even doing anything with /dev/sdb.

What makes you so certain? :-)

Output of pvs and lvs, please.

Thanks,
Felix

-- 
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] pip and virtualenv

2012-02-03 Thread Michael Cumings
These modules work fine for what I need...

define virtualenv($ensure = 'present', $executable=false,
$relocatable=false,
  $extra_search_dir=false, $site_packages=false,
  $never_download=false, $prompt=false, $user='root') {

$executable_opt = $executable ? { false => '', default => $executable }
$relocatable_opt = $relocatable ? { false => '', default =>
'--relocatable' }
$site_packages_opt = $site_packages ? { false => '--no-site-packages',
default => '' }
$never_download_opt = $never_download ? { false => '', default =>
'-never-download' }
$prompt_opt = $prompt ? { false => '', default => "--prompt=$prompt" }
$extra_search_dir_opt = $extra_search_dir ? {
false => '',
default => inline_template('<%= extra_search_dir.collect { |dir|
"--extra-search-dir={dir}"}.join(" ") %>')
}

if $ensure == 'present' {
exec { "virtual_env-$nme":
command => "virtualenv $executable_opt $relocatable_opt
$site_packages_opt \
$never_download_opt $extrasearch_dir_opt $prompt_opt $name",
creates => "$name",
user => $user,
require => Pip::Install['virtualenv'],
}
}
else {
file { $name :
ensure => absent,
recurse => true,
force => true,
}
}
}

define pip::install ($ensure = 'present', $virtualenv = false,
 $package = false, $version = false) {

$_package = $package ? { false => $name, default => $package }
$env_opt = $virtualenv ? { false => '', default => "--environment
$virtualenv" }
$package_opt = $version ? { false => $_package, default =>
"$_package==$version" }

if $ensure == 'present' {
  exec { "pip_install_${_package}_${virtualenv}":
unless => "pip freeze $env_opt | grep $package_opt",
command => "pip install $env_opt $package_opt"
  }
}
else {
exec { "pip_uninstall_${package}_${virtualenv}":
onlyif => "pip freeze $env_opt | grep $package_opt",
command => "pip uninstall $env_opt $package_opt"
}
}
}

I declare the virtualenv and then declare the modules I want installed in
them.  I have a very targeted use but I think they might be generic enough
to help.  Working on Puppet 2.5.7.

On Fri, Feb 3, 2012 at 6:18 AM, lfrodrigues  wrote:

> Hello,
>
> I would like to use pip to install some python modules. The problem is
> that I want to keep all my stuff isolated.
>
> I saw this https://projects.puppetlabs.com/issues/7286 about
> virtualenv support.
>
> Anyone knows at what stage that is? Any other solution for virtualenv
> and pip?
>
> Best regards,
>
> Luis
>
> --
> 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: pip and virtualenv

2012-02-03 Thread lfrodrigues
Could you please provide an example of using the modules to install
something

Luis

On Feb 3, 3:31 pm, Michael Cumings 
wrote:
> These modules work fine for what I need...
>
> define virtualenv($ensure = 'present', $executable=false,
> $relocatable=false,
>   $extra_search_dir=false, $site_packages=false,
>   $never_download=false, $prompt=false, $user='root') {
>
>     $executable_opt = $executable ? { false => '', default => $executable }
>     $relocatable_opt = $relocatable ? { false => '', default =>
> '--relocatable' }
>     $site_packages_opt = $site_packages ? { false => '--no-site-packages',
> default => '' }
>     $never_download_opt = $never_download ? { false => '', default =>
> '-never-download' }
>     $prompt_opt = $prompt ? { false => '', default => "--prompt=$prompt" }
>     $extra_search_dir_opt = $extra_search_dir ? {
> false => '',
> default => inline_template('<%= extra_search_dir.collect { |dir|
> "--extra-search-dir={dir}"}.join(" ") %>')
>     }
>
>     if $ensure == 'present' {
> exec { "virtual_env-$nme":
>     command => "virtualenv $executable_opt $relocatable_opt
> $site_packages_opt \
> $never_download_opt $extrasearch_dir_opt $prompt_opt $name",
>     creates => "$name",
>     user => $user,
>     require => Pip::Install['virtualenv'],}
>
>     }
>     else {
> file { $name :
>     ensure => absent,
>     recurse => true,
>     force => true,
>
> }
>     }
> }
>
> define pip::install ($ensure = 'present', $virtualenv = false,
>      $package = false, $version = false) {
>
>     $_package = $package ? { false => $name, default => $package }
>     $env_opt = $virtualenv ? { false => '', default => "--environment
> $virtualenv" }
>     $package_opt = $version ? { false => $_package, default =>
> "$_package==$version" }
>
>     if $ensure == 'present' {
>   exec { "pip_install_${_package}_${virtualenv}":
>     unless => "pip freeze $env_opt | grep $package_opt",
>     command => "pip install $env_opt $package_opt"
>   }
>     }
>     else {
> exec { "pip_uninstall_${package}_${virtualenv}":
>     onlyif => "pip freeze $env_opt | grep $package_opt",
>     command => "pip uninstall $env_opt $package_opt"
>
> }
>     }
> }
>
> I declare the virtualenv and then declare the modules I want installed in
> them.  I have a very targeted use but I think they might be generic enough
> to help.  Working on Puppet 2.5.7.
>
>
>
>
>
>
>
> On Fri, Feb 3, 2012 at 6:18 AM, lfrodrigues  wrote:
> > Hello,
>
> > I would like to use pip to install some python modules. The problem is
> > that I want to keep all my stuff isolated.
>
> > I saw thishttps://projects.puppetlabs.com/issues/7286about
> > virtualenv support.
>
> > Anyone knows at what stage that is? Any other solution for virtualenv
> > and pip?
>
> > Best regards,
>
> > Luis
>
> > --
> > 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: constraint checking

2012-02-03 Thread jcbollinger


On Feb 2, 4:42 pm, Jo Rhett  wrote:
> >> On Jan 26, 2012, at 6:19 AM, jcbollinger wrote:
> >>> For the most part, I think this reflects the difficulty of the
> >>> underlying problem more than any inadequacy of Puppet.  If multiple
> >>> independent subsystems place different demands on the same resources,
> >>> then you have a mess to sort out no matter what tools you use to do
> >>> it.  On the other hand, if multiple independent subsystems place the
> >>> same demands on certain resources, then that's pretty easy to handle,
> >>> with Puppet or otherwise.
> > On Jan 26, 1:22 pm, Jo Rhett  wrote:
> >> I disagree.  I have about 12 different modules, any combination of which 
> >> may be applied to a given system, all of which need to ensure that sshd is 
> >> installed and running on a system. They all have a single, common need. 
> >> However, some of those modules also run on systems where we don't need to 
> >> ensure that sshd is running.  The solution to this is an interlocking maze 
> >> of module dependancies which is downright terrifying.
>
> On Feb 1, 2012, at 6:26 AM, jcbollinger wrote:
>
>
>
>
>
>
>
> > You seem to be describing my former case rather than my latter one, at
> > least with respect to nodes that don't need (and apparently don't
> > *want*) sshd to be running.  All the same, were I faced with a problem
> > of that sort I would probably take this approach:
>
> > 1) Factor the ssh[d] management into its own module.
> > 2) Avoid using any parameterized classes in the ssh module, or at
> > least in its external interface.
> > 3) Instead, have the ssh module use external data to determine node-by-
> > node or role-by-role whether sshd should be running.
> > 4) Make other modules 'include' or 'require' the appropriate classes
> > of the ssh module, as needed.
>
> > With that, all the modules depend on the ssh module, but they do not
> > depend on each other, at least not for this purpose.  It's clean and
> > simple.  Enabling that result is the overarching benefit of the
> > ability to assign the same class to a node multiple times.
>
> That simply doesn't work, because you are basically asking the ssh module to 
> have all the logic inside it for whether or not certain other classes need 
> it.  As expressed, it would require duplication of all the if/then in the 
> other modules to be duplicated within this module.  That's simply not 
> practical in a large or diversified team.


How do you figure that?  I repeat: "OTHER MODULES 'include' or
'require' the appropriate classes of the ssh module" (emphasis
added).  That is, the classes that need ssh (as THEY decide) 'include'
or 'require' the appropriate classes of the ssh module.  This is
natural and very maintainable, and it does not require the ssh module
to know anything about other modules.

To complete the picture, where needed "the ssh module use[s] EXTERNAL
DATA to determine node-by-node or role-by-role whether sshd should be
running" (emphasis added).  That might in fact not be needed anywhere,
but if used it serves to *reduce* conditional logic in your manifests
and to *remove* inter-module coupling.  In particular, it does not
require the ssh module to know which nodes or which roles should have
sshd running.  It only requires the ssh module to know the node or the
node's role[s], from which it *looks up* whether sshd should be
running.

That may be very different from your current design, but the design
concept is sound.  In fact, it's the soundest Puppet design pattern I
know that does not rely on an ENC (though it works fine with an ENC,
too).  I'd even say it's what Puppetlabs should have embraced and
promoted instead of parameterized classes.

Nevertheless, if you use an ENC then you also have the option of
putting the burden there.  That you will do so seems one of the
assumptions behind Puppetlabs's current style recommendations, as
those call for avoiding classes declaring (or 'include'ing or
'require'ing) other classes.  Therefore, that approach necessarily
involves moving all the messy conditional logic to the ENC and / or to
external data, or at any rate out of the dependent classes
themselves.  This is the only viable option I know for shared,
parameterized dependencies.

You can mix those two approaches to some extent, if you're careful,
but what you must *not* do -- what it sounds like you are doing -- is
to allow any two classes to each declare / include / require the same
parameterized dependency, *even conditionally*.


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: pass values to puppet-lvm

2012-02-03 Thread Luke
Here you go

root@luketest ~]# pvdisplay
  /dev/hdc: open failed: No medium found
  --- Physical volume ---
  PV Name   /dev/sda2
  VG Name   VolGroup00
  PV Size   9.90 GB / not usable 22.76 MB
  Allocatable   yes (but full)
  PE Size (KByte)   32768
  Total PE  316
  Free PE   0
  Allocated PE  316
  PV UUID   npQup3-Fhv6-bNA3-87HF-P9tt-9Z6n-FMbJ5W

root@luketest ~]# lvdisplay
  /dev/hdc: open failed: No medium found
  --- Logical volume ---
  LV Name/dev/VolGroup00/LogVol00
  VG NameVolGroup00
  LV UUIDwI6rkP-wlsM-rngt-TsWZ-HLjr-A0S7-eJibXD
  LV Write Accessread/write
  LV Status  available
  # open 1
  LV Size9.12 GB
  Current LE 292
  Segments   1
  Allocation inherit
  Read ahead sectors auto
  - currently set to 256
  Block device   253:0

  --- Logical volume ---
  LV Name/dev/VolGroup00/LogVol01
  VG NameVolGroup00
  LV UUIDCplThy-JVyJ-wcgh-ldMY-KDo8-lT2s-aHV8Nq
  LV Write Accessread/write
  LV Status  available
  # open 1
  LV Size768.00 MB
  Current LE 24
  Segments   1
  Allocation inherit
  Read ahead sectors auto
  - currently set to 256
  Block device   253:1

On Feb 3, 10:07 am, Felix Frank 
wrote:
> Hi,
>
> On 02/03/2012 03:04 PM, Luke wrote:
>
> > Disk /dev/sdb: 8589 MB, 8589934592 bytes
> > 255 heads, 63 sectors/track, 1044 cylinders
> > Units = cylinders of 16065 * 512 = 8225280 bytes
>
> > Disk /dev/sdb doesn't contain a valid partition table
>
> > Its not even doing anything with /dev/sdb.
>
> What makes you so certain? :-)
>
> Output of pvs and lvs, please.
>
> Thanks,
> Felix

-- 
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: pass values to puppet-lvm

2012-02-03 Thread jcbollinger


On Feb 3, 7:37 am, Luke  wrote:
> Hi,
>
> site.pp
>
> manifests]$ cat site.pp
> import "nodes"


That import is appropriate.


> import "modules"


That one should not be needed.


> 
>
> manifests]$ cat modules.pp
> import "lvm"


That whole manifest should not be need.


> 
>
> cat nodes.pp
> node 'luketest.mgmt.mydomain.local' {
>
> lvm::volume {'setvolume':
>          vg => 'myvg',
>          pv => '/dev/sdb',
>          fstype => 'ext3',
>          name => 'mylv',
>          size =>'8G',
>          ensure => 'present',
>          }
>
> }


That node definition is fine.

The other part of the problem is likely your module structure and
location.  The name of your defined type places it in module "lvm",
but for Puppet to automatically *find* that module -- and within it
that definition -- you need to structure your module correctly and put
it in the right place.  With the default module path, the structure
should look like this:

(puppet base dir)/
 L manifests/
 L nodes.pp
 L site.pp
 L modules/
 L lvm/
 L manifests/
 L init.pp (may be empty)
 L volume.pp (contains lvm::volume)


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: pass values to puppet-lvm

2012-02-03 Thread Luke
Hi John,

I did exactly what you said and got the same result:

debug: Creating default schedules
debug: Loaded state in 0.00 seconds
debug: /Stage[main]//Node[luketest.mgmt.mydomain.local]/
Lvm::Volume[setvolume]/Volume_group[myvg]/require: requires
Physical_volume[/dev/sdb]
debug: /Stage[main]//Node[luketest.mgmt.mydomain.local]/
Lvm::Volume[setvolume]/Logical_volume[mylv]/require: requires
Volume_group[myvg]
debug: /Stage[main]//Node[luketest.mgmt.mydomain.local]/
Lvm::Volume[setvolume]/Filesystem[/dev/myvg/mylv]/require: requires
Logical_volume[mylv]



On Feb 3, 10:58 am, jcbollinger  wrote:
> On Feb 3, 7:37 am, Luke  wrote:
>
> > Hi,
>
> > site.pp
>
> > manifests]$ cat site.pp
> > import "nodes"
>
> That import is appropriate.
>
> > import "modules"
>
> That one should not be needed.
>
> > 
>
> > manifests]$ cat modules.pp
> > import "lvm"
>
> That whole manifest should not be need.
>
> > 
>
> > cat nodes.pp
> > node 'luketest.mgmt.mydomain.local' {
>
> > lvm::volume {'setvolume':
> >          vg => 'myvg',
> >          pv => '/dev/sdb',
> >          fstype => 'ext3',
> >          name => 'mylv',
> >          size =>'8G',
> >          ensure => 'present',
> >          }
>
> > }
>
> That node definition is fine.
>
> The other part of the problem is likely your module structure and
> location.  The name of your defined type places it in module "lvm",
> but for Puppet to automatically *find* that module -- and within it
> that definition -- you need to structure your module correctly and put
> it in the right place.  With the default module path, the structure
> should look like this:
>
> (puppet base dir)/
>  L manifests/
>      L nodes.pp
>      L site.pp
>  L modules/
>      L lvm/
>          L manifests/
>              L init.pp (may be empty)
>              L volume.pp (contains lvm::volume)
>
> 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: pass values to puppet-lvm

2012-02-03 Thread Felix Frank
On 02/03/2012 03:45 PM, Luke wrote:
> root@luketest ~]# pvdisplay

Ugh, why do people insist on using this instead of pvs?

Anyway, you're right, the LV isn't there. Neither is the PV.

Are the PV and VG defined somewhere in your manifest? They should be. I
have no experience with this module, but maybe it silently ignores LVs
which it cannot create due to the missing VG.

-- 
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] Interesting permissions issue with nagios_* providers

2012-02-03 Thread Peter Berghold
Hi folks,

I noticed an interesting problem with the nagios_* providers especially in
Debian.  Besides writing to the wrong file (I fixed that issue) I've
noticed there is a umask issue where the config files end up being owned by
root with perms 0640.  This causes nagios to spit milk out of its nose
because it cannot read the configuration files.

I came up with a kludgey solution to the problem but I'm not happy with
it.  Anybody out there run into this and fixed it? I'm curious to see what
others came up with to fix this.

For those that are curious as to how I fixed the "wrong file" problem I
came up a solution where in my site.pp file I have the following:

if ( $operatingsystem == "Debian ) {
 Nagios_host { target => "/etc/nagios3/conf.d/puppet_hosts.pp" }
--- etc ---
}



-- 
Peter L. Berghold
Owner, Shark River Technical Solutions LLC

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



[Puppet Users] Re: Interesting permissions issue with nagios_* providers

2012-02-03 Thread windowsrefund
The trick is to export a file resource which matches the target
parameter of the Nagios_ type. The exported file resource should
require the Nagios_ resource so everything works upon collection. I'm
actually writing an article for Linux Journal on this exact issue :)

Adam

-- 
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] Interesting permissions issue with nagios_* providers

2012-02-03 Thread Gabriel Filion
On 12-02-03 10:54 AM, Peter Berghold wrote:
> I noticed an interesting problem with the nagios_* providers especially
> in Debian.  Besides writing to the wrong file (I fixed that issue) I've
> noticed there is a umask issue where the config files end up being owned
> by root with perms 0640.  This causes nagios to spit milk out of its
> nose because it cannot read the configuration files.
> 
> I came up with a kludgey solution to the problem but I'm not happy with
> it.  Anybody out there run into this and fixed it? I'm curious to see
> what others came up with to fix this.
> 
> For those that are curious as to how I fixed the "wrong file" problem I
> came up a solution where in my site.pp file I have the following:
> 
> if ( $operatingsystem == "Debian ) {
>  Nagios_host { target => "/etc/nagios3/conf.d/puppet_hosts.pp" }
> --- etc ---
> }

yes, you do need to set the target on nagios resources. In order to let
different nagios servers be installed with different OSes (weird idea, I
know, but hey! anything's possible ;) ), you could set that target on
resource collection:

  Nagios_command <||> {
target =>
"${nagios::defaults::vars::int_nagios_cfgdir}/conf.d/nagios_command.cfg",
# ...
  }

also, for the permissions, you could use a file resource with the same
path to set permissions (but not the contents).

check out this module for examples (have a look at manifests/base.pp):

https://labs.riseup.net/code/projects/shared-nagios

-- 
Gabriel Filion

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-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: Interesting permissions issue with nagios_* providers

2012-02-03 Thread windowsrefund
The trick is to export a file resource which matches the target
parameter of the Nagios_ type. The exported file resource should
require the Nagios_ resource so everything works upon collection. I'm
actually writing an article for Linux Journal on this exact issue :)

Adam

-- 
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] neatest way to determine a major version of centos/linux?

2012-02-03 Thread Dick Davies
Just started a rollout of centos 6.x across our Puppet deployment
(100-odd servers).

what fact would people suggest I use to distinguish 5.x from 6.x
(quite a lot of subsystems are different between major releases)?

lsb* facts don't seem to be present on centos 6 - is this an EPEL bug,
or have they
just been removed in Facter?

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 Users] neatest way to determine a major version of centos/linux?

2012-02-03 Thread Christopher Wood
This sort of thing works satisfactorily if cumbersomely for me:

case $::operatingsystemrelease {
/^5/: {

}
/^6/: {

}
}

On Fri, Feb 03, 2012 at 04:57:34PM +, Dick Davies wrote:
> Just started a rollout of centos 6.x across our Puppet deployment
> (100-odd servers).
> 
> what fact would people suggest I use to distinguish 5.x from 6.x
> (quite a lot of subsystems are different between major releases)?
> 
> lsb* facts don't seem to be present on centos 6 - is this an EPEL bug,
> or have they
> just been removed in Facter?
> 
> 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.



Re: [Puppet Users] neatest way to determine a major version of centos/linux?

2012-02-03 Thread Jeff McCune
On Fri, Feb 3, 2012 at 8:57 AM, Dick Davies wrote:

> Just started a rollout of centos 6.x across our Puppet deployment
> (100-odd servers).
>
> what fact would people suggest I use to distinguish 5.x from 6.x
> (quite a lot of subsystems are different between major releases)?
>

They'll be there if you have the redhat-lsb package installed.  I'd use the
lsbmajdistrelease fact.

root@pe-centos6:~# facter | grep lsb
lsbdistcodename => Final
lsbdistdescription => CentOS release 6.1 (Final)
lsbdistid => CentOS
lsbdistrelease => 6.1
*lsbmajdistrelease* => 6
lsbrelease =>
:core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarch
root@pe-centos6:~# rpm -qilp `which lsb_release`
error: /usr/bin/lsb_release: not an rpm package (or package manifest)


root@pe-centos6:~# rpm -qif `which lsb_release`
Name: redhat-lsb   Relocations: (not relocatable)
Version : 4.0   Vendor: CentOS
Release : 3.el6.centos  Build Date: Sun 20 Nov 2011
01:44:34 PM PST
Install Date: Thu 15 Dec 2011 01:22:18 PM PST  Build Host:
c6b5.bsys.dev.centos.org
Group   : System Environment/Base   Source RPM:
redhat-lsb-4.0-3.el6.centos.src.rpm
Size: 22558License: GPL
Signature   : RSA/SHA1, Mon 21 Nov 2011 04:54:30 PM PST, Key ID
0946fca2c105b9de
Packager: CentOS BuildSystem 
URL : http://www.linuxfoundation.org/collaborate/workgroups/lsb
Summary : LSB base libraries support for CentOS
Description :
The Linux Standard Base (LSB) is an attempt to develop a set of
standards that will increase compatibility among Linux distributions.
The redhat-lsb package provides utilities needed for LSB Compliant
Applications.  It also contains requirements that will ensure that all
components required by the LSB that are provided by CentOS are
installed on the system.

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



[Puppet Users] Re: neatest way to determine a major version of centos/linux?

2012-02-03 Thread Ramin K
You'll need to add the redhat-lsb package to your kickstart system and/
or just install it on your current systems. That's the package facter
uses to determine the lsb facts.

On Feb 3, 8:57 am, Dick Davies  wrote:
> Just started a rollout of centos 6.x across our Puppet deployment
> (100-odd servers).
>
> what fact would people suggest I use to distinguish 5.x from 6.x
> (quite a lot of subsystems are different between major releases)?
>
> lsb* facts don't seem to be present on centos 6 - is this an EPEL bug,
> or have they
> just been removed in Facter?
>
> 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.



[Puppet Users] Re: pass values to puppet-lvm

2012-02-03 Thread Luke
The PV and VG are not defined anywhere else that I can see.

On Feb 3, 11:40 am, Felix Frank 
wrote:
> On 02/03/2012 03:45 PM, Luke wrote:
>
> > root@luketest ~]# pvdisplay
>
> Ugh, why do people insist on using this instead of pvs?
>
> Anyway, you're right, the LV isn't there. Neither is the PV.
>
> Are the PV and VG defined somewhere in your manifest? They should be. I
> have no experience with this module, but maybe it silently ignores LVs
> which it cannot create due to the missing VG.

-- 
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: pass values to puppet-lvm

2012-02-03 Thread Luke
Just to have it out in the open:

Here is the manifest from the lvm module

define lvm::volume($vg, $pv, $fstype = undef, $size = undef, $ensure)
{
 case $ensure {
#
# Clean up the whole chain.
#
cleaned: {
  # This may only need to exist once
  if ! defined(Physical_volume[$pv]) {
physical_volume { $pv: ensure => present }
  }
  # This may only need to exist once
  if ! defined(Volume_group[$vg]) {
volume_group { $vg:
  ensure   => present,
  physical_volumes => $pv,
  before   => Physical_volume[$pv]
}

logical_volume { $name:
  ensure   => present,
  volume_group => $vg,
  size => $size,
  before   => Volume_group[$vg]
}
  }
}
#
# Just clean up the logical volume
#
absent: {
  logical_volume { $name:
ensure   => absent,
volume_group => $vg,
size => $size
  }
}
#
# Create the whole chain.
#
present: {
  # This may only need to exist once
  if ! defined(Physical_volume[$pv]) {
physical_volume { $pv: ensure => present }
  }

  # This may only need to exist once
  if ! defined(Volume_group[$vg]) {
volume_group { $vg:
  ensure   => present,
  physical_volumes => $pv,
  require  => Physical_volume[$pv]
}
  }

  logical_volume { $name:
ensure   => present,
volume_group => $vg,
size => $size,
require  => Volume_group[$vg]
  }

  if $fstype != undef {
filesystem { "/dev/${vg}/${name}":
  ensure  => present,
  fs_type => $fstype,
  require => Logical_volume[$name]
}
  }

}
default: {
  fail ( 'lvm::volume: ensure parameter can only be set to
cleaned, absent or present' )
}
  }
}

On Feb 3, 1:30 pm, Luke  wrote:
> The PV and VG are not defined anywhere else that I can see.
>
> On Feb 3, 11:40 am, Felix Frank 
> wrote:
>
>
>
>
>
>
>
> > On 02/03/2012 03:45 PM, Luke wrote:
>
> > > root@luketest ~]# pvdisplay
>
> > Ugh, why do people insist on using this instead of pvs?
>
> > Anyway, you're right, the LV isn't there. Neither is the PV.
>
> > Are the PV and VG defined somewhere in your manifest? They should be. I
> > have no experience with this module, but maybe it silently ignores LVs
> > which it cannot create due to the missing VG.

-- 
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: pass values to puppet-lvm

2012-02-03 Thread Felix Frank
On 02/03/2012 06:37 PM, Luke wrote:
>   if ! defined(Physical_volume[$pv]) {
> physical_volume { $pv: ensure => present }
>   }

Ah, dreadful ;-)

But there goes that theory - the PV and VG are implicitly created, so
the module really *should* do the right thing.

So the issue is probably with the provider(?)
I'm stumped.

Felix

-- 
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: pass values to puppet-lvm

2012-02-03 Thread Luke
Oh well. Maybe this lvm module doesn't like centos or something :(

Thanks for all your help Felix. If anyone else has any ideas or better
lvm type modules please drop a line.

On Feb 3, 1:42 pm, Felix Frank 
wrote:
> On 02/03/2012 06:37 PM, Luke wrote:
>
> >       if ! defined(Physical_volume[$pv]) {
> >         physical_volume { $pv: ensure => present }
> >       }
>
> Ah, dreadful ;-)
>
> But there goes that theory - the PV and VG are implicitly created, so
> the module really *should* do the right thing.
>
> So the issue is probably with the provider(?)
> I'm stumped.
>
> Felix

-- 
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: Automatically Files and Directory Sync

2012-02-03 Thread Cesarbr
Hi Nan,

Tks much for your help, does it mean that every time a need to create
a custom resource my ruby file must be present at /var/opt/lib/pe-
puppet/lib/puppet/type and /opt/puppet/share/puppet/modules/stdlib/lib/
puppet/type/ilegra.rb?

I did a test, when I keep my file at /opt/puppet/share/puppet/modules/
stdlib/lib/puppet/type/ilegra.rb the following command doesn't work
(puppet describe -s MYRESOURCE) , however when I keep a copy on both
location the command works and the file is not removed.

you see what I mean, my understanding based on system's behavior is
that to have a custom resource I need a copy of ruby file at the
libdir directory, however to prevent puppet to remove my ruby file I
need a copy at modulepath directory.

Is that the expected behavior ?

best regards.

Cesar

On Feb 1, 9:18 pm, Nan Liu  wrote:
> On Tue, Jan 31, 2012 at 2:07 PM, Cesarbr
>
>  wrote:
> > I just installed "learn puppet" VM in my desktop, I 'm very interested
> > in know more about how often and how Puppet knows when a file or
> >directoryis changed?  I changed an example file located at /var/opt/
> > lib/pe-puppet/lib/puppet/type/file_line.rb for testing purposes and
> > all of my changes were rolled back in few minutes.  Is there a way to
> > figure out whichfilesin file system are managed through this
> > policy?
>
> This getting replaced during pluginsync. You don't want to modify
> anything in the pluginsyncdirectory/var/opt/lib/pe-puppet/lib since
> it gets synchronized on each puppet agent run.
>
> The authoritative file is located in pe module path:
> /opt/puppet/share/puppet/modules/stdlib/lib/..
>
> 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] Exported resources and inventory service?

2012-02-03 Thread George
I'd like to start using exported resources, so I see I need to turn on
stored configurations. I'm already running the inventory service, and
it looks like there is a certain degree of overlap between what the
inventory db is storing and what stored configs is storing - at least
as far as host facts goes.

Is there some plan to unify these two services? It seems wasteful to
store host facts in two places.

-- 
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] Exported resources and inventory service?

2012-02-03 Thread Daniel Pittman
On Fri, Feb 3, 2012 at 11:38, George  wrote:

> I'd like to start using exported resources, so I see I need to turn on
> stored configurations. I'm already running the inventory service, and
> it looks like there is a certain degree of overlap between what the
> inventory db is storing and what stored configs is storing - at least
> as far as host facts goes.
>
> Is there some plan to unify these two services? It seems wasteful to
> store host facts in two places.

We have plans, but nothing with a concrete release date yet.  It is,
as you observe, duplicating the data at the moment.  Hopefully in the
Telly timeframe we can have something better, but we don't have a
concrete date on the roadmap yet.

-- 
Daniel Pittman
⎋ Puppet Labs Developer – http://puppetlabs.com
♲ Made with 100 percent post-consumer electrons

-- 
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] pip and virtualenv

2012-02-03 Thread Daniel Pittman
On Fri, Feb 3, 2012 at 04:18, lfrodrigues  wrote:

> I would like to use pip to install some python modules. The problem is
> that I want to keep all my stuff isolated.
>
> I saw this https://projects.puppetlabs.com/issues/7286 about
> virtualenv support.
>
> Anyone knows at what stage that is? Any other solution for virtualenv
> and pip?

We don't have any virtualenv support, and we have recently rejected
similar changes to the yum provider to install to an alternate root.

My strong inclination is to think that, like the rvm/gems, and yum or
rpm / installroot options we don't have a good model for this yet.

Moving forward would require someone proposing a good change to the
model - the package type - that would cleanly map to the required
semantics of each of the various implementations of these things.

-- 
Daniel Pittman
⎋ Puppet Labs Developer – http://puppetlabs.com
♲ Made with 100 percent post-consumer electrons

-- 
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] ipv6 address facts

2012-02-03 Thread Daniel Pittman
On Fri, Feb 3, 2012 at 04:05, Jure Pečar  wrote:

> Consider the following interfaces and addresses:
>
> # ip a l
> 1: lo:  mtu 16436 qdisc noqueue state UNKNOWN
>    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>    inet 127.0.0.1/8 scope host lo
>    inet6 ::1/128 scope host
>       valid_lft forever preferred_lft forever
> 2: eth0:  mtu 1500 qdisc pfifo_fast state 
> UNKNOWN qlen 1000
>    link/ether 00:50:56:b3:6a:5d brd ff:ff:ff:ff:ff:ff
>    inet 192.168.140.1/17 brd 192.168.255.255 scope global eth0
>    inet6 fe80::250:56ff:feb3:6a5d/64 scope link
>       valid_lft forever preferred_lft forever
> 3: eth1:  mtu 1500 qdisc pfifo_fast state UP 
> qlen 1000
>    link/ether 00:50:56:b3:6a:5e brd ff:ff:ff:ff:ff:ff
>    inet6 fd00:1001:0:50:56:b3:6a:5e/64 scope global
>       valid_lft forever preferred_lft forever
>    inet6 fe80::250:56ff:feb3:6a5e/64 scope link
>       valid_lft forever preferred_lft forever
>
> Now see what facter produces:
>
> # facter | grep addr
> ipaddress => 192.168.140.1
> ipaddress6 => fd00:1001:0:50:56:b3:6a:5e
> ipaddress_eth0 => 192.168.140.1
> ipaddress_lo => 127.0.0.1
> macaddress => 00:50:56:B3:6A:5D
> macaddress_eth0 => 00:50:56:B3:6A:5D
> macaddress_eth1 => 00:50:56:B3:6A:5E
>
> I would expect to see a global ipaddress6 being specified for each v6 enabled 
> interface (ipaddress6_eth1 in my case), but this is not the case.
>
> facter-1.6.4-1.el6.noarch on rhel6.
>
> I'm only few days into ruby, but as I read the code, it should work as I 
> expect.
>
> Any ideas why I see what I see?

Off-hand, no.  Can you file a bug report, including these details, at
http://projects.puppetlabs.com/projects/facter/issues

That way we won't lose track of this, and can figure out what is going wrong.

Thanks

-- 
Daniel Pittman
⎋ Puppet Labs Developer – http://puppetlabs.com
♲ Made with 100 percent post-consumer electrons

-- 
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] Creating group of nodes with different class

2012-02-03 Thread mukulm


Hi,

How can I create two nodes with differnert hostnames i.e, nodeSD.pp &
nodesCTO.pp & import that nodes
in site.pp with different classes (class1 & class2) such as,
classes1 with nodesSD.pp
classes2 with nodesCTO.pp

Both the classes has different configuration & need to be run with
different nodes

Can anyone please assist me regarding the above senario.

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.



[Puppet Users] Read in Variables

2012-02-03 Thread Ftzgrld
I'm new to puppet and would like to read variables into my manifest
from the puppet dashboard.

I'm would like to create solaris zones from the dashboard. My scenario
is:

>From dashboard add node with parameter set for ip.
 I know that the  /var/log/pe-puppet-dashboard/production.log has the
information from the dashboard.

I want to be able to pull the node and ipaddress into my install
manifest

I already have scripts that install my zones already and will leverage
them to create the zones.

Here is my install manifest -

$HOSTNAME=''#Zone name from Dashboard
$IPADDRESS=''#IP Address from Dashboard

class install {
  file { 'zonecfg':
ensure => present,
owner => root,
group => root,
mode => 0755,
source => '/usr/nbox/bin/zonecfg.sh',
   }

  file { 's10':
ensure => present,
owner => 'nobody4',
group => 'root',
mode => '0755',
source => '/usr/nbox/install/s10-puppet.sh'
   }
  file { 'login':
 ensure => present,
 source => '/usr/nbox/install/flatfileofglobalnodes'
   }

#Login to Global Zone
exec {'login':
command =>'/bin/ssh pe-puppet@$(flatfileofglobalnodes)',
required => File['login']
   }

#Run Zone Create Script With Needed Parameters
exec {'zonecfg':
command =>'/usr/nbox/bin/zonecfg.sh $HOSTNAME $IPADDRESS',
require => File['login']
   }

#Login To Created Zone
exec { 'zlogin':
command => '/usr/sbin/zlogin $HOSTNAME',
require => File['zonecfg']
   }

#Mount Sysadmin Directory
exec { 'mount':
command => '/usr/sbin/mount -F nfs 10.128.10.93:/vol/tmp /usr/
nbox',
require => Exec['zlogin']
   }

#Run Post Script To Set Environments and Install Puppet Agent
exec { 's10':
command => '/usr/nbox/install/s10-puppet.sh'
require => Exec['mount']
   }

#Reboot Created Zone
exec { 'reboot':
command => '/usr/sbin/zoneadm -z $HOSTNAME reboot
required => Exec['s10']
   }

}

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.



[Puppet Users] package issue for provider sun

2012-02-03 Thread david boldt
Under Solaris: when a package that I wish to insure the presence of
does not exist, apply fails with the following message:

err: /Stage[main]/Lsof::Lsof::Solaris/Package[SMClsof]: Could not
evaluate: Unable to get information about package SMClsof because of:
["ERROR: information for \"SMClsof\" was not found\n"]

The following one line change appears to fix that problem for 2.7.10.

--- /usr/opt/lib/ruby/gems/1.9.1/gems/puppet-2.7.10/lib/puppet/
provider/package/sun.rb~ Wed Feb  1 19:16:12 2012
+++ /usr/opt/lib/ruby/gems/1.9.1/gems/puppet-2.7.10/lib/puppet/
provider/package/sun.rb  Fri Feb  3 15:31:12 2012
@@ -106,7 +106,7 @@
   }
   return hash
 rescue Puppet::ExecutionFailure => detail
-  return {:ensure => :absent} if detail.message =~ /information
for "#{Regexp.escape(@resource[:name])}" was not found/
+  return {:ensure => :absent} if detail.message =~ /information
for .* was not found/
   puts detail.backtrace if Puppet[:trace]
   raise Puppet::Error, "Unable to get information about package
#{@resource[:name]} because of: #{detail}"
 end


--david boldt

PS  This is my first posting on Puppet, so please pardon any customs
infractions

-- 
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: Failed to Allocate Memory When Connected to LDAP

2012-02-03 Thread James Lee
On 01/20/2012 12:51 PM, James Lee wrote:
> I've narrowed down what is triggering this problem, but I still do not
> know how to fix it.
...
>> acad ~ # puppet agent --test --environment=jameslee --no-report  --noop
>> /opt/csw/lib/ruby/gems/1.8/gems/puppet-2.6.12/lib/puppet/provider/package/apt.rb:1:in
>>  `[]=': failed to allocate memory (NoMemoryError)
> 
> Just trying to set the environmental variable crashed Puppet.
...
> I don't understand how setting ENV variables is fine without LDAP and
> crashes Puppet/Ruby with LDAP.  At this point I suspect I am looking at
> a weird consequence of another problem, but I have no idea.  I've been
> able to replicate this problem with Puppet 2.6.8, 2.6.12 running on Ruby
> 1.8.4 (from Sun Freeware) and 1.8.7 (from OpenCSW).

Just to close the loop on this issue, I finally managed to get a good
core dump from the crash which told me where the problem was happening:

>  --- called from signal handler with signal 11 (SIGSEGV) ---
>  fecd6129 realfree (a175944) + 43
>  fecd6747 cleanfree (0) + 44
>  fecd5c63 _malloc_unlocked (20, fef55638, 1d, fef42f9c, 7fc0fb8, feeab4ff) + 
> ad
>  fecd5b8c malloc   (1d, 8, 0, feeab4aa) + 34
>  feeab4ff ruby_xmalloc (1d, 8, 0, feeb0e7a) + 63
>  feeb10d3 ruby_setenv (988b5b0, a151998) + 267

Something about the way the 'ruby_setenv' was allocating memory was
failing.  Some googling led me to this bug report:

http://bugs.ruby-lang.org/issues/2353

which included a patch that solved my problem.  I (manually) applied
Nobuyoshi Nakada's fix to the very old version of Ruby I'm running and
Puppet no longer crashes!

With this behind me I can plan an upgrade to Puppet 2.7 and Ruby 1.9,
which includes this fix.

Thanks!

James

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