Re: [Puppet Users] puppetmanaged.org ?

2011-11-18 Thread Jeroen van Meeuwen
Dan White wrote:
 Anyone from puppetmanaged.org listening to this list ?
 

I'm right here. My Drupal installation hasn't received the amount of love it 
deserved lately, indeed. Not sure what happened to the mailing list though, 
I'll have a look at those later.

-- 

Kind regards,

-- kanarip

-- 
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: Group membership dublicated resources

2011-11-18 Thread Stephan
Which OS are you using? On mine the apache user gets created as soon
as I install apache.

So basically I have a class (not a define) named apache::install which
installs the packet and rolls out a very basic httpd.conf. If there is
no apache user created automatically on your system this would also be
the place to create an apache user, outside of the define. All vhosts
will run with the apache user anyways. Afaik there's no way anyways to
let one vhost be run by apachev1, and another one by apachev2.

On Nov 16, 6:16 pm, Vasil Mikhalenya bazi...@gmail.com wrote:
 Hi all,

 I have

 define vhost($vhost,$db){
 
 user { apache : name = apache, groups = $title , require =
 User[$title],}...

 }

 and in nodes.pp

 node 'myhost' {
         wg::web::vhost { foo: vhost = vhost1, db = db1 }
         wg::web::vhost { bar: vhost = vhost1, db = db2 }

 }

 In case of 2 vhosts per node user apache in define is duplicated.

 How can I get apache to become a member of all users groups ( name
 passed via $title )

 Thank you

 --
 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] ENC-LDAP - or facts from local file on server?

2011-11-18 Thread Pieter Baele
Hi,

For every server, I would like to have add some extra data - facts as:
indate (date in service)
asset,
location, and a few others

First I was thinking about adding custom facts, that are read from a
file on the server (ks)
The benefit: all data is available on the host.

With all facts I can then populate some fields in the monitoring
system, our custom asset management system,
and have an export to excel sheets (sigh...)

But maybe this is the wrong approach and I have to put this data in
LDAP? Any idea?

Sincerely,
PieterB

-- 
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: Duplicate definition

2011-11-18 Thread Peter Horvath
As i figured out the source of my problem was that i used the defined
resource type twice in a manifest.
I didn't know that a defined resource type cannot be used twice in the same
manifest as you can use multiple times a built in one.

hmmm

On 17 November 2011 22:14, jcbollinger john.bollin...@stjude.org wrote:



 On Nov 17, 1:50 pm, Peter Horvath peter.horvat...@gmail.com wrote:
  i know all of this and i did grep before i wrote this email :)
  There is no other file[conf]


 In that case, the one declaration must be processed twice.  It must
 appear inside a defined type that you instantiate more than once.

 If both definition instances are supposed to declare the same file,
 then move the declaration outside the definition, make it virtual, and
 have the definition 'realize' it instead of declaring it.  If the
 definitions are each supposed to delare a different file then you have
 a bug in your manifest.  With respect to the latter possibility, I
 observe that the resource title is not an absolute path.  That could
 be a sign that a variable in the Files' titles was unexpectedly
 undefined, but even if not, it's unlikely to be what you want.


 John

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



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



[Puppet Users] vcstype not checking out specified revision

2011-11-18 Thread Martin Willemsma
Hi,

I want to use Vcsrepo type to specify what version gets checked out
under a directory.  I found this via:
https://github.com/puppetlabs/puppet-vcsrepo

I used the provide example from README.GIT.markdown in my node definition

vcsrepo { /tmp/hiera:
ensure = present,
provider = git,
source = 'git://host/puppet-framework/hiera-msp-sync.git',
revision = 4875fecc5f796f86fbc67cba11d80808d4cb6976
}

Then I run puppet agent and according to the logging on the
puppetmaster it should checkout my specific rev under /tmp/hiera

debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git
fetch --tags origin'
debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git
rev-parse HEAD'
debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git tag -l'
debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git
rev-parse 4875fecc5f796f86fbc67cba11d80808d4cb6976'
debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git branch -a'
debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git fetch origin'
debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git
fetch --tags origin'
debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git
rev-parse origin/HEAD'
debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git branch -a'
debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git branch -a'
debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git
fetch --tags origin'
debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git
rev-parse HEAD'
debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git tag -l'
debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git
rev-parse 4875fecc5f796f86fbc67cba11d80808d4cb6976'
debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git branch -a'
debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git tag -l'
debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git branch -a'
debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git branch -a'
debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git
submodule init'
debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git
submodule update'
debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git
submodule foreach git submodule init'
debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git
submodule foreach git submodule update'
notice: /Stage[main]//Node[host]/Vcsrepo[/tmp/hiera]/revision:
revision changed '7eebd18175200b671360bd2a17967813faf39ae2' to
'4875fecc5f796f86fbc67cba11d80808d4cb6976'


But when I check the path and do a 'git log -1' I do not get the
expected outcome. I get master, but I want last -1

ON the host:

host repotest # git log --pretty=format:%H

7eebd18175200b671360bd2a17967813faf39ae2  -- This is the commit I get
4875fecc5f796f86fbc67cba11d80808d4cb6976 -- This is the commit I want
a810eed9961aa9df0dd797378eb281a98e37601d
7e96a12a14806f9624fee08217adafbcc12263c4
2593dabfe31b11e7050f0a11e6206300b9dc5551
2983ac5827fba1e17be455ca22b93293f55ee100
511906c9b9e33470c99c000e4daae2938e0990f7

Any help on this one will be really appreciated.

---
Regards,

Martin Willemsma

-- 
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: vcstype not checking out specified revision

2011-11-18 Thread Martin Willemsma
Sorry did not specify my versions:

Puppet 2.7.6
puppet-vcsrepo # git pull
Already up-to-date.

Description:Ubuntu 10.04.2 LTS
git version 1.7.0.4


2011/11/18 Martin Willemsma mwillem...@gmail.com:
 Hi,

 I want to use Vcsrepo type to specify what version gets checked out
 under a directory.  I found this via:
 https://github.com/puppetlabs/puppet-vcsrepo

 I used the provide example from README.GIT.markdown in my node definition

 vcsrepo { /tmp/hiera:
    ensure = present,
    provider = git,
    source = 'git://host/puppet-framework/hiera-msp-sync.git',
    revision = 4875fecc5f796f86fbc67cba11d80808d4cb6976
 }

 Then I run puppet agent and according to the logging on the
 puppetmaster it should checkout my specific rev under /tmp/hiera

 debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git
 fetch --tags origin'
 debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git
 rev-parse HEAD'
 debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git tag -l'
 debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git
 rev-parse 4875fecc5f796f86fbc67cba11d80808d4cb6976'
 debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git branch -a'
 debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git fetch 
 origin'
 debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git
 fetch --tags origin'
 debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git
 rev-parse origin/HEAD'
 debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git branch -a'
 debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git branch -a'
 debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git
 fetch --tags origin'
 debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git
 rev-parse HEAD'
 debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git tag -l'
 debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git
 rev-parse 4875fecc5f796f86fbc67cba11d80808d4cb6976'
 debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git branch -a'
 debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git tag -l'
 debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git branch -a'
 debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git branch -a'
 debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git
 submodule init'
 debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git
 submodule update'
 debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git
 submodule foreach git submodule init'
 debug: Puppet::Type::Vcsrepo::ProviderGit: Executing '/usr/bin/git
 submodule foreach git submodule update'
 notice: /Stage[main]//Node[host]/Vcsrepo[/tmp/hiera]/revision:
 revision changed '7eebd18175200b671360bd2a17967813faf39ae2' to
 '4875fecc5f796f86fbc67cba11d80808d4cb6976'


 But when I check the path and do a 'git log -1' I do not get the
 expected outcome. I get master, but I want last -1

 ON the host:

 host repotest # git log --pretty=format:%H

 7eebd18175200b671360bd2a17967813faf39ae2  -- This is the commit I get
 4875fecc5f796f86fbc67cba11d80808d4cb6976 -- This is the commit I want
 a810eed9961aa9df0dd797378eb281a98e37601d
 7e96a12a14806f9624fee08217adafbcc12263c4
 2593dabfe31b11e7050f0a11e6206300b9dc5551
 2983ac5827fba1e17be455ca22b93293f55ee100
 511906c9b9e33470c99c000e4daae2938e0990f7

 Any help on this one will be really appreciated.

 ---
 Regards,

 Martin Willemsma




-- 
---
Met vriendelijke groet,

Martin Willemsma

-- 
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 with active/passive clusters

2011-11-18 Thread Davide Ferrari
Hi

I've been banging my head against this problem and it seems that I
cannot find a clean, elegant and working solution.

Scenario: heartbeat v1 (well, actually v2 in compatibility mode) cluster
of 2 nodes with a shared disk and a virtual IP.
I need to install a service - MySQL - via Puppet that will have it's
data on the shared disk.

I've found, at least, these problems:

1) on first install, initial mysql data on the passive node will be
local only. 
2) on next run, Puppet will have no idea of the cluster status, so if I
define new mysql users, it will try to apply it on the passive node
(where no mysql is running), failing.
3) heartbeat will fail to start if the resource mysql is defined, but
Mysql should be installed AFTER configuring heartbeat (active host
should mount the shared disk). So if while creating the role for the
first time I can do things step by step but once finished, if I need to
reinstall from scratch, it should work

Ok, maybe the first 2 points are not a big deal [1] anyway but I wonder
if anyone had found a better solution than just living with errors on
the passive node (I have a 0 puppet errors on puppetrun policy), but the
third point is a bit harder for me.

TIA

[1] I thought about a custom facter detecting if it's an
active/passivehost  or no HB cluster at all, but I'd like some other
opinions.


-- 
Davide Ferrari
Senior System Administrator
Atrapalo S.L.

-- 
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: Variables inside node definition

2011-11-18 Thread jcbollinger


On Nov 17, 3:16 pm, Gonzalo Servat gser...@gmail.com wrote:
 Hi All,

 How would I go about achieving the following?

 node basenode {
      include motd

 }

 node www inherits basenode {
     $purpose = web server

 }

 In the motd module, I have a template that formats a standard /etc/motd
 file and I want to make use of the $purpose variable. When I access
 scope.lookupvar('::purpose'), I get undefined.


I'm sure you do.  Class['motd'] is evaluated in the scope of node
'basenode', which does not define a variable of that name.  Moreover,
node variables are not in top scope and do not have qualified names,
so your particular use of scope.lookupvar() would not work anyway.

You have a great use case here for external data: instead of using a
node variable to communicate the machine's purpose, you could instead
have class motd look it up via extlookup() or hiera.

Alternatively, if you were using an ENC then it would be easy to set
$purpose as a global variable, in which case your current template
would be right.

There are also approaches involving class inheritance in addition to
node inheritance.

If you're considering node basenode abstract, meaning that every
client must match a subnode rather than basenode itself, then you
could parameterize class motd and have each subnode pass the purpose
variable that way (basenode would no longer declare motd).  I'm not
fond of class parameterization, but it could work.


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] Collecting resources from exporting node

2011-11-18 Thread Martijn Grendelman
No one? Is my question not clear (TL;DR, perhaps?), or doesn't anyone have
an answer?

Best regards,
Martijn.


On 17-11-11 17:18, Martijn Grendelman wrote:
 Hi,
 
 A small addition at the bottom...
 
 I was looking at the basic example for exporting and collecting resources
 at http://docs.puppetlabs.com/guides/exported_resources.html :

 class ssh {
 @@sshkey { $hostname: type = dsa, key = $sshdsakey }
 Sshkey | |
 }

 I quote:

 The above code would have every host export its SSH public key, and then
 collect every host’s key and install it in the ssh_known_hosts file; this
 would include the host doing the exporting.

 That last statement seems untrue in my experiments.

 I have the following manifest:

   # Export a firewall rule, requesting access to DIR/MRC replication ports
   @@firewall::rule {xtreemfs-repl-${hostname}:
   rule = [
   -A firewall-user-app -p tcp -s $primary_ipaddress --dport 35678
 -j ACCEPT,
   -A firewall-user-app -p tcp -s $primary_ipaddress --dport 35676
 -j ACCEPT,
   ],
   }

   # Collect all firewall rules from DIR/MRC servers
   Firewall::Rule | tag == 'xtreemfs::dir_mrc' |

 This class is included on two servers, let's call them serverA and serverB.

 On serverA, I do get Firewall::Rule[xtreemfs-repl-serverB], but not
 Firewall::Rule[xtreemfs-repl-serverA], and on serverB, it's the other way
 around.
 
 When adding the class to a third server, all servers get the
 Firewall::Rule from the two others, but never from itself.
 
 So exporting works (confirmed by looking at the database). So does
 collecting, only not from the local node. What am I doing wrong?
 
 Most curious...
 
 Best regards,
 Martijn Grendelman
 

-- 
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: Duplicate definition

2011-11-18 Thread Peter Horvath
Seems i dont understand how get over this.
I have this defined resource type

vhost.pp

define vhost ($docroot = /var/www, $servername = ${hostname}.${domain},
$serveralias = www.${hostname}.${domain}, $inorout = 1) {
file{ 'conf':
path=
/etc/apache2/sites-available/${servername},
ensure  = present,
content =
template('/etc/puppet/modules/apache2/templates/vhost.erb'),
}

file{ 'link':
path=
/etc/apache2/sites-enabled/${servername},
ensure  = link,
target  =
/etc/apache2/sites-available/${servername},
require = File['conf'],
}

file{ ${docroot}:
ensure  = directory,
}

file{ ${docroot}/${servername}:
ensure  = directory,
require = File[${docroot}],
}

file{ ${docroot}/${servername}/html/:
ensure  = directory,
require = File[${docroot}/${servername}],
}

file{ 'defrem':
path= '/etc/apache2/sites-enabled/000-default',
ensure  = absent,
}

file{ 'index':
path=
${docroot}/${servername}/html/index.html,
ensure  = present,
content = Welcome to hell of ${servername},
}

service{ 'apache2':
ensure  = running,
restart = 'service apache2 reload',
require = [ File['conf'], File['link'],
File[${docroot}/${servername}/html/] ],
subscribe   = [ File['conf'], File['defrem'] ],
}
}

and this is my node config

node eurwebtest02 {
include apache2
include apache2::mods
include apache2::pringo
import apache2/vhost.pp

vhost { 'local':
}

vhost { 'test':
servername  = test.${domain},
serveralias = www.test.${domain},
inorout = '0',
}
}


I tried to virtualize vhost in vhost.pp with @
and realize them in the node config, but seems i cant get a working
solution to use vhost resource type more than 1.

Can you point me to the right direction? How can i create 100 vhost with
that defined class or something like this

On 18 November 2011 11:19, Peter Horvath peter.horvat...@gmail.com wrote:

 As i figured out the source of my problem was that i used the defined
 resource type twice in a manifest.
 I didn't know that a defined resource type cannot be used twice in the
 same manifest as you can use multiple times a built in one.

 hmmm


 On 17 November 2011 22:14, jcbollinger john.bollin...@stjude.org wrote:



 On Nov 17, 1:50 pm, Peter Horvath peter.horvat...@gmail.com wrote:
  i know all of this and i did grep before i wrote this email :)
  There is no other file[conf]


 In that case, the one declaration must be processed twice.  It must
 appear inside a defined type that you instantiate more than once.

 If both definition instances are supposed to declare the same file,
 then move the declaration outside the definition, make it virtual, and
 have the definition 'realize' it instead of declaring it.  If the
 definitions are each supposed to delare a different file then you have
 a bug in your manifest.  With respect to the latter possibility, I
 observe that the resource title is not an absolute path.  That could
 be a sign that a variable in the Files' titles was unexpectedly
 undefined, but even if not, it's unlikely to be what you want.


 John

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




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



Re: [Puppet Users] Re: define-type resources default parameters not available under scope.catalog.resources

2011-11-18 Thread Theo Cabrerizo Diem
As suggested, I've looked at the concat module, which I've made comments at
the end - just to maintain the same flow of information as on previous
conversations.

On 16 November 2011 23:13, jcbollinger john.bollin...@stjude.org wrote:



 On Nov 16, 9:16 am, Theo Cabrerizo Diem d...@carpediem.sh wrote: I
 know that using a native define-type (those written in ruby) I can access
  the parameters as intended


 Really?  I'm not a big templating guy, but if you declare, say

 service { 'frob': enable = true }

 then what does the following template output?

 %= scope.findresource(Service[frob])['hasstatus'] -%

 The built-in Service type defines a default value for its hasstatus
 property, but I predict (instead of testing ... dangerous :-) ) that
 the template will evaluate to a blank / empty string.  That would be
 exactly analogous to your case.


I've tested your suggestion and yes, the template return an empty string.
Spending a bit of more time into this matter (because accidentally I had it
working somehow - see below)

define foo ($myparam = Hello) {
  notice(inline_template(%= scope.findresource('Foo[${name}]')['myparam']
%))
}
node 'default' {
  foo { 'test1': }
  foo { 'test2': }
  foo { 'test3': myparam = World, }
}

This will produce:
notice: Scope(Foo[test1]): Hello
notice: Scope(Foo[test2]): Hello
notice: Scope(Foo[test3]): World

Which means my problem is accessing the scope where a given instance of a
resource is located. I've tried to browse through the obvious
scope.findresource('Foo[test1]').scope but that did not help. Is there a
way to access such a thing ?

I'm not that much of a ruby expert, but I wonder how full-qualified
variables are resolved. If someone could point it out or care to explain I
would be grateful.

I know the code above is useless as it is, but my point is to be able to
iterate through given resources of a node in a template, allowing great
flexibility inside a template, without the artifacts that concat module
generates (and its drawbacks).

I would imagine its goal would be similar to a exported resource, but
locally and immediately available (not only after the node reported its
exported resources)

I understand, but really you ought to go at it a different way.  A lot
 of people seem inclined to want in one part of their manifests to
 interrogate Puppet about what they themselves declared in a different
 part of their manifests.  With some notable exceptions, that is a
 Puppet anti-pattern.


I think understand the point, but I believe I'm trying in the end to
achieve what concat does without needing to deploy multiple files to the
node and run a exec in the end ?



 For the case at hand, I would recommed using the Concat module to
 build your httpd configuration from pieces.  Each webdir instance
 would declare an appropriate fragment, using the knowledge it already
 has about its own parameter values.  Alternatively, you could let each
 webdir manage its piece of the configuration as a separate file, and
 make httpd.conf (or whatever) interpolate them all.


I've used webdir and apache as a generic example since it would make
easier to understand what I'm trying to deal with. Not every configuration
file supports includes with filename expansion or dot d directories.

I've looked into concat module (thank you for suggesting it) and
implemented into my manifests to the point that it worked as intended, but
although I don't have a better solution available at the moment, I'm not
happy on having things such as :

concat::fragment { config_footer:
   target = $myconfigfile,
   content = /Virtualhost
   order = 99,
}

Since it gets hard to track when you start to have variations on the tree
structure of your config file, which IMHO, gets much easier to handle when
you use blocks in a single erb template.

Cheers,

Theo




 John

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



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



Re: [Puppet Users] Re: Duplicate definition

2011-11-18 Thread Martijn Grendelman
On 18-11-11 15:58, Peter Horvath wrote:
 Seems i dont understand how get over this.
 I have this defined resource type
 
 vhost.pp
 
 define vhost ($docroot = /var/www, $servername =
 ${hostname}.${domain}, $serveralias = www.${hostname}.${domain},
 $inorout = 1) {
 file{ 'conf':

So, if you use this define twice, you would end up with two File resources
named 'conf'...

 path=
 /etc/apache2/sites-available/${servername},
 ensure  = present,
 content =
 template('/etc/puppet/modules/apache2/templates/vhost.erb'),
 }
 
 file{ 'link':

So, if you use this define twice, you would end up with two File resources
named 'link'...

Etcetera. You have to make sure that your resource names are globally
unique. Why not just do:

  file { /etc/apache2/sites-enabled/${servername}: ... }

That would solve most of your problems, but keep on reading...


 path= /etc/apache2/sites-enabled/${servername},
 ensure  = link,
 target  =
 /etc/apache2/sites-available/${servername},
 require = File['conf'],
 }
 
 file{ ${docroot}:
 ensure  = directory,
 }

If you do this, you have to make sure your $docroot is different for each
vhost.

 
 file{ ${docroot}/${servername}:
 ensure  = directory,
 require = File[${docroot}],
 }
 
 file{ ${docroot}/${servername}/html/:
 ensure  = directory,
 require = File[${docroot}/${servername}],
 }
 
 file{ 'defrem':
 path= '/etc/apache2/sites-enabled/000-default',
 ensure  = absent,
 }

This resource doesn't contain any variable components at all, so this will
always result in a duplicate definition.

To fix this, you have to do what John Bollinger explained: move this
resource outside the defined type. You can either make it virtual and
realize() it here, or you can move it to a dedicated class and include the
class here. Both methods will work, but I think that current best
practices prefer the virual resource over the class inclusion.

 
 file{ 'index':
 path= ${docroot}/${servername}/html/index.html,
 ensure  = present,
 content = Welcome to hell of ${servername},
 }
 
 service{ 'apache2':
 ensure  = running,
 restart = 'service apache2 reload',
 require = [ File['conf'], File['link'],
 File[${docroot}/${servername}/html/] ],
 subscribe   = [ File['conf'], File['defrem'] ],
 }
 }
 
 and this is my node config
 
 node eurwebtest02 {
 include apache2
 include apache2::mods
 include apache2::pringo
 import apache2/vhost.pp
 
 vhost { 'local':
 }
 
 vhost { 'test':
 servername  = test.${domain},
 serveralias = www.test.${domain},
 inorout = '0',
 }
 }
 
 
 I tried to virtualize vhost in vhost.pp with @
 and realize them in the node config, but seems i cant get a working
 solution to use vhost resource type more than 1.
 
 Can you point me to the right direction? How can i create 100 vhost with
 that defined class or something like this


Best regards,
Martijn Grendelman






 
 On 18 November 2011 11:19, Peter Horvath peter.horvat...@gmail.com
 mailto:peter.horvat...@gmail.com wrote:
 
 As i figured out the source of my problem was that i used the defined
 resource type twice in a manifest.
 I didn't know that a defined resource type cannot be used twice in the
 same manifest as you can use multiple times a built in one.
 
 hmmm
 
 
 On 17 November 2011 22:14, jcbollinger john.bollin...@stjude.org
 mailto:john.bollin...@stjude.org wrote:
 
 
 
 On Nov 17, 1:50 pm, Peter Horvath peter.horvat...@gmail.com
 mailto:peter.horvat...@gmail.com wrote:
  i know all of this and i did grep before i wrote this email :)
  There is no other file[conf]
 
 
 In that case, the one declaration must be processed twice.  It must
 appear inside a defined type that you instantiate more than once.
 
 If both definition instances are supposed to declare the same file,
 then move the declaration outside the definition, make it virtual, and
 have the definition 'realize' it instead of declaring it.  If the
 definitions are each supposed to delare a different file then you have
 a bug in your manifest.  With respect to the latter possibility, I
 observe that the resource title is not an absolute path.  That could
 be a sign that a 

[Puppet Users] Managing a few resources on a few systems

2011-11-18 Thread Jake - USPS
We have an environment of thousands of servers.  Up to this point we
have been using puppet to manage resources common to all systems (ntp,
ssh, etc) which are managed automatically (without manually assigning
class/module to a system) and also resources for applications that
make up a majority of our environment (Oracle DB, WebSphere, etc)
which are assigned via ENC to specific systems (foreman hostgroups).

What I am now running into are requests to modify a small amount of
systems for a few resources.  Just recently a small new app needs 2
limits.conf entries on like 8 systems.  It seems like a waste of time
to me to craft and manage a recipe for this app to manage these
resources.  But, it would still be nice to have this managed by puppet
somehow for all the benefits puppet brings (standardization,
documentation, etc).  Also, I see lag time between crafting a recipe
after a request and then pushing the recipe out to the environments
before it would be applied to a system so that the app can then run/
install (although I know we can add it manually in the meantime, but
then your sort of doubling up on work).

How do other people handle managing 'one offs' like this?  I'm
wondering if there is a way to create a generic limits.conf module
that could take parameters from an ENC somehow and then manage the
resources?  That way I do not need to make new modules for app that
maybe just modify limits.conf or sysctl.conf with a couple of lines,
and then I have the changes documented and managed.  Or do people just
create a new module for every little app that comes along?

Thanks!
Jake

-- 
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 master sending old information

2011-11-18 Thread Zico
Hi,

I have changed the ldapbase of master section in my puppetmaster's
puppet.conf file, but the issue is, yet puppetmaster is sending previous
ldapbase information, which information is out dated now.

I want to inform that, I have not installed or configured storeconfigs,
so there is actually no chance of my puppetmaster to use stored
configuration.

Any kind of help of hint is highly appreciated.

-- 
Best,
Zico

-- 
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] Managing a few resources on a few systems

2011-11-18 Thread Luke Bigum
I would create a custom define to add/edit limits.conf and sysctl.conf 
lines into some base module, then call that define in a simple module. 
I don't know much about your internal processes but it shouldn't really 
be that much work - you'll probably spend more time documenting it than 
writing it ;-) If you make the limits.conf and sysctl.conf defines 
reusable enough you can avoid problems down the track with a dozen 
different admins editing these files a dozen different ways (exec sed vs 
augeas vs file resource, etc). Personally I've used augeas for something 
only to find out someone using sed to change the same field a few weeks 
later - makes for interesting debugging.


Also, even though it might be 8 nodes now, you have the added bonus that 
if you lost those servers in a disaster you know how to rebuild at least 
this part of them. What starts as 8 now may be more in 6 months time - 
though I'm pretty sure I don't need to tell you of the quadruple digit 
infrastructure this phenomenon ;-)


On 18/11/11 15:26, Jake - USPS wrote:

We have an environment of thousands of servers.  Up to this point we
have been using puppet to manage resources common to all systems (ntp,
ssh, etc) which are managed automatically (without manually assigning
class/module to a system) and also resources for applications that
make up a majority of our environment (Oracle DB, WebSphere, etc)
which are assigned via ENC to specific systems (foreman hostgroups).

What I am now running into are requests to modify a small amount of
systems for a few resources.  Just recently a small new app needs 2
limits.conf entries on like 8 systems.  It seems like a waste of time
to me to craft and manage a recipe for this app to manage these
resources.  But, it would still be nice to have this managed by puppet
somehow for all the benefits puppet brings (standardization,
documentation, etc).  Also, I see lag time between crafting a recipe
after a request and then pushing the recipe out to the environments
before it would be applied to a system so that the app can then run/
install (although I know we can add it manually in the meantime, but
then your sort of doubling up on work).

How do other people handle managing 'one offs' like this?  I'm
wondering if there is a way to create a generic limits.conf module
that could take parameters from an ENC somehow and then manage the
resources?  That way I do not need to make new modules for app that
maybe just modify limits.conf or sysctl.conf with a couple of lines,
and then I have the changes documented and managed.  Or do people just
create a new module for every little app that comes along?

Thanks!
Jake




--
Luke Bigum
Information Systems
+44 (0) 20 3192 2520
luke.bi...@lmax.com | http://www.lmax.com
LMAX, Yellow Building, 1A Nicholas Road, London W11 4AN


The information in this e-mail and any attachment is confidential and is 
intended only for the named recipient(s). The e-mail may not be disclosed or 
used by any person other than the addressee, nor may it be copied in any way. 
If you are not a named recipient please notify the sender immediately and 
delete any copies of this message. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden. Any view or 
opinions presented are solely those of the author and do not necessarily 
represent those of the company.

--
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] Managing a few resources on a few systems

2011-11-18 Thread Christopher Wood
inline

On Fri, Nov 18, 2011 at 07:26:45AM -0800, Jake - USPS wrote:
 We have an environment of thousands of servers.  Up to this point we
 have been using puppet to manage resources common to all systems (ntp,
 ssh, etc) which are managed automatically (without manually assigning
 class/module to a system) and also resources for applications that
 make up a majority of our environment (Oracle DB, WebSphere, etc)
 which are assigned via ENC to specific systems (foreman hostgroups).
 
 What I am now running into are requests to modify a small amount of
 systems for a few resources.  Just recently a small new app needs 2
 limits.conf entries on like 8 systems.  It seems like a waste of time
 to me to craft and manage a recipe for this app to manage these
 resources.  But, it would still be nice to have this managed by puppet
 somehow for all the benefits puppet brings (standardization,
 documentation, etc).  Also, I see lag time between crafting a recipe
 after a request and then pushing the recipe out to the environments
 before it would be applied to a system so that the app can then run/
 install (although I know we can add it manually in the meantime, but
 then your sort of doubling up on work).

If you put the effort into revision-controlling and puppetizing any specific 
configuration item, then in two years when somebody wonders what is configured 
on a system they will be able to dig into your manifests and know. It's well 
worth the initial wait.

You can always, depending on your config, puppet kick the hosts which need 
changing right now. Or somehow orchestrate that these reapply the current 
config right now.

If you aren't able to orchestrate, then the cheap cousin might be uploading the 
puppet manifest to the hosts and having puppet configure that. When the regular 
run comes around it'll do nothing since limits.conf is already the new one. 
(This option is vastly less preferable to orchestration.)

More specifically, there's an example for modifying limits.conf with the augeas 
type:

http://projects.puppetlabs.com/projects/1/wiki/Puppet_Augeas#/etc/security/limits.conf

 How do other people handle managing 'one offs' like this?  I'm
 wondering if there is a way to create a generic limits.conf module
 that could take parameters from an ENC somehow and then manage the
 resources?  That way I do not need to make new modules for app that
 maybe just modify limits.conf or sysctl.conf with a couple of lines,
 and then I have the changes documented and managed.  Or do people just
 create a new module for every little app that comes along?

node specialserver.mine.com {

  # everything that a generic host needs in our environment
  # snmp, ssh, ldap auth, puppet, apt/yum sources, etc.
  class { 'standardhost': }

  # special shiny thing that only this subset of hosts does
  # inside this module would be your lookups, I suppose
  class { 'limits': }

}

This doesn't scale way, way up without automagic manifest generation, but it's 
useful at our scale and number of special servers. It's also fairly easy to see 
in the puppet tree which nodes get the limits class/module.

On the other hand, your limits class could go everywhere and check if it's 
supposed to apply the new limits.conf file. That might mean puppet cycles 
everywhere for only eight servers and perhaps not worth the cost. (I take it by 
your domain that you scale way, way, way up. I'm not sure of your values for 
might and perhaps.)

To arrange networking on the initial server powerup I use a magic variable in 
the node definition which the networking class applies. It's a bit horrible, 
but then some hosts have fairly twisty networking.

 Thanks!
 Jake
 
 -- 
 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: Managing a few resources on a few systems

2011-11-18 Thread Jake - USPS
Thank you both for your responses.

I do already have a define for adding items to limits.conf and
sysctl.conf (using augeas).  So making new modules for this wouldn't
take a lot of time (probably more then just logging in and adding the
values though because of version control/testing/code promition/etc).
I'm just worried that we would eventually have hundreds of modules for
all these little one offs.  We use foreman as an ENC.  This means that
when choosing additional classes to assign to a system someone would
have to shift through hundreds of classes for the one they want.

I get that having the manifest is good documentation.  That is why I
think being able to utilize parameters in an ENC that maybe a class is
able to 'parse' to manage it would be good.  That way we have it
documented for the host in foreman with the parameters (which allows
easy rebuilds as well in case of a system blowing up), its managed by
puppet, and we don't need to wait to push out an update throughout our
puppet environments to add small resources like this.  But maybe this
isn't possible?

Thanks again for your comments!
Jake

On Nov 18, 9:54 am, Christopher Wood christopher_w...@pobox.com
wrote:
 inline









 On Fri, Nov 18, 2011 at 07:26:45AM -0800, Jake - USPS wrote:
  We have an environment of thousands of servers.  Up to this point we
  have been using puppet to manage resources common to all systems (ntp,
  ssh, etc) which are managed automatically (without manually assigning
  class/module to a system) and also resources for applications that
  make up a majority of our environment (Oracle DB, WebSphere, etc)
  which are assigned via ENC to specific systems (foreman hostgroups).

  What I am now running into are requests to modify a small amount of
  systems for a few resources.  Just recently a small new app needs 2
  limits.conf entries on like 8 systems.  It seems like a waste of time
  to me to craft and manage a recipe for this app to manage these
  resources.  But, it would still be nice to have this managed by puppet
  somehow for all the benefits puppet brings (standardization,
  documentation, etc).  Also, I see lag time between crafting a recipe
  after a request and then pushing the recipe out to the environments
  before it would be applied to a system so that the app can then run/
  install (although I know we can add it manually in the meantime, but
  then your sort of doubling up on work).

 If you put the effort into revision-controlling and puppetizing any specific 
 configuration item, then in two years when somebody wonders what is 
 configured on a system they will be able to dig into your manifests and know. 
 It's well worth the initial wait.

 You can always, depending on your config, puppet kick the hosts which need 
 changing right now. Or somehow orchestrate that these reapply the current 
 config right now.

 If you aren't able to orchestrate, then the cheap cousin might be uploading 
 the puppet manifest to the hosts and having puppet configure that. When the 
 regular run comes around it'll do nothing since limits.conf is already the 
 new one. (This option is vastly less preferable to orchestration.)

 More specifically, there's an example for modifying limits.conf with the 
 augeas type:

 http://projects.puppetlabs.com/projects/1/wiki/Puppet_Augeas#/etc/sec...

  How do other people handle managing 'one offs' like this?  I'm
  wondering if there is a way to create a generic limits.conf module
  that could take parameters from an ENC somehow and then manage the
  resources?  That way I do not need to make new modules for app that
  maybe just modify limits.conf or sysctl.conf with a couple of lines,
  and then I have the changes documented and managed.  Or do people just
  create a new module for every little app that comes along?

 node specialserver.mine.com {

   # everything that a generic host needs in our environment
   # snmp, ssh, ldap auth, puppet, apt/yum sources, etc.
   class { 'standardhost': }

   # special shiny thing that only this subset of hosts does
   # inside this module would be your lookups, I suppose
   class { 'limits': }

 }

 This doesn't scale way, way up without automagic manifest generation, but 
 it's useful at our scale and number of special servers. It's also fairly easy 
 to see in the puppet tree which nodes get the limits class/module.

 On the other hand, your limits class could go everywhere and check if it's 
 supposed to apply the new limits.conf file. That might mean puppet cycles 
 everywhere for only eight servers and perhaps not worth the cost. (I take it 
 by your domain that you scale way, way, way up. I'm not sure of your values 
 for might and perhaps.)

 To arrange networking on the initial server powerup I use a magic variable in 
 the node definition which the networking class applies. It's a bit horrible, 
 but then some hosts have fairly twisty networking.







  Thanks!
  Jake

  --
  You received this message because you are 

[Puppet Users] PE 2.0 - failure to find keytool

2011-11-18 Thread treydock
I've just installed Puppet Enterprise 2.0, and noticed the
pe_mcollective module that is provided is failing.  I've made no
changes to the modules, this is a fresh install.  The system is CentOS
6.0  x86_64 updated to CR.

This is the error,
---
#/opt/puppet/sbin/puppetd --test -v --debug

debug: Exec[broker_cert_truststore](provider=posix): Executing 'sh -c
'umask 077; keytool -import -noprompt -trustcacerts -alias 'PuppetCA' -
file /etc/puppetlabs/puppet/ssl/certs/ca.pem -keystore broker.ts -
storepass puppet''
debug: Executing 'sh -c 'umask 077; keytool -import -noprompt -
trustcacerts -alias 'PuppetCA' -file /etc/puppetlabs/puppet/ssl/certs/
ca.pem -keystore broker.ts -storepass puppet''
err: /Stage[main]/Pe_mcollective/Exec[broker_cert_truststore]/returns:
change from notrun to 0 failed: sh: keytool: command not found

notice: /Stage[main]/Pe_mcollective/File[/etc/puppetlabs/activemq/
broker.ts]: Dependency Exec[broker_cert_truststore] has failures: true
warning: /Stage[main]/Pe_mcollective/File[/etc/puppetlabs/activemq/
broker.ts]: Skipping because of failed dependencies
debug: Exec[broker_cert_keystore](provider=posix): Executing 'sh -c
'umask 077; keytool -importkeystore -deststorepass puppet -destkeypass
puppet -destkeystore broker.ks -srckeystore broker.p12 -srcstorepass
puppet -srcstoretype PKCS12 -alias cllapuppetmaster.tamu.edu''
debug: Executing 'sh -c 'umask 077; keytool -importkeystore -
deststorepass puppet -destkeypass puppet -destkeystore broker.ks -
srckeystore broker.p12 -srcstorepass puppet -srcstoretype PKCS12 -
alias puppetmaster.tamu.edu''
err: /Stage[main]/Pe_mcollective/Exec[broker_cert_keystore]/returns:
change from notrun to 0 failed: sh: keytool: command not found


Here's the results of locating keytool, and my $PATH,


# locate keytool
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/keytool
/usr/share/man/man1/keytool-java-1.6.0-openjdk.1.gz

# which keytool
/usr/bin/which: no keytool in (/usr/local/sbin:/usr/local/bin:/sbin:/
bin:/usr/sbin:/usr/bin:/root/bin)

Do I need to update my PATH to include java's bin directory?

Also while I'm testing PE, this server is managed by my Puppet server
(2.6.12), and during the install the PATH didn't seem to put /opt/
puppet/... before the system directories, is that correct ?  Should I
have to add both /opt/puppet/bin and /opt/puppet/sbin to my PATH
manually?
--
# which puppetd
/usr/sbin/puppetd

# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin


Thanks
- Trey

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



[Puppet Users] Re: Virtual Define-based resources can only be realized once

2011-11-18 Thread Stephan
Hi John,

 Look up the Concat module.  That seems to be the tool most often used
 for this sort of job, and several of the regulars around here can help
 you out with it.

Thanks so much for this hint, this does the job perfectly! All set up
now :-)

Stephan

-- 
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: Duplicate definition

2011-11-18 Thread Peter Horvath
As you recommended i change all my file resources

define vhost ($servername = ${hostname}.${domain}, $serveralias =
www.${hostname}.${domain}, $inorout = 1) {
file{ /etc/apache2/sites-available/${servername}:
ensure  = present,
content =
template('/etc/puppet/modules/apache2/templates/vhost.erb'),
}

file{ /etc/apache2/sites-enabled/${servername}:
ensure  = link,
target  =
/etc/apache2/sites-available/${servername},
require =
File[/etc/apache2/sites-available/${servername}],
}

file{ /var/www/${servername}:
ensure  = directory,
}

file{ /var/www/${servername}/html/:
ensure  = directory,
require = File[/var/www/${servername}],
}

file{ /var/www/${servername}/html/index.html:
ensure  = present,
content = Welcome to hell of ${servername},
}

 service{ ${servername}:
name= 'apaceh2',
ensure  = running,
restart = 'service apache2 reload',
require = [
File[/etc/apache2/sites-enabled/${servername}],
File[/var/www/${servername}/html/] ],
subscribe   = [
File[/etc/apache2/sites-enabled/${servername}] ],
}
}

as you stated apache restart will fail my defined resource type usage how
can i reload apache with every new vhost? Virtualization works pretty much
the same as using unique variable defined names.

Puppet::Parser::AST::Resource failed with error ArgumentError: Cannot alias
Service[test.eurweb] to [apache2]; resource [Service, [apache2]]
already exists at /etc/puppet/modules/apache2/manifests/vhost.pp:33 on node
eurwebtest02.eurweb

Am i wrong?



On 18 November 2011 15:15, Martijn Grendelman mart...@iphion.nl wrote:

 On 18-11-11 15:58, Peter Horvath wrote:
  Seems i dont understand how get over this.
  I have this defined resource type
 
  vhost.pp
 
  define vhost ($docroot = /var/www, $servername =
  ${hostname}.${domain}, $serveralias = www.${hostname}.${domain},
  $inorout = 1) {
  file{ 'conf':

 So, if you use this define twice, you would end up with two File resources
 named 'conf'...

  path=
  /etc/apache2/sites-available/${servername},
  ensure  = present,
  content =
  template('/etc/puppet/modules/apache2/templates/vhost.erb'),
  }
 
  file{ 'link':

 So, if you use this define twice, you would end up with two File resources
 named 'link'...

 Etcetera. You have to make sure that your resource names are globally
 unique. Why not just do:

  file { /etc/apache2/sites-enabled/${servername}: ... }

 That would solve most of your problems, but keep on reading...


  path=
 /etc/apache2/sites-enabled/${servername},
  ensure  = link,
  target  =
  /etc/apache2/sites-available/${servername},
  require = File['conf'],
  }
 
  file{ ${docroot}:
  ensure  = directory,
  }

 If you do this, you have to make sure your $docroot is different for each
 vhost.

 
  file{ ${docroot}/${servername}:
  ensure  = directory,
  require = File[${docroot}],
  }
 
  file{ ${docroot}/${servername}/html/:
  ensure  = directory,
  require = File[${docroot}/${servername}],
  }
 
  file{ 'defrem':
  path=
 '/etc/apache2/sites-enabled/000-default',
  ensure  = absent,
  }

 This resource doesn't contain any variable components at all, so this will
 always result in a duplicate definition.

 To fix this, you have to do what John Bollinger explained: move this
 resource outside the defined type. You can either make it virtual and
 realize() it here, or you can move it to a dedicated class and include the
 class here. Both methods will work, but I think that current best
 practices prefer the virual resource over the class inclusion.

 
  file{ 'index':
  path=
 ${docroot}/${servername}/html/index.html,
  ensure  = present,
  content = Welcome to hell of
 ${servername},
  }
 
  service{ 'apache2':
  ensure  = running,
  restart = 'service apache2 reload',
  require = [ File['conf'], File['link'],
  File[${docroot}/${servername}/html/] ],
  subscribe   = [ File['conf'], File['defrem'] ],
  }
  }
 
  and this is my node config
 
  node 

Re: [Puppet Users] PE 2.0 - failure to find keytool

2011-11-18 Thread Nan Liu
On Fri, Nov 18, 2011 at 11:59 AM, treydock treyd...@gmail.com wrote:
 I've just installed Puppet Enterprise 2.0, and noticed the
 pe_mcollective module that is provided is failing.  I've made no
 changes to the modules, this is a fresh install.  The system is CentOS
 6.0  x86_64 updated to CR.

 This is the error,
 ---
 #/opt/puppet/sbin/puppetd --test -v --debug
 
 debug: Exec[broker_cert_truststore](provider=posix): Executing 'sh -c
 'umask 077; keytool -import -noprompt -trustcacerts -alias 'PuppetCA' -
 file /etc/puppetlabs/puppet/ssl/certs/ca.pem -keystore broker.ts -
 storepass puppet''
 debug: Executing 'sh -c 'umask 077; keytool -import -noprompt -
 trustcacerts -alias 'PuppetCA' -file /etc/puppetlabs/puppet/ssl/certs/
 ca.pem -keystore broker.ts -storepass puppet''
 err: /Stage[main]/Pe_mcollective/Exec[broker_cert_truststore]/returns:
 change from notrun to 0 failed: sh: keytool: command not found

 notice: /Stage[main]/Pe_mcollective/File[/etc/puppetlabs/activemq/
 broker.ts]: Dependency Exec[broker_cert_truststore] has failures: true
 warning: /Stage[main]/Pe_mcollective/File[/etc/puppetlabs/activemq/
 broker.ts]: Skipping because of failed dependencies
 debug: Exec[broker_cert_keystore](provider=posix): Executing 'sh -c
 'umask 077; keytool -importkeystore -deststorepass puppet -destkeypass
 puppet -destkeystore broker.ks -srckeystore broker.p12 -srcstorepass
 puppet -srcstoretype PKCS12 -alias cllapuppetmaster.tamu.edu''
 debug: Executing 'sh -c 'umask 077; keytool -importkeystore -
 deststorepass puppet -destkeypass puppet -destkeystore broker.ks -
 srckeystore broker.p12 -srcstorepass puppet -srcstoretype PKCS12 -
 alias puppetmaster.tamu.edu''
 err: /Stage[main]/Pe_mcollective/Exec[broker_cert_keystore]/returns:
 change from notrun to 0 failed: sh: keytool: command not found


 Here's the results of locating keytool, and my $PATH,
 

 # locate keytool
 /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/keytool
 /usr/share/man/man1/keytool-java-1.6.0-openjdk.1.gz

 # which keytool
 /usr/bin/which: no keytool in (/usr/local/sbin:/usr/local/bin:/sbin:/
 bin:/usr/sbin:/usr/bin:/root/bin)

 Do I need to update my PATH to include java's bin directory?

Looking at the error message, I would say yes.

 Also while I'm testing PE, this server is managed by my Puppet server
 (2.6.12), and during the install the PATH didn't seem to put /opt/
 puppet/... before the system directories, is that correct ?  Should I
 have to add both /opt/puppet/bin and /opt/puppet/sbin to my PATH
 manually?
 --
 # which puppetd
 /usr/sbin/puppetd

No, and you probably don't want /opt/puppet/bin/ruby having precedence
over your OS ruby. Puppet installer should have an option to symlink
puppet commands to /usr/local/bin which is usually the only things you
want.

 # echo $PATH
 /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

HTH,

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.



Re: [Puppet Users] Re: Duplicate definition

2011-11-18 Thread Nan Liu
On Fri, Nov 18, 2011 at 12:40 PM, Peter Horvath
peter.horvat...@gmail.com wrote:
 As you recommended i change all my file resources
 define vhost ($servername = ${hostname}.${domain}, $serveralias =
 www.${hostname}.${domain}, $inorout = 1) {
         file{ /etc/apache2/sites-available/${servername}:
                 ensure          = present,
                 content         =
 template('/etc/puppet/modules/apache2/templates/vhost.erb'),
         }
         file{ /etc/apache2/sites-enabled/${servername}:
                 ensure          = link,
                 target          =
 /etc/apache2/sites-available/${servername},
                 require         =
 File[/etc/apache2/sites-available/${servername}],
         }
         file{ /var/www/${servername}:
                 ensure          = directory,
         }
         file{ /var/www/${servername}/html/:
                 ensure          = directory,
                 require         = File[/var/www/${servername}],
         }
         file{ /var/www/${servername}/html/index.html:
                 ensure          = present,
                 content         = Welcome to hell of ${servername},
         }
          service{ ${servername}:
                 name            = 'apaceh2',
                 ensure          = running,
                 restart         = 'service apache2 reload',
                 require         = [
 File[/etc/apache2/sites-enabled/${servername}],
 File[/var/www/${servername}/html/] ],
                 subscribe       = [
 File[/etc/apache2/sites-enabled/${servername}] ],
         }
 }
 as you stated apache restart will fail my defined resource type usage how
 can i reload apache with every new vhost? Virtualization works pretty much
 the same as using unique variable defined names.
 Puppet::Parser::AST::Resource failed with error ArgumentError: Cannot alias
 Service[test.eurweb] to [apache2]; resource [Service, [apache2]]
 already exists at /etc/puppet/modules/apache2/manifests/vhost.pp:33 on node
 eurwebtest02.eurweb
 Am i wrong?

The service should not be in the define, it should be in a separate
class, and instead of service require = File, in the define specify
file { ...: notify = Service[apache2'] }

Nan

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



[Puppet Users] how to use tags exclusively?

2011-11-18 Thread Jo Rhett
What I'd like to do* is use tags exclusively. I mean, only do some things if 
certain tags are enabled.  In short

doesn't do_this:puppet agent --onetime  
doesdo_this:puppet agent --onetime --tags do_this

* I am currently using environments for this, but it's a hack against how 
environments were intended *and* you can't pass environments with a server 
kick, but you can pass tags.

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

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



[Puppet Users] Are tildes actually valid in templates or is this a bug?

2011-11-18 Thread Justin Lloyd
Hi all,

First off, we're running Puppet 2.7.6 with Ruby 1.8.7 on CentOS 6.0.

Now, I'm using tildes in a template to prevent newlines from appearing but
ruby/puppet is choking on them.

*/tmp/puppet$ cat test.erb*
Line 1: Line 2 will exist if running on CentOS.
% if operatingsystem == CentOS ~%
Line 2: Yay, we're running CentOS.
% end ~%
*/tmp/puppet$ erb -x -T '-' test.erb | ruby -c*
-:2: syntax error, unexpected '~', expecting kTHEN or ':' or '\n' or ';'
;  if operatingsystem == CentOS ~; _erbout.concat \n
   ^
-:4: syntax error, unexpected kEND, expecting $end
;  end ~; _erbout.concat \n
  ^
*/tmp/puppet**$ perl -pi -e 's/~//' test.erb*
*/tmp/puppet$ erb -x -T '-' test.erb | ruby -c*
Syntax OK
*/tmp/puppet$ *

I thought it might just be erb/ruby that was choking so I did a full test
with puppet. Tildes still do not work but, without them, blank lines are
still generated.

*/tmp/puppet$ cat test.pp*
class test {
file { /tmp/puppet/test.out:
ensure = 'present',
content = template('test.erb'),
}
}
include test**
*/tmp/puppet$ puppet apply --templatedir=. test.pp*
/tmp/puppet/test.erb:4:in `result': compile error (SyntaxError)
/tmp/puppet/test.erb:2: syntax error, unexpected '~', expecting kTHEN or
':' or '\n' or ';'
... operatingsystem == CentOS ~; _erbout.concat \nLine 2: Ya...
  ^
/tmp/puppet/test.erb:4: syntax error, unexpected kEND, expecting $end
;  end ~; _erbout.concat \n
  ^
from
/usr/lib/ruby/site_ruby/1.8/puppet/parser/templatewrapper.rb:106:in `result'
 [STRIPPED OUT STACK TRACE FOR READABILITY]
*/tmp/puppet$ perl -pi -e 's/~//' test.erb*
*/tmp/puppet$ cat test.erb*
Line 1: Line 2 will exist if running on CentOS.
% if operatingsystem == CentOS %
Line 2: Yay, we're running CentOS.
% end %
*/tmp/puppet$ puppet apply --templatedir=. test.pp*
notice: /Stage[main]/Test/File[/tmp/puppet/test.out]/ensure: created
notice: Finished catalog run in 0.04 seconds
*/tmp/puppet$ cat test.out*
Line 1: Line 2 will exist if running on CentOS.

Line 2: Yay, we're running CentOS.

*/tmp/puppet$
*
Current examples I find all use tildes. Am I doing something wrong or could
there be a bug here?

Thanks,
Justin
*
*

-- 
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] Are tildes actually valid in templates or is this a bug?

2011-11-18 Thread Nan Liu
On Fri, Nov 18, 2011 at 2:02 PM, Justin Lloyd jstn...@gmail.com wrote:
 Hi all,

 First off, we're running Puppet 2.7.6 with Ruby 1.8.7 on CentOS 6.0.

 Now, I'm using tildes in a template to prevent newlines from appearing but
 ruby/puppet is choking on them.

 /tmp/puppet$ cat test.erb
 Line 1: Line 2 will exist if running on CentOS.
 % if operatingsystem == CentOS ~%
 Line 2: Yay, we're running CentOS.
 % end ~%
 /tmp/puppet$ erb -x -T '-' test.erb | ruby -c
 -:2: syntax error, unexpected '~', expecting kTHEN or ':' or '\n' or ';'
 ;  if operatingsystem == CentOS ~; _erbout.concat \n
    ^
 -:4: syntax error, unexpected kEND, expecting $end
 ;  end ~; _erbout.concat \n
   ^
 /tmp/puppet$ perl -pi -e 's/~//' test.erb
 /tmp/puppet$ erb -x -T '-' test.erb | ruby -c
 Syntax OK
 /tmp/puppet$

 I thought it might just be erb/ruby that was choking so I did a full test
 with puppet. Tildes still do not work but, without them, blank lines are
 still generated.

 /tmp/puppet$ cat test.pp
 class test {
     file { /tmp/puppet/test.out:
     ensure = 'present',
     content = template('test.erb'),
     }
 }
 include test
 /tmp/puppet$ puppet apply --templatedir=. test.pp
 /tmp/puppet/test.erb:4:in `result': compile error (SyntaxError)
 /tmp/puppet/test.erb:2: syntax error, unexpected '~', expecting kTHEN or ':'
 or '\n' or ';'
 ... operatingsystem == CentOS ~; _erbout.concat \nLine 2: Ya...
   ^
 /tmp/puppet/test.erb:4: syntax error, unexpected kEND, expecting $end
 ;  end ~; _erbout.concat \n
   ^
     from /usr/lib/ruby/site_ruby/1.8/puppet/parser/templatewrapper.rb:106:in
 `result'
  [STRIPPED OUT STACK TRACE FOR READABILITY]
 /tmp/puppet$ perl -pi -e 's/~//' test.erb
 /tmp/puppet$ cat test.erb
 Line 1: Line 2 will exist if running on CentOS.
 % if operatingsystem == CentOS %
 Line 2: Yay, we're running CentOS.
 % end %
 /tmp/puppet$ puppet apply --templatedir=. test.pp
 notice: /Stage[main]/Test/File[/tmp/puppet/test.out]/ensure: created
 notice: Finished catalog run in 0.04 seconds
 /tmp/puppet$ cat test.out
 Line 1: Line 2 will exist if running on CentOS.

 Line 2: Yay, we're running CentOS.

 /tmp/puppet$

 Current examples I find all use tildes. Am I doing something wrong or could
 there be a bug here?

It's dash not tilde -% to suppress newlines. Do you have a link to
the faulty examples on puppetlabs site?

Thanks,

Nan

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



Re: [Puppet Users] Are tildes actually valid in templates or is this a bug?

2011-11-18 Thread Justin Lloyd
/sigh. I just need to increase my font size. Thank you for pointing out a
dumb mistake.

Justin

On Fri, Nov 18, 2011 at 11:05 AM, Nan Liu n...@puppetlabs.com wrote:

 On Fri, Nov 18, 2011 at 2:02 PM, Justin Lloyd jstn...@gmail.com wrote:
  Hi all,
 
  First off, we're running Puppet 2.7.6 with Ruby 1.8.7 on CentOS 6.0.
 
  Now, I'm using tildes in a template to prevent newlines from appearing
 but
  ruby/puppet is choking on them.
 
  /tmp/puppet$ cat test.erb
  Line 1: Line 2 will exist if running on CentOS.
  % if operatingsystem == CentOS ~%
  Line 2: Yay, we're running CentOS.
  % end ~%
  /tmp/puppet$ erb -x -T '-' test.erb | ruby -c
  -:2: syntax error, unexpected '~', expecting kTHEN or ':' or '\n' or ';'
  ;  if operatingsystem == CentOS ~; _erbout.concat \n
 ^
  -:4: syntax error, unexpected kEND, expecting $end
  ;  end ~; _erbout.concat \n
^
  /tmp/puppet$ perl -pi -e 's/~//' test.erb
  /tmp/puppet$ erb -x -T '-' test.erb | ruby -c
  Syntax OK
  /tmp/puppet$
 
  I thought it might just be erb/ruby that was choking so I did a full test
  with puppet. Tildes still do not work but, without them, blank lines are
  still generated.
 
  /tmp/puppet$ cat test.pp
  class test {
  file { /tmp/puppet/test.out:
  ensure = 'present',
  content = template('test.erb'),
  }
  }
  include test
  /tmp/puppet$ puppet apply --templatedir=. test.pp
  /tmp/puppet/test.erb:4:in `result': compile error (SyntaxError)
  /tmp/puppet/test.erb:2: syntax error, unexpected '~', expecting kTHEN or
 ':'
  or '\n' or ';'
  ... operatingsystem == CentOS ~; _erbout.concat \nLine 2: Ya...
^
  /tmp/puppet/test.erb:4: syntax error, unexpected kEND, expecting $end
  ;  end ~; _erbout.concat \n
^
  from
 /usr/lib/ruby/site_ruby/1.8/puppet/parser/templatewrapper.rb:106:in
  `result'
   [STRIPPED OUT STACK TRACE FOR READABILITY]
  /tmp/puppet$ perl -pi -e 's/~//' test.erb
  /tmp/puppet$ cat test.erb
  Line 1: Line 2 will exist if running on CentOS.
  % if operatingsystem == CentOS %
  Line 2: Yay, we're running CentOS.
  % end %
  /tmp/puppet$ puppet apply --templatedir=. test.pp
  notice: /Stage[main]/Test/File[/tmp/puppet/test.out]/ensure: created
  notice: Finished catalog run in 0.04 seconds
  /tmp/puppet$ cat test.out
  Line 1: Line 2 will exist if running on CentOS.
 
  Line 2: Yay, we're running CentOS.
 
  /tmp/puppet$
 
  Current examples I find all use tildes. Am I doing something wrong or
 could
  there be a bug here?

 It's dash not tilde -% to suppress newlines. Do you have a link to
 the faulty examples on puppetlabs site?

 Thanks,

 Nan

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



-- 
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] New user looking for some guidance

2011-11-18 Thread Jonathan van der Watt
Good day,

I'd like to ask the Puppet community for some help with a few problems
I've been having...

Greetings,

Jonathan

-- 
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 users module

2011-11-18 Thread vasanth kumar
Puppet Modules

When you have multiple files related to a single application, it often
makes sense to turn them into a module. This allows you to distribute
all of the files in one chunk, and Puppet will automatically look
through its module path for the files when you go to use them.

Modules can contain three types of files, each of which must be stored
in a separate subdirectory:

Manifests – must be stored in manifests/, and if you create
manifests/init.pp then that file will be loaded if you import the
module name directly, e.g. import “mymodule”. All other manifests must
have the module name included in the import statement, e.g., import
“mymod/mymanifest”.
Templates – must be stored in templates/, and the module name must
be added to the template name: template(“mymodule/mytemplate.erb”)
Files – stored in files/, these are available from the file server
under modules/module name/file name.

These three file types cover all of the content you would provide to
puppetmasterd. For a more detailed description of how modules should
be organised, see Module Organization .

 http://123maza.com/48/joy002/

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



[Puppet Users] Using File when its source doesn't exist

2011-11-18 Thread magicaltrout
Hi guys,

I'm trying to use the Apache SSL class from the camptocamp apache
module, The problem seems to be in the File type at the bottom
https://github.com/camptocamp/puppet-apache/blob/master/manifests/vhost-ssl.pp

Whilst source = file://$csrfile doesn't exist at the time of
running, an exec creates it before the file is supposed to be run as
the require states.

So i assume this used to work as puppet wont have checked to see if
the source exists. But now it does, I've tried putting the file in a
new definition but it does the same thing and tells me the file isn't
available, is there a sensible work around?

Thanks

Tom

-- 
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] Adding custom config to files

2011-11-18 Thread Jonathan van der Watt
Good day,

I'm very new to Puppet and am trying to manage the snmpd daemon and
associated config on our Red Hat servers using Puppet (for a start).
My problem is not ensuring that the config file is present or that the
package is installed. My problem is that the NMS we're using to
monitor our servers needs to have extra config in the snmpd.conf file
in order for it to monitor the space usage of mounted disks. Like so:

disk /
disk /var/log
disk /var/lib/mysql

This needs to be added somewhere in the snmpd.conf file; usually the
bottom. Now, this is obviously never going to be the same on every
single server... How would I accomplish this using Puppet? I'm
guessing that I will need to use a template with some erb code and
some facts from facter, but I'm just not sure what to do or how the
code should look. Even if Puppet could ensure that all the disks (/dev/
shm, /boot etc) are in there that would be fine. We could just tell
our NMS which disks we want it to monitor. But it has to be in the
above format!

Any suggestions would be appreciated!

J

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



[Puppet Users] Using regex to ensure package version

2011-11-18 Thread Matt
I'm trying to use something like this...

package { blah: ensure = 1.2.3* }

...and I know that doesn't work because it looks for a package
literally with that value 1.2.3*.  What I want is to say, install
the latest package in the 1.2.3 branch but don't automatically upgrade
to anything later than that.

e.g. 1.2.3-01, 1.2.3-05 are fine if I find them in the REPObut not
1.2.4 or later.


I'm sure there's a way to do this with a regex or something, but I've
not been able to find any examples in my searches so far.

Thanks,
Matt

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-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 agent 2.7 on windows

2011-11-18 Thread Ravi
Hi Team,

Tried following the steps here 
http://projects.puppetlabs.com/projects/1/wiki/Puppet_Windows
for deploying an agent on windows (windows server 2008 r2) but really
finding it hard to make it work (the agent deployment itself went fine
after following the steps). I have a working puppet-server on RH 6 and
have tested few RH clients which work fine.

The very first hurdle is that i don't find a default puppet.conf in c:
\programdata\puppetlabs\puppet\etc folder. Only auth.conf is present
in this folder.

Secondly from the command line when i run puppet config print all ,
i get a lot of settings. I am really not sure on where it is fetching
these settings from ?

Basically i need to provide the puppet-server name to the client for
it to communicate and register. (In RH this is done in /etc/puppet/
puppet.conf). Tried copying this puppet.conf file to windows server
but doesn't work.

Any guidance will be very helpful.

Cheers,
Ravi

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



[Puppet Users] Is it possible to get a list of all nodes in your manifests and all classes assigned to those nodes programatically in Ruby?

2011-11-18 Thread Trevor Vaughan
Sorry if this is a double post, my e-mail glitched on me.

Anyway, I'm trying to write a Ruby script that can get all defined
nodes and all classes assigned to those nodes. I would prefer to not
have to compile a catalog for each node.

I tried looking through the puppet/util/rdoc material but it really
didn't handle the node entries as far as I could tell and also didn't
seem to have a way to get the info without printing it all out.

Hopefully, I'm just missing something.

Thanks,

Trevor

-- 
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
tvaug...@onyxpoint.com

-- This account not approved for unencrypted proprietary information --

-- 
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] New user looking for some guidance

2011-11-18 Thread Brian Gupta
On Fri, Nov 18, 2011 at 4:07 AM, Jonathan van der Watt 
jonathan.vanderw...@gmail.com wrote:

 Good day,

 I'd like to ask the Puppet community for some help with a few problems
 I've been having...


Please feel free to post the details of the problems you are having to this
list, so that folks can see if they can help. (No need to ask to ask).


Good luck,
Brian

Greetings,

 Jonathan

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




-- 
http://aws.amazon.com/solutions/solution-providers/brandorr/

-- 
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] New user looking for some guidance

2011-11-18 Thread Craig White

On Nov 18, 2011, at 2:07 AM, Jonathan van der Watt wrote:

 Good day,
 
 I'd like to ask the Puppet community for some help with a few problems
 I've been having...

Suggest that you purchase Pro Puppet book and all will be revealed.

Craig

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



Re: [Puppet Users] Using regex to ensure package version

2011-11-18 Thread Jacob Helwig
On 2011-11-18 08:37 , Matt wrote:
 I'm trying to use something like this...
 
 package { blah: ensure = 1.2.3* }
 
 ...and I know that doesn't work because it looks for a package
 literally with that value 1.2.3*.  What I want is to say, install
 the latest package in the 1.2.3 branch but don't automatically upgrade
 to anything later than that.
 
 e.g. 1.2.3-01, 1.2.3-05 are fine if I find them in the REPObut not
 1.2.4 or later.
 
 
 I'm sure there's a way to do this with a regex or something, but I've
 not been able to find any examples in my searches so far.
 
 Thanks,
 Matt
 

Puppet doesn't have a way to do that.  The way the package type 
providers are setup they will always compare literal strings.

Typically how people have handled this is by ensuring 'latest', but
managing the repository that the machine will pull the packages from so
that it will only ever contain something in the 1.2.3 series.

-- 
Jacob Helwig
http://about.me/jhelwig



signature.asc
Description: OpenPGP digital signature


Re: [Puppet Users] puppet agent 2.7 on windows

2011-11-18 Thread Jacob Helwig
On 2011-11-18 09:15 , Ravi wrote:
 Hi Team,
 
 Tried following the steps here 
 http://projects.puppetlabs.com/projects/1/wiki/Puppet_Windows
 for deploying an agent on windows (windows server 2008 r2) but really
 finding it hard to make it work (the agent deployment itself went fine
 after following the steps). I have a working puppet-server on RH 6 and
 have tested few RH clients which work fine.
 
 The very first hurdle is that i don't find a default puppet.conf in c:
 \programdata\puppetlabs\puppet\etc folder. Only auth.conf is present
 in this folder.
 
 Secondly from the command line when i run puppet config print all ,
 i get a lot of settings. I am really not sure on where it is fetching
 these settings from ?
 
 Basically i need to provide the puppet-server name to the client for
 it to communicate and register. (In RH this is done in /etc/puppet/
 puppet.conf). Tried copying this puppet.conf file to windows server
 but doesn't work.
 
 Any guidance will be very helpful.
 
 Cheers,
 Ravi
 

A (relatively) quick way to get started would be to put the output of
'puppet agent --genconfig' into the file output by 'puppet agent
--configprint config', and modifying to taste.

The 'puppet config print all' is getting the settings from the internal
defaults of Puppet itself, so it's not really fetching them from anywhere.

-- 
Jacob Helwig
http://about.me/jhelwig



signature.asc
Description: OpenPGP digital signature


[Puppet Users] Re: Managing a few resources on a few systems

2011-11-18 Thread Jake - USPS
So what I got that is functionally what I want is:

Define parameter in foreman ...

limits: user type item value

Can have multiple 'entries' such as:

limits: user1 type1 item1 value1,john soft nproc 1234

Then I have class 'limits':

class limits {
  define set_limits() {
$user = inline_template(%= name.split(\ \)[0] %)
$type = inline_template(%= name.split(\ \)[1] %)
$item = inline_template(%= name.split(\ \)[2] %)
$value = inline_template(%= name.split(\ \)[3] %)

if $user !=  and $user != nil and $type !=  and $type != nil
and $item !=  and $itme != nil and $value !=  and $value != nil {
  include aug_conf
  aug_conf::etc_security_limits_conf {
${user}-${type}-${item}: domain = $user, type = $type,
item = $item, value = $value;
  }
}
  }

  $limits_arr = split($limits,,)
  set_limits{ $limits_arr: }
}

And I include class limits on all systems.  If parameter doesn't exist
nothing happens.  If parameter exists then it checks/adds the items.

This seems to work for me.  Not sure its the best way though.  I did
see http://projects.puppetlabs.com/issues/1858 and
http://projects.puppetlabs.com/issues/8670 which are very similar to
what I am trying to do, but it seems foreman does not allow parameters
for classes yet nor can I figure out how to have a 'parameter hash' in
foreman.

So functionally this is pretty close to what I am looking for.  Not
sure if there is a better way to implement with foreman (a question
perhaps for that group), or if someone has a better solution overall
disregarding what I've done.

Thanks!
Jake

On Nov 18, 10:11 am, Jake - USPS jacob.m.mcc...@usps.gov wrote:
 Thank you both for your responses.

 I do already have a define for adding items to limits.conf and
 sysctl.conf (using augeas).  So making new modules for this wouldn't
 take a lot of time (probably more then just logging in and adding the
 values though because of version control/testing/code promition/etc).
 I'm just worried that we would eventually have hundreds of modules for
 all these little one offs.  We use foreman as an ENC.  This means that
 when choosing additional classes to assign to a system someone would
 have to shift through hundreds of classes for the one they want.

 I get that having the manifest is good documentation.  That is why I
 think being able to utilize parameters in an ENC that maybe a class is
 able to 'parse' to manage it would be good.  That way we have it
 documented for the host in foreman with the parameters (which allows
 easy rebuilds as well in case of a system blowing up), its managed by
 puppet, and we don't need to wait to push out an update throughout our
 puppet environments to add small resources like this.  But maybe this
 isn't possible?

 Thanks again for your comments!
 Jake

 On Nov 18, 9:54 am, Christopher Wood christopher_w...@pobox.com
 wrote:







  inline

  On Fri, Nov 18, 2011 at 07:26:45AM -0800, Jake - USPS wrote:
   We have an environment of thousands of servers.  Up to this point we
   have been using puppet to manage resources common to all systems (ntp,
   ssh, etc) which are managed automatically (without manually assigning
   class/module to a system) and also resources for applications that
   make up a majority of our environment (Oracle DB, WebSphere, etc)
   which are assigned via ENC to specific systems (foreman hostgroups).

   What I am now running into are requests to modify a small amount of
   systems for a few resources.  Just recently a small new app needs 2
   limits.conf entries on like 8 systems.  It seems like a waste of time
   to me to craft and manage a recipe for this app to manage these
   resources.  But, it would still be nice to have this managed by puppet
   somehow for all the benefits puppet brings (standardization,
   documentation, etc).  Also, I see lag time between crafting a recipe
   after a request and then pushing the recipe out to the environments
   before it would be applied to a system so that the app can then run/
   install (although I know we can add it manually in the meantime, but
   then your sort of doubling up on work).

  If you put the effort into revision-controlling and puppetizing any 
  specific configuration item, then in two years when somebody wonders what 
  is configured on a system they will be able to dig into your manifests and 
  know. It's well worth the initial wait.

  You can always, depending on your config, puppet kick the hosts which 
  need changing right now. Or somehow orchestrate that these reapply the 
  current config right now.

  If you aren't able to orchestrate, then the cheap cousin might be uploading 
  the puppet manifest to the hosts and having puppet configure that. When the 
  regular run comes around it'll do nothing since limits.conf is already the 
  new one. (This option is vastly less preferable to orchestration.)

  More specifically, there's an example for modifying limits.conf with the 
  augeas type:

 

[Puppet Users] BigIP and Puppet

2011-11-18 Thread Jeff Gutierrez
Has anyone successfully puppetized BigIP (F5)?

I'm specifically trying to figure out a path in making our BigIP
instances be under puppet so all the VIPs, pools, profiles, etc. are
all under puppet control. My requirements are probably going to be
fulfilled even with just uploading a rules file if a delta's detected.
The main issue I have now is figuring out when to reload the rules
without doing it every time the puppet agent executes.

I'd appreciate any information.

Thanks,
Jeff

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



Re: [Puppet Users] BigIP and Puppet

2011-11-18 Thread Christopher Wood
On Fri, Nov 18, 2011 at 12:05:02PM -0800, Jeff Gutierrez wrote:
 Has anyone successfully puppetized BigIP (F5)?
 
 I'm specifically trying to figure out a path in making our BigIP
 instances be under puppet so all the VIPs, pools, profiles, etc. are
 all under puppet control. My requirements are probably going to be
 fulfilled even with just uploading a rules file if a delta's detected.
 The main issue I have now is figuring out when to reload the rules
 without doing it every time the puppet agent executes.
 
 I'd appreciate any information.
 
 Thanks,
 Jeff

What did F5 say about whether this voids your warranty?
 
 -- 
 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] Using File when its source doesn't exist

2011-11-18 Thread Stefan Schulte
On Thu, Nov 17, 2011 at 01:36:07PM -0800, magicaltrout wrote:
 Hi guys,
 
 I'm trying to use the Apache SSL class from the camptocamp apache
 module, The problem seems to be in the File type at the bottom
 https://github.com/camptocamp/puppet-apache/blob/master/manifests/vhost-ssl.pp
 
 Whilst source = file://$csrfile doesn't exist at the time of
 running, an exec creates it before the file is supposed to be run as
 the require states.
 
 So i assume this used to work as puppet wont have checked to see if
 the source exists. But now it does, I've tried putting the file in a
 new definition but it does the same thing and tells me the file isn't
 available, is there a sensible work around?
 
 Thanks
 
 Tom

Are you sure the file gets created? Does puppet fail on the first run and
runs fine on the second run (when the file was present from the
beginning)

I was not able to reproduce the issue with the following test:

puppet apply -v  EOF
exec { 'create_source':
  command = '/bin/echo Hallo  /tmp/source',
  creates = '/tmp/source',
}
file { '/tmp/dest':
  ensure = file,
  source = '/tmp/source',
  require = Exec['create_source'],
}
EOF

Does it change anything if you substitude file://$csrfile with just
$csrfile?

If it still fails, can you please run puppet (agent) with --debug
and --verbose commandline arguments.

-Stefan


pgpRGhsPH3A1P.pgp
Description: PGP signature


Re: [Puppet Users] BigIP and Puppet

2011-11-18 Thread Nan Liu
On Fri, Nov 18, 2011 at 3:06 PM, Christopher Wood
christopher_w...@pobox.com wrote:
 On Fri, Nov 18, 2011 at 12:05:02PM -0800, Jeff Gutierrez wrote:
 Has anyone successfully puppetized BigIP (F5)?

 I'm specifically trying to figure out a path in making our BigIP
 instances be under puppet so all the VIPs, pools, profiles, etc. are
 all under puppet control. My requirements are probably going to be
 fulfilled even with just uploading a rules file if a delta's detected.
 The main issue I have now is figuring out when to reload the rules
 without doing it every time the puppet agent executes.

 I'd appreciate any information.

Yes, please checkout:
https://github.com/puppetlabs/puppetlabs-f5

Rules can be managed like a puppet resource:
node f5.puppetlabs.lan {
  f5_rule { 'demo':
ensure = 'present',
definition = 'when HTTP_REQUEST {}',
  }
}

 What did F5 say about whether this voids your warranty?

No, it doesn't void your warranty because we don't run an agent on the
f5 device.  Puppet runs through a proxy server, and use the iControl
API to remotely query and configure your F5 device.

This project is under active development, please feel free to contact
me directly for feedback/suggestions and file any issues under puppet
modules at:
http://projects.puppetlabs.com/

Thanks,

Nan

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



Re: [Puppet Users] BigIP and Puppet

2011-11-18 Thread Jeff Gutierrez
We're not that concerned with warranty as being able to recover from device
failure (even with a backup instance) quickly is the primary motivation.

The other option I'm thinking of is pushing the rules from Jenkins to the
BigIP instances, but I'd rather have the puppet agent impose the rules
instead of an implicit and manual trigger (someone clicking the build
button.)

On Fri, Nov 18, 2011 at 2:06 PM, Christopher Wood 
christopher_w...@pobox.com wrote:

 On Fri, Nov 18, 2011 at 12:05:02PM -0800, Jeff Gutierrez wrote:
  Has anyone successfully puppetized BigIP (F5)?
 
  I'm specifically trying to figure out a path in making our BigIP
  instances be under puppet so all the VIPs, pools, profiles, etc. are
  all under puppet control. My requirements are probably going to be
  fulfilled even with just uploading a rules file if a delta's detected.
  The main issue I have now is figuring out when to reload the rules
  without doing it every time the puppet agent executes.
 
  I'd appreciate any information.
 
  Thanks,
  Jeff

 What did F5 say about whether this voids your warranty?

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

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



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



Re: [Puppet Users] ENC-LDAP - or facts from local file on server?

2011-11-18 Thread Denmat
Hi,

Depends on what you consider the source of truth and what you use to generate 
the facts. The main idea here is that this information can go stale.

We use the fqdn to generate our location/role facts and pull asset info from 
the Dell openmanager tool (service tags, and so on and even purchase/warranty 
information).

The next step isn't done yet but then we plan to pull that data out and stick 
into cmdb. I don't see why you couldn't populate LDAP with that info. We don't 
use LDAP for this though.

This won't cover all your requirements and questions but that's how we plan to 
tackle this. Hope it helps.

Den

On 18/11/2011, at 21:58, Pieter Baele pieter.ba...@gmail.com wrote:

 Hi,
 
 For every server, I would like to have add some extra data - facts as:
 indate (date in service)
 asset,
 location, and a few others
 
 First I was thinking about adding custom facts, that are read from a
 file on the server (ks)
 The benefit: all data is available on the host.
 
 With all facts I can then populate some fields in the monitoring
 system, our custom asset management system,
 and have an export to excel sheets (sigh...)
 
 But maybe this is the wrong approach and I have to put this data in
 LDAP? Any idea?
 
 Sincerely,
 PieterB
 
 -- 
 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] BigIP and Puppet

2011-11-18 Thread Jeff Gutierrez
Nan, that should suffice for what we're looking to do. Thanks for the info!

-- 
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: Adding custom config to files

2011-11-18 Thread jcbollinger


On Nov 18, 3:24 am, Jonathan van der Watt
jonathan.vanderw...@gmail.com wrote:
 Good day,

 I'm very new to Puppet and am trying to manage the snmpd daemon and
 associated config on our Red Hat servers using Puppet (for a start).
 My problem is not ensuring that the config file is present or that the
 package is installed. My problem is that the NMS we're using to
 monitor our servers needs to have extra config in the snmpd.conf file
 in order for it to monitor the space usage of mounted disks. Like so:

 disk /
 disk /var/log
 disk /var/lib/mysql

 This needs to be added somewhere in the snmpd.conf file; usually the
 bottom. Now, this is obviously never going to be the same on every
 single server... How would I accomplish this using Puppet? I'm
 guessing that I will need to use a template with some erb code and
 some facts from facter, but I'm just not sure what to do or how the
 code should look.


Your instincts seem good to me.


 Even if Puppet could ensure that all the disks (/dev/
 shm, /boot etc) are in there that would be fine. We could just tell
 our NMS which disks we want it to monitor. But it has to be in the
 above format!


Formatting is the least of your problems.  Templates are all about
formatting, and the format you presented is very simple.  Suppose, for
instance, that the mount points you want to list in snmpd.conf are
available as a comma-delimited list communicated by a custom fact
disks.  Off the top of my head, your template might look something
like this:

=== snmpd.conf.erb ===
[... everything else you want in snmpd.conf, as literal text]

% @disks.split(,).each do |disk| -%
disk %= disk %
% end %
=== end snmpd.conf.erb ===

That's not bad, even with the need to split a string to get the
individual disks.

The slightly bigger trick is to communicate the needed disks to the
Puppetmaster, because all template evaluations are performed there.
If you wondered why I couched the example in terms of a custom fact,
then that's why.  Generally speaking, custom facts are pretty easy to
write and distribute; see the docs on Puppetlabs's site, and feel free
to raise questions here.


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] Adding custom config to files

2011-11-18 Thread Brian Gupta
On Fri, Nov 18, 2011 at 4:24 AM, Jonathan van der Watt 
jonathan.vanderw...@gmail.com wrote:

 Good day,

 I'm very new to Puppet and am trying to manage the snmpd daemon and
 associated config on our Red Hat servers using Puppet (for a start).
 My problem is not ensuring that the config file is present or that the
 package is installed. My problem is that the NMS we're using to
 monitor our servers needs to have extra config in the snmpd.conf file
 in order for it to monitor the space usage of mounted disks. Like so:

 disk /
 disk /var/log
 disk /var/lib/mysql

 This needs to be added somewhere in the snmpd.conf file; usually the
 bottom. Now, this is obviously never going to be the same on every
 single server... How would I accomplish this using Puppet? I'm
 guessing that I will need to use a template with some erb code and
 some facts from facter, but I'm just not sure what to do or how the
 code should look. Even if Puppet could ensure that all the disks (/dev/
 shm, /boot etc) are in there that would be fine. We could just tell
 our NMS which disks we want it to monitor. But it has to be in the
 above format!

 Any suggestions would be appreciated!


You could centrally manage the snmp.conf files by class of server, or by
individual host. Or you could go the route of custom facts. Here is a
ticket discussing this: http://projects.puppetlabs.com/issues/2847 (It does
look like if you wait, it will be included in facter.)

J

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




-- 
http://aws.amazon.com/solutions/solution-providers/brandorr/

-- 
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 on windows: File resource problem

2011-11-18 Thread Mohamed Lrhazi
Anybody knows what this error, bellow, means, the target file,
C:/Splunk/etc/system/local/inputs.conf, does exist.
sometimes, if I delete the file, it does actually create it, but never
update it if it exists and changed...

The resource is defined as:



    file { splunk_inputs:        owner   = SYSTEM,        group
= SYSTEM,        mode    = 664,        require =
Exec[install_splunk],        notify = Service[splunk],
path = $splunk_home\\etc\\system\\local\\inputs.conf,
content = template(gu_splunk/inputs.conf.windows.erb),    }
debug: /Stage[main]/Gu_splunk::Windows/File[splunk_inputs]/content:
Executing 'diff -u C:/Splunk/etc/system/local/inputs.conf
C:/Users/ml623/AppData/Local/Temp/
puppet-file2018-3304-81qt4z-0'
C:/Ruby187/lib/ruby/gems/1.8/gems/win32-process-0.6.5/lib/win32/process.rb:889:in
`create'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:336:in `execute_windows'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:374:in `execute'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util/diff.rb:12:in `diff'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/type/file/content.rb:107:in `insync?'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/type/file/content.rb:152:in
`write_temporarily'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/type/file/content.rb:106:in `insync?'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/property.rb:162:in `safe_insync?'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:61:in
`perform_changes'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:60:in
`each'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:60:in
`perform_changes'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:133:in
`evaluate'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:49:in `apply'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:84:in `eval_resource'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:103:in `evaluate'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:476:in `thinmark'
C:/Ruby187/lib/ruby/1.8/benchmark.rb:308:in `realtime'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:475:in `thinmark'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:103:in `evaluate'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:351:in `traverse'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:99:in `evaluate'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:141:in `apply'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/configurer.rb:121:in
`retrieve_and_apply_catalog'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:180:in `benchmark'
C:/Ruby187/lib/ruby/1.8/benchmark.rb:308:in `realtime'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:179:in `benchmark'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/configurer.rb:120:in
`retrieve_and_apply_catalog'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/configurer.rb:151:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent/locker.rb:21:in `lock'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
C:/Ruby187/lib/ruby/1.8/sync.rb:230:in `synchronize'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:103:in `with_client'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:37:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:172:in `call'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:172:in `controlled_run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:35:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:336:in `onetime'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:310:in
`run_command'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:410:in `hook'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:401:in `exit_on_fail'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in `run'
C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:69:in `execute'
C:/Ruby187/bin/puppet:4
err: /Stage[main]/Gu_splunk::Windows/File[splunk_inputs]: Could not
evaluate: CreateProcess() failed: The system cannot find the file
specified.
notice: /Stage[main]/Gu_splunk::Windows/Service[splunk]: Dependency
File[splunk_inputs] has failures: true

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



Re: [Puppet Users] Puppet on windows: File resource problem

2011-11-18 Thread Josh Cooper
Hi Mohamed,

This is issue https://projects.puppetlabs.com/issues/10417 Windows doesn't
have a 'diff.exe' command by default.

You can work around this by setting show_diff = false or by specifying
appropriate values for 'diff' and 'diff_args'

Josh

On Fri, Nov 18, 2011 at 1:42 PM, Mohamed Lrhazi lrh...@gmail.com wrote:

 Anybody knows what this error, bellow, means, the target file,
 C:/Splunk/etc/system/local/inputs.conf, does exist.
 sometimes, if I delete the file, it does actually create it, but never
 update it if it exists and changed...

 The resource is defined as:



 file { splunk_inputs:owner   = SYSTEM,group
 = SYSTEM,mode= 664,require =
 Exec[install_splunk],notify = Service[splunk],
 path = $splunk_home\\etc\\system\\local\\inputs.conf,
 content = template(gu_splunk/inputs.conf.windows.erb),}
 debug: /Stage[main]/Gu_splunk::Windows/File[splunk_inputs]/content:
 Executing 'diff -u C:/Splunk/etc/system/local/inputs.conf
 C:/Users/ml623/AppData/Local/Temp/
 puppet-file2018-3304-81qt4z-0'

 C:/Ruby187/lib/ruby/gems/1.8/gems/win32-process-0.6.5/lib/win32/process.rb:889:in
 `create'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:336:in `execute_windows'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:374:in `execute'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util/diff.rb:12:in `diff'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/type/file/content.rb:107:in
 `insync?'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/type/file/content.rb:152:in
 `write_temporarily'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/type/file/content.rb:106:in
 `insync?'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/property.rb:162:in `safe_insync?'

 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:61:in
 `perform_changes'

 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:60:in
 `each'

 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:60:in
 `perform_changes'

 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:133:in
 `evaluate'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:49:in `apply'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:84:in
 `eval_resource'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:103:in `evaluate'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:476:in `thinmark'
 C:/Ruby187/lib/ruby/1.8/benchmark.rb:308:in `realtime'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:475:in `thinmark'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:103:in `evaluate'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:351:in `traverse'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:99:in `evaluate'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:141:in `apply'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/configurer.rb:121:in
 `retrieve_and_apply_catalog'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:180:in `benchmark'
 C:/Ruby187/lib/ruby/1.8/benchmark.rb:308:in `realtime'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:179:in `benchmark'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/configurer.rb:120:in
 `retrieve_and_apply_catalog'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/configurer.rb:151:in `run'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent/locker.rb:21:in `lock'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
 C:/Ruby187/lib/ruby/1.8/sync.rb:230:in `synchronize'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:103:in `with_client'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:37:in `run'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:172:in `call'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:172:in
 `controlled_run'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:35:in `run'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:336:in
 `onetime'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:310:in
 `run_command'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in `run'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:410:in `hook'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in `run'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:401:in
 `exit_on_fail'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in `run'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:69:in
 `execute'
 C:/Ruby187/bin/puppet:4
 err: /Stage[main]/Gu_splunk::Windows/File[splunk_inputs]: Could not
 evaluate: CreateProcess() failed: The system cannot find the file
 specified.
 notice: /Stage[main]/Gu_splunk::Windows/Service[splunk]: Dependency
 File[splunk_inputs] has failures: true

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe 

[Puppet Users] Re: define-type resources default parameters not available under scope.catalog.resources

2011-11-18 Thread jcbollinger


On Nov 18, 9:03 am, Theo Cabrerizo Diem d...@carpediem.sh wrote:
[...]

 define foo ($myparam = Hello) {
   notice(inline_template(%= scope.findresource('Foo[${name}]')['myparam']
 %))}

 node 'default' {
   foo { 'test1': }
   foo { 'test2': }
   foo { 'test3': myparam = World, }

 }

 This will produce:
 notice: Scope(Foo[test1]): Hello
 notice: Scope(Foo[test2]): Hello
 notice: Scope(Foo[test3]): World

 Which means my problem is accessing the scope where a given instance of a
 resource is located.


Naturally, a template called from inside the defined type's body has
access to the instance's parameter values, including defaulted ones.
Most people would just use them as simple variables, however, rather
than looking them up via the scope object.  In fact, I'm inclined to
call 'bug' on this one: it should never be the case that %=
scope.findresource('Foo[bar]')['myparam'] % can be evaluated without
error to return two different values in the same catalog run.

In any case, I don't see why you suppose that the values you want will
remain accessible outside the definition body.  It was worth a try,
certainly, but if the lookup you have already attempted does not do
the job then I can't imagine what would.

 [...]
 I know the code above is useless as it is, but my point is to be able to
 iterate through given resources of a node in a template, allowing great
 flexibility inside a template, without the artifacts that concat module
 generates (and its drawbacks).


I understand why you want to do what you ask, but I just don't think
Puppet supports it.  Feel free to submit a feature request.


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: Collecting resources from exporting node

2011-11-18 Thread jcbollinger


On Nov 18, 8:04 am, Martijn Grendelman mart...@iphion.nl wrote:
 No one? Is my question not clear (TL;DR, perhaps?), or doesn't anyone have
 an answer?


As far as I know, nodes are supposed to be able to collect their own
exported resources.  If that's not working for you then perhaps Puppet
has a regression in that area.  You could consider filing a bug
ticket, but I don't have any suggestion for making it work in the
short term.  Unless you're prepared to fix it yourself -- PuppetLabs
loves patches, as long as you'll sign their CLA.


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] Puppet with active/passive clusters

2011-11-18 Thread Denmat
Hi, 

Puppet on its own is probably not your answer. Look at how Puppet combines with 
MCollective. You'll probably need a combo of both here.

Other than that I can't help further, sorry.

Den

On 18/11/2011, at 23:57, Davide Ferrari davide.ferr...@atrapalo.com wrote:

 Hi
 
 I've been banging my head against this problem and it seems that I
 cannot find a clean, elegant and working solution.
 
 Scenario: heartbeat v1 (well, actually v2 in compatibility mode) cluster
 of 2 nodes with a shared disk and a virtual IP.
 I need to install a service - MySQL - via Puppet that will have it's
 data on the shared disk.
 
 I've found, at least, these problems:
 
 1) on first install, initial mysql data on the passive node will be
 local only. 
 2) on next run, Puppet will have no idea of the cluster status, so if I
 define new mysql users, it will try to apply it on the passive node
 (where no mysql is running), failing.
 3) heartbeat will fail to start if the resource mysql is defined, but
 Mysql should be installed AFTER configuring heartbeat (active host
 should mount the shared disk). So if while creating the role for the
 first time I can do things step by step but once finished, if I need to
 reinstall from scratch, it should work
 
 Ok, maybe the first 2 points are not a big deal [1] anyway but I wonder
 if anyone had found a better solution than just living with errors on
 the passive node (I have a 0 puppet errors on puppetrun policy), but the
 third point is a bit harder for me.
 
 TIA
 
 [1] I thought about a custom facter detecting if it's an
 active/passivehost  or no HB cluster at all, but I'd like some other
 opinions.
 
 
 -- 
 Davide Ferrari
 Senior System Administrator
 Atrapalo S.L.
 
 -- 
 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] Using regex to ensure package version

2011-11-18 Thread Denmat
Hi, 

you can also use puppet to 'pin' the version by managing the apt or yum configs 
on the host. You should find the details in the man pages on how to do it. See 
if that is what you're looking for?

Den

On 19/11/2011, at 6:37, Jacob Helwig ja...@puppetlabs.com wrote:

 On 2011-11-18 08:37 , Matt wrote:
 I'm trying to use something like this...
 
 package { blah: ensure = 1.2.3* }
 
 ...and I know that doesn't work because it looks for a package
 literally with that value 1.2.3*.  What I want is to say, install
 the latest package in the 1.2.3 branch but don't automatically upgrade
 to anything later than that.
 
 e.g. 1.2.3-01, 1.2.3-05 are fine if I find them in the REPObut not
 1.2.4 or later.
 
 
 I'm sure there's a way to do this with a regex or something, but I've
 not been able to find any examples in my searches so far.
 
 Thanks,
 Matt
 
 
 Puppet doesn't have a way to do that.  The way the package type 
 providers are setup they will always compare literal strings.
 
 Typically how people have handled this is by ensuring 'latest', but
 managing the repository that the machine will pull the packages from so
 that it will only ever contain something in the 1.2.3 series.
 
 -- 
 Jacob Helwig
 http://about.me/jhelwig
 

-- 
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 Windows: test if non-MSI package already installed

2011-11-18 Thread Andrew Ring

Thank you.


On 11/11/2011 10:30 AM, Josh Cooper wrote:

Hi Andrew,

On Fri, Nov 11, 2011 at 9:19 AM, ar...@berkeley.edu
mailto:ar...@berkeley.edu wrote:

Hello Puppet Cohorts,

I wish to install programs on Windows that do not use the MSI installer.

After finding a guide on-line for silencing most installers
(http://unattended.sourceforge.net/installers.php) I feel confident
I can
write a short script for Puppet to exec on my hosts to silently
install
most of what I need.

What I can't decide on a best way to test if the software has already
been installed.  I am likely off in the weeds and could use some help
getting back.

Here are what I think my choices are, I make no claim to their sanity.
  0.) I think using the package provider in puppet will not work
if the
program installed did not use the MSI installer.(?)


Correct, there is only an 'msi' package provider.

  1.) Check for existence of a file known to be installed from the
relevant
installer.  If the file is found, the script exits.
  2.) Some method to check the registry at

SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products
for the existence of the program.
  3.) Run Puppet Agent less often on the client so it is not such a big
deal.


If the packages are well-behaving they should follow these guidelines
during install/uninstall[1]. In particular, they should add the
appropriate registry entries under:

   HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall

Josh

[1] http://msdn.microsoft.com/en-us/library/ms954376.aspx

--
Josh Cooper
Developer, Puppet Labs

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


--
===
Andrew Ring
System Administrator
Kuriyan Laboratory
http://jkweb.qb3.berkeley.edu/
Doudna Laboratory
http://rna.berkeley.edu/
University of California, Berkeley
Office:
542 Stanley Hall
Shipping:
176 Stanley Hall, QB3
Berkeley, CA 94720-3220
tel: (510) 643 0166
fax: (510) 643 2352


--
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 on windows: File resource problem

2011-11-18 Thread Mohamed Lrhazi
Thanks a lot Josh.

On Fri, Nov 18, 2011 at 5:13 PM, Josh Cooper j...@puppetlabs.com wrote:
 Hi Mohamed,
 This is issue https://projects.puppetlabs.com/issues/10417 Windows doesn't
 have a 'diff.exe' command by default.
 You can work around this by setting show_diff = false or by specifying
 appropriate values for 'diff' and 'diff_args'
 Josh

 On Fri, Nov 18, 2011 at 1:42 PM, Mohamed Lrhazi lrh...@gmail.com wrote:

 Anybody knows what this error, bellow, means, the target file,
 C:/Splunk/etc/system/local/inputs.conf, does exist.
 sometimes, if I delete the file, it does actually create it, but never
 update it if it exists and changed...

 The resource is defined as:



     file { splunk_inputs:        owner   = SYSTEM,        group
 = SYSTEM,        mode    = 664,        require =
 Exec[install_splunk],        notify = Service[splunk],
 path = $splunk_home\\etc\\system\\local\\inputs.conf,
 content = template(gu_splunk/inputs.conf.windows.erb),    }
 debug: /Stage[main]/Gu_splunk::Windows/File[splunk_inputs]/content:
 Executing 'diff -u C:/Splunk/etc/system/local/inputs.conf
 C:/Users/ml623/AppData/Local/Temp/
 puppet-file2018-3304-81qt4z-0'

 C:/Ruby187/lib/ruby/gems/1.8/gems/win32-process-0.6.5/lib/win32/process.rb:889:in
 `create'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:336:in `execute_windows'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:374:in `execute'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util/diff.rb:12:in `diff'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/type/file/content.rb:107:in
 `insync?'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/type/file/content.rb:152:in
 `write_temporarily'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/type/file/content.rb:106:in
 `insync?'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/property.rb:162:in `safe_insync?'

 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:61:in
 `perform_changes'

 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:60:in
 `each'

 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:60:in
 `perform_changes'

 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction/resource_harness.rb:133:in
 `evaluate'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:49:in `apply'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:84:in
 `eval_resource'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:103:in `evaluate'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:476:in `thinmark'
 C:/Ruby187/lib/ruby/1.8/benchmark.rb:308:in `realtime'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:475:in `thinmark'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:103:in `evaluate'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:351:in `traverse'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/transaction.rb:99:in `evaluate'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:141:in
 `apply'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/configurer.rb:121:in
 `retrieve_and_apply_catalog'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:180:in `benchmark'
 C:/Ruby187/lib/ruby/1.8/benchmark.rb:308:in `realtime'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util.rb:179:in `benchmark'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/configurer.rb:120:in
 `retrieve_and_apply_catalog'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/configurer.rb:151:in `run'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent/locker.rb:21:in `lock'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
 C:/Ruby187/lib/ruby/1.8/sync.rb:230:in `synchronize'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:103:in `with_client'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:37:in `run'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:172:in `call'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:172:in
 `controlled_run'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/agent.rb:35:in `run'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:336:in
 `onetime'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:310:in
 `run_command'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in `run'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:410:in `hook'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in `run'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:401:in
 `exit_on_fail'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in `run'
 C:/Ruby187/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:69:in
 `execute'
 C:/Ruby187/bin/puppet:4
 err: /Stage[main]/Gu_splunk::Windows/File[splunk_inputs]: Could not
 evaluate: CreateProcess() failed: The system cannot find the file
 specified.
 notice: /Stage[main]/Gu_splunk::Windows/Service[splunk]: Dependency
 File[splunk_inputs] has failures: true

 --
 You received this message because you are subscribed to the Google Groups
 Puppet 

Re: [Puppet Users] msi package provider: Invalid parameter install_options

2011-11-18 Thread Josh Cooper
Hi Mohamed,

On Thu, Nov 17, 2011 at 8:10 PM, Mohamed Lrhazi lrh...@gmail.com wrote:

 C:\Users\ml623puppet --version
 2.7.7


 Puppet complains about a package resource I am trying to use saying:

  Invalid parameter install_options

 The resource is defined as:

 package { splunk:
 name = $gu_splunk::client::splunk_package,
 provider = 'msi',
 ensure = installed,
 source = 'C:\\TEMP\\splunk-4.2.4-110225-x86-release.msi',
 install_options = { 'INSTALLDIR' = 'C:\\splunk' },
 notify = Exec[enable_autostart],
 }


I was able to install the same version of splunk on Windows 2003 (x64):

pre
C:\ puppet apply z:\work\demo\splunk.pp --debug --verbose --trace
...
debug: Package[splunk](provider=msi): Executing 'msiexec.exe /qn /norestart
/i C:\\TEST\\splunk-4.2.4-110225-x64-release.msi INSTALLDIR=C:\\splunk'
notice: /Stage[main]//Package[splunk]/ensure: created
...
/pre

Can you use the same command above when installing and let me know what the
error is?

What's strange is that puppet is reporting install_options is an invalid
parameter. It is almost as though you have an older
lib/puppet/type/package.rb and/or lib/puppet/provider/package/msi.rb.

Josh
-- 
Josh Cooper
Developer, Puppet Labs

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



Re: [Puppet Users] Puppet master sending old information

2011-11-18 Thread Denmat
Hi,

Sounds like caching - or DNS pointing to old ldap server... or something like 
that. 

What's your setup like? You running puppet through a frontend or using the 
webrick server? What version of puppet? Doing ldapsearch on the master return 
the right results?

I would stop ever related service, start with making sure ldap is right and 
then move on from there with running puppet via puppetmasterd binary.

Sorry cant be of much other than that.

Den

On 19/11/2011, at 2:40, Zico mailz...@gmail.com wrote:

 Hi, 
 
 I have changed the ldapbase of master section in my puppetmaster's 
 puppet.conf file, but the issue is, yet puppetmaster is sending previous 
 ldapbase information, which information is out dated now. 
 
 I want to inform that, I have not installed or configured storeconfigs, so 
 there is actually no chance of my puppetmaster to use stored configuration. 
 
 Any kind of help of hint is highly appreciated.
 
 -- 
 Best,
 Zico
 -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.

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



Re: [Puppet Users] Re: Variables inside node definition

2011-11-18 Thread Gonzalo Servat
On Sat, Nov 19, 2011 at 12:58 AM, jcbollinger john.bollin...@stjude.orgwrote:

 [..snip..]



You have a great use case here for external data: instead of using a
 node variable to communicate the machine's purpose, you could instead
 have class motd look it up via extlookup() or hiera.


Thanks for replying John. I hadn't looked into extlookup() until you
mentioned this. It's just what I need! I also have a custom facter variable
that defines which data centre the server is in, which fits in nicely with
extlookup() to look into a dc-specific CSV file.

I'm not using ENC as I do call a few defines from node definitions, and I
don't think there is a way of calling defines from a YAML node definition?

Thanks again for the pointer!

- Gonzalo

-- 
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] msi package provider: Invalid parameter install_options

2011-11-18 Thread Mohamed Lrhazi
I'll try the msi args you have...  my puppet and facter both directly
from github!


On Fri, Nov 18, 2011 at 6:33 PM, Josh Cooper j...@puppetlabs.com wrote:
 Hi Mohamed,
 On Thu, Nov 17, 2011 at 8:10 PM, Mohamed Lrhazi lrh...@gmail.com wrote:

 C:\Users\ml623puppet --version
 2.7.7


 Puppet complains about a package resource I am trying to use saying:

  Invalid parameter install_options

 The resource is defined as:

 package { splunk:
     name = $gu_splunk::client::splunk_package,
     provider = 'msi',
     ensure = installed,
     source = 'C:\\TEMP\\splunk-4.2.4-110225-x86-release.msi',
     install_options = { 'INSTALLDIR' = 'C:\\splunk' },
     notify = Exec[enable_autostart],
 }

 I was able to install the same version of splunk on Windows 2003 (x64):
 pre
 C:\ puppet apply z:\work\demo\splunk.pp --debug --verbose --trace
 ...
 debug: Package[splunk](provider=msi): Executing 'msiexec.exe /qn /norestart
 /i C:\\TEST\\splunk-4.2.4-110225-x64-release.msi INSTALLDIR=C:\\splunk'
 notice: /Stage[main]//Package[splunk]/ensure: created
 ...
 /pre
 Can you use the same command above when installing and let me know what the
 error is?
 What's strange is that puppet is reporting install_options is an invalid
 parameter. It is almost as though you have an older
 lib/puppet/type/package.rb and/or lib/puppet/provider/package/msi.rb.
 Josh
 --
 Josh Cooper
 Developer, Puppet Labs

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


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



Re: [Puppet Users] msi package provider: Invalid parameter install_options

2011-11-18 Thread Mohamed Lrhazi
Actually hold on.. am not sure what you are asking me to do.

Using this Exec works fine for me:

$splunk_home = C:\\Splunk
$splunk_pkg_source = C:\\TEMP\\splunkforwarder-4.2.4-110225-x86-release.msi
$splunk_install_log = C:\\TEMP\\splunk_install.log

exec { install_splunk:
command = msiexec.exe /i $splunk_pkg_source
LAUNCHSPLUNK=0 AGREETOLICENSE=Yes INSTALLDIR=$splunk_home
LOGON_USERNAME=$splunk_home /lv $splunk_install_log /quiet,
timeout = 120,
creates = $splunk_home\\bin\\splunk.exe,
notify = Exec[reset_password],
}

The Package resource indeed just says it does not like
install_options parameter!

Thanks,
Mohamed.
On Fri, Nov 18, 2011 at 6:33 PM, Josh Cooper j...@puppetlabs.com wrote:
 Hi Mohamed,
 On Thu, Nov 17, 2011 at 8:10 PM, Mohamed Lrhazi lrh...@gmail.com wrote:

 C:\Users\ml623puppet --version
 2.7.7


 Puppet complains about a package resource I am trying to use saying:

  Invalid parameter install_options

 The resource is defined as:

 package { splunk:
     name = $gu_splunk::client::splunk_package,
     provider = 'msi',
     ensure = installed,
     source = 'C:\\TEMP\\splunk-4.2.4-110225-x86-release.msi',
     install_options = { 'INSTALLDIR' = 'C:\\splunk' },
     notify = Exec[enable_autostart],
 }

 I was able to install the same version of splunk on Windows 2003 (x64):
 pre
 C:\ puppet apply z:\work\demo\splunk.pp --debug --verbose --trace
 ...
 debug: Package[splunk](provider=msi): Executing 'msiexec.exe /qn /norestart
 /i C:\\TEST\\splunk-4.2.4-110225-x64-release.msi INSTALLDIR=C:\\splunk'
 notice: /Stage[main]//Package[splunk]/ensure: created
 ...
 /pre
 Can you use the same command above when installing and let me know what the
 error is?
 What's strange is that puppet is reporting install_options is an invalid
 parameter. It is almost as though you have an older
 lib/puppet/type/package.rb and/or lib/puppet/provider/package/msi.rb.
 Josh
 --
 Josh Cooper
 Developer, Puppet Labs

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


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



Re: [Puppet Users] msi package provider: Invalid parameter install_options

2011-11-18 Thread Josh Cooper
Hi Mohamed,

On Fri, Nov 18, 2011 at 4:24 PM, Mohamed Lrhazi lrh...@gmail.com wrote:

 Actually hold on.. am not sure what you are asking me to do.


Can you run this command and sent the output back:

C:\ puppet apply manifest --debug --verbose --trace

Thanks,
Josh
-- 
Josh Cooper
Developer, Puppet Labs

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



Re: [Puppet Users] msi package provider: Invalid parameter install_options

2011-11-18 Thread Mohamed Lrhazi
Sorry I have not used apply before... I tried this, but does seem to
be right:  http://paste.ubuntu.com/742820/



On Fri, Nov 18, 2011 at 7:30 PM, Josh Cooper j...@puppetlabs.com wrote:
 Hi Mohamed,
 On Fri, Nov 18, 2011 at 4:24 PM, Mohamed Lrhazi lrh...@gmail.com wrote:

 Actually hold on.. am not sure what you are asking me to do.


 Can you run this command and sent the output back:
 C:\ puppet apply manifest --debug --verbose --trace
 Thanks,
 Josh
 --
 Josh Cooper
 Developer, Puppet Labs

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


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



Re: [Puppet Users] msi package provider: Invalid parameter install_options

2011-11-18 Thread Mohamed Lrhazi
OK. I figured how to use apply, but it would not reproduce the
problem. the msiexec actually executes!

This module though, http://paste.ubuntu.com/742840/, causes the error:
http://paste.ubuntu.com/742841/

Thanks a lot,
Mohamed.

On Fri, Nov 18, 2011 at 8:05 PM, Mohamed Lrhazi lrh...@gmail.com wrote:
 Sorry I have not used apply before... I tried this, but does seem to
 be right:  http://paste.ubuntu.com/742820/



 On Fri, Nov 18, 2011 at 7:30 PM, Josh Cooper j...@puppetlabs.com wrote:
 Hi Mohamed,
 On Fri, Nov 18, 2011 at 4:24 PM, Mohamed Lrhazi lrh...@gmail.com wrote:

 Actually hold on.. am not sure what you are asking me to do.


 Can you run this command and sent the output back:
 C:\ puppet apply manifest --debug --verbose --trace
 Thanks,
 Josh
 --
 Josh Cooper
 Developer, Puppet Labs

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



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



[Puppet Users] When will Puppet officially support Ruby 1.9.2+

2011-11-18 Thread tetsu
Hello everyone,

Ruby 1.8.7 is EOS now. So, when will Puppet become Ruby 1.9.2+
compatible?

I am considering to deploy Puppet on a large hosts of servers. If Ruby
1.9.2 cannot be supported, I have to turn to Chef.

Best regards,
Tetsu

-- 
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] When will Puppet officially support Ruby 1.9.2+

2011-11-18 Thread James Turnbull
On Nov 18, 2011 5:57 PM, tetsutetsu@gmail.com wrote:

 Hello everyone,

 Ruby 1.8.7 is EOS now. So, when will Puppet become Ruby 1.9.2+
 compatible?

 I am considering to deploy Puppet on a large hosts of servers. If Ruby
 1.9.2 cannot be supported, I have to turn to Chef.

Puppet has supported Ruby 1.9.2 since 2.7.0.

Regards

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.



[Puppet Users] Facter Windows: domain is none

2011-11-18 Thread Mohamed Lrhazi
I could swear this worked fine earlier.. Now facter, and hence puppet,
do not see the domain name anymore:

What could cause this?

C:\Tempfacter --version
1.6.2

C:\Tempfacter | findstr kernel
kernel = windows
kernelmajversion = 6.1
kernelrelease = 6.1.7601
kernelversion = 6.1.7601

C:\Tempfacter fqdn
NCS-VDI-05.none

C:\Tempfacter hostname
NCS-VDI-05

C:\Tempfacter domain
none

C:\Temp

Thanks a lot,
Mohamed.

-- 
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] msi package provider: Invalid parameter install_options

2011-11-18 Thread Nan Liu
On Fri, Nov 18, 2011 at 8:29 PM, Mohamed Lrhazi lrh...@gmail.com wrote:
 OK. I figured how to use apply, but it would not reproduce the
 problem. the msiexec actually executes!

 This module though, http://paste.ubuntu.com/742840/, causes the error:
 http://paste.ubuntu.com/742841/

What's the version of Puppet on your master?

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.



Re: [Puppet Users] msi package provider: Invalid parameter install_options

2011-11-18 Thread Nan Liu
MSI wasn't added until 2.7.4, so error occurs during compilation on
master, and you want the master version = agent version.

Nan

On Fri, Nov 18, 2011 at 9:05 PM, Mohamed Lrhazi lrh...@gmail.com wrote:
 I just thought about that... It is: 2.7.1


 On Fri, Nov 18, 2011 at 9:03 PM, Nan Liu n...@puppetlabs.com wrote:
 On Fri, Nov 18, 2011 at 8:29 PM, Mohamed Lrhazi lrh...@gmail.com wrote:
 OK. I figured how to use apply, but it would not reproduce the
 problem. the msiexec actually executes!

 This module though, http://paste.ubuntu.com/742840/, causes the error:
 http://paste.ubuntu.com/742841/

 What's the version of Puppet on your master?

 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.



 --
 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] msi package provider: Invalid parameter install_options

2011-11-18 Thread Mohamed Lrhazi
Cool. Thanks guys.

On Fri, Nov 18, 2011 at 9:18 PM, Nan Liu n...@puppetlabs.com wrote:
 MSI wasn't added until 2.7.4, so error occurs during compilation on
 master, and you want the master version = agent version.

 Nan

 On Fri, Nov 18, 2011 at 9:05 PM, Mohamed Lrhazi lrh...@gmail.com wrote:
 I just thought about that... It is: 2.7.1


 On Fri, Nov 18, 2011 at 9:03 PM, Nan Liu n...@puppetlabs.com wrote:
 On Fri, Nov 18, 2011 at 8:29 PM, Mohamed Lrhazi lrh...@gmail.com wrote:
 OK. I figured how to use apply, but it would not reproduce the
 problem. the msiexec actually executes!

 This module though, http://paste.ubuntu.com/742840/, causes the error:
 http://paste.ubuntu.com/742841/

 What's the version of Puppet on your master?

 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.



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



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



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



[Puppet Users] Installing Oracle

2011-11-18 Thread Douglas Garstang
This is pretty ugly.

I'm using puppet to install Oracle, ie an exec{} wrapped around:

/u01/oracle_extract/linux.x64_11gR2_database/database/runInstaller
-silent -responseFile /etc/oracle_response.rsp

The problem is that the damn installer backgrounds itself and returns
control to the shell. I tried putting the above command in a script,
followed by a wait command, but that didn't help. Has anyone got any
ideas how I can automate the installation of Oracle with puppet?

I need to know when the install is finished, because there's
additional commands that need to be run by root, as advised by the
installer, when it's complete.

Doug.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-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] Installing Oracle

2011-11-18 Thread Mohamed Lrhazi
Maybe you need something like this:
http://www.oracle-base.com/articles/misc/OuiSilentInstallations.php


On Fri, Nov 18, 2011 at 9:23 PM, Douglas Garstang
doug.garst...@gmail.com wrote:
 This is pretty ugly.

 I'm using puppet to install Oracle, ie an exec{} wrapped around:

 /u01/oracle_extract/linux.x64_11gR2_database/database/runInstaller
 -silent -responseFile /etc/oracle_response.rsp

 The problem is that the damn installer backgrounds itself and returns
 control to the shell. I tried putting the above command in a script,
 followed by a wait command, but that didn't help. Has anyone got any
 ideas how I can automate the installation of Oracle with puppet?

 I need to know when the install is finished, because there's
 additional commands that need to be run by root, as advised by the
 installer, when it's complete.

 Doug.

 --
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-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] When will Puppet officially support Ruby 1.9.2+

2011-11-18 Thread UEDA Hiroyuki
http://www.ruby-lang.org/en/news/2011/10/06/plans-for-1-8-7/

EoS for Ruby 1.8.7 is July 2013. It doesn't come yet.


2011/11/19 tetsu tetsu@gmail.com:
 Hello everyone,

 Ruby 1.8.7 is EOS now. So, when will Puppet become Ruby 1.9.2+
 compatible?

 I am considering to deploy Puppet on a large hosts of servers. If Ruby
 1.9.2 cannot be supported, I have to turn to Chef.

 Best regards,
 Tetsu

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





-- 
UEDA BSD mad Hiroyuki bsd...@gmail.com

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