Re: [Puppet Users] RHEL 6 Optional channel

2011-06-14 Thread Steven Acres
On Mon, Jun 13, 2011 at 10:31 PM, Len Rugen lenru...@gmail.com wrote:

 It looks like all of our RHEL 6 systems now need to connect to the RHN
 Optional Channel.  (puppet, ruby vs. selinux deps)

 Is there a way to do that with a script without having to enter RHN userid
 and password?   Is there a way to add a channel during kickstart?

 Thanks

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


Hi Len,

https://access.redhat.com/kb/docs/DOC-2475

-- 
Cheers,

Steven
---
Steven Acres
UNIX/Linux System Administrator

-- 
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: how to do conditional check?

2011-06-14 Thread Sans
Thanks Matthew!
I think that way it's better and simpler. But that makes me asking:
How to check if Torque (or any package in question) is installed or
not?
Another question: How write the template file to multiply the no. of
CPU-core by 1.2 (or whatever)?
cheers!!


On Jun 14, 4:28 am, Matthew Black mjbl...@gmail.com wrote:
 Sounds like what you want to do is to create a fact to find out that status
 of whether torque is installed or not.

 As for the configuration file, without better understanding the contents of
 the file, I would in conjunction with the fact do a file resource surrounded
 by an if statement that utilizes the fact. If its something that is pretty
 much the same across the board except for some values, like host names or
 what not, then you could use templates to create the file and keep it that
 way.

 so for example

 if $torque_installed == true {
      file { '/var/torque/mom_priv/config':
          ensure = present,
          content = template(...)
       }







 }
 On Mon, Jun 13, 2011 at 8:00 PM, Sans r.santanu@gmail.com wrote:
  Well, the file I mention is actually one of the Torque (formerly PBS
  batch system) config file (location: /var/torque/mom_priv/config),
  which is auto generated by yaim but the thing is: if the file is
  already there yaim won't touch it. Let's just say that I don't want
  yaim to create this file (it messes it up very often and ended up with
  wrong value) but wanna make sure that the file is in correct shape,
  otherwise jobs won't run properly. On the other hand, that file
  doesn't mean anything at all, if Torque is not install in the first
  place. That's why I want to put that check in. Cheers!!

  On Jun 13, 6:50 pm, Matthew Black mjbl...@gmail.com wrote:
   After reading the other responses my question to you is what exactly are
  you
   attempting to do?

  --
  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] writing custom facts

2011-06-14 Thread Sans
Dear all,

I see that writing a custom-fact with single line of command is not
that tough, like this:


Facter.add(num_core) do
setcode do
%x{/bin/grep siblings /proc/cpuinfo | uniq | cut -d  -f
2}.chomp
end
end


But that's not enough for me. What I actually need to do is something
like this:

dd_code=`which dmidecode`
n1=`${dd_code} -t processor | grep -c Socket Designation`
n2=`${dd_code} -t processor | grep Core Count | uniq | cut -d  -
f3`
n=$(($n1*$n2))


How can I put this in the fact? Cheers!!

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

2011-06-14 Thread Peter Bukowinski
One option is to save dd_code lines as a separate script, have puppet ensure 
its presence on each machine with a file statement, and then call it by 
explicit path in the Facter.add block.

--
Peter (from phone)

On Jun 14, 2011, at 7:39 AM, Sans r.santanu@gmail.com wrote:

 Dear all,
 
 I see that writing a custom-fact with single line of command is not
 that tough, like this:
 
 
 Facter.add(num_core) do
setcode do
%x{/bin/grep siblings /proc/cpuinfo | uniq | cut -d  -f
 2}.chomp
end
 end
 
 
 But that's not enough for me. What I actually need to do is something
 like this:
 
 dd_code=`which dmidecode`
 n1=`${dd_code} -t processor | grep -c Socket Designation`
 n2=`${dd_code} -t processor | grep Core Count | uniq | cut -d  -
 f3`
 n=$(($n1*$n2))
 
 
 How can I put this in the fact? Cheers!!
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-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: writing custom facts

2011-06-14 Thread Sans
Surely, I can do /usr/sbin/dmidecode -t processor | grep -c Socket
Designation etc. - that's not a problem. My question is: How to do
the rest in the fact? Anyone one care to make a sample script out of
that, which will be lot easier for me to understand how this thing
works. Cheers!!


On Jun 14, 12:46 pm, Peter Bukowinski pmb...@gmail.com wrote:
 One option is to save dd_code lines as a separate script, have puppet ensure 
 its presence on each machine with a file statement, and then call it by 
 explicit path in the Facter.add block.

 --
 Peter (from phone)

 On Jun 14, 2011, at 7:39 AM, Sans r.santanu@gmail.com wrote:







  Dear all,

  I see that writing a custom-fact with single line of command is not
  that tough, like this:

  
  Facter.add(num_core) do
     setcode do
         %x{/bin/grep siblings /proc/cpuinfo | uniq | cut -d  -f
  2}.chomp
     end
  end
  

  But that's not enough for me. What I actually need to do is something
  like this:

  dd_code=`which dmidecode`
  n1=`${dd_code} -t processor | grep -c Socket Designation`
  n2=`${dd_code} -t processor | grep Core Count | uniq | cut -d  -
  f3`
  n=$(($n1*$n2))

  How can I put this in the fact? Cheers!!

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

-- 
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: writing custom facts

2011-06-14 Thread Denmat
Is this what your after?

http://projects.puppetlabs.com/projects/1/wiki/Dmidecode_Patterns

Cheers,
Den

On 14/06/2011, at 22:03, Sans r.santanu@gmail.com wrote:

 Surely, I can do /usr/sbin/dmidecode -t processor | grep -c Socket
 Designation etc. - that's not a problem. My question is: How to do
 the rest in the fact? Anyone one care to make a sample script out of
 that, which will be lot easier for me to understand how this thing
 works. Cheers!!
 
 
 On Jun 14, 12:46 pm, Peter Bukowinski pmb...@gmail.com wrote:
 One option is to save dd_code lines as a separate script, have puppet ensure 
 its presence on each machine with a file statement, and then call it by 
 explicit path in the Facter.add block.
 
 --
 Peter (from phone)
 
 On Jun 14, 2011, at 7:39 AM, Sans r.santanu@gmail.com wrote:
 
 
 
 
 
 
 
 Dear all,
 
 I see that writing a custom-fact with single line of command is not
 that tough, like this:
 
 
 Facter.add(num_core) do
setcode do
%x{/bin/grep siblings /proc/cpuinfo | uniq | cut -d  -f
 2}.chomp
end
 end
 
 
 But that's not enough for me. What I actually need to do is something
 like this:
 
 dd_code=`which dmidecode`
 n1=`${dd_code} -t processor | grep -c Socket Designation`
 n2=`${dd_code} -t processor | grep Core Count | uniq | cut -d  -
 f3`
 n=$(($n1*$n2))
 
 How can I put this in the fact? Cheers!!
 
 --
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group 
 athttp://groups.google.com/group/puppet-users?hl=en.
 
 -- 
 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: writing custom facts

2011-06-14 Thread Ken Barber
Not pretty - but hacking up your example to work in ruby should be
something like:

Facter.add(num_core) do
  setcode do
dd_code=`which dmidecode`.chomp
n1=`#{dd_code} -t processor | grep -c Socket Designation`.chomp.to_i
n2=`#{dd_code} -t processor | grep Core Count | uniq | awk
'{print $3}'`.chomp.to_i
n1*n2
  end
end

The key things here are the chomps to remove newlines, the #{} format
for variable interpolation in strings and the to_i to get integers.
Also not the n1*n2 at the end - this will return the result (no need
for return unless you want it).

ken.

On Tue, Jun 14, 2011 at 1:03 PM, Sans r.santanu@gmail.com wrote:
 Surely, I can do /usr/sbin/dmidecode -t processor | grep -c Socket
 Designation etc. - that's not a problem. My question is: How to do
 the rest in the fact? Anyone one care to make a sample script out of
 that, which will be lot easier for me to understand how this thing
 works. Cheers!!


 On Jun 14, 12:46 pm, Peter Bukowinski pmb...@gmail.com wrote:
 One option is to save dd_code lines as a separate script, have puppet ensure 
 its presence on each machine with a file statement, and then call it by 
 explicit path in the Facter.add block.

 --
 Peter (from phone)

 On Jun 14, 2011, at 7:39 AM, Sans r.santanu@gmail.com wrote:







  Dear all,

  I see that writing a custom-fact with single line of command is not
  that tough, like this:

  
  Facter.add(num_core) do
     setcode do
         %x{/bin/grep siblings /proc/cpuinfo | uniq | cut -d  -f
  2}.chomp
     end
  end
  

  But that's not enough for me. What I actually need to do is something
  like this:

  dd_code=`which dmidecode`
  n1=`${dd_code} -t processor | grep -c Socket Designation`
  n2=`${dd_code} -t processor | grep Core Count | uniq | cut -d  -
  f3`
  n=$(($n1*$n2))

  How can I put this in the fact? Cheers!!

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

 --
 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: writing custom facts

2011-06-14 Thread Sans
Very useful info Ken - those are the couple of things I was actually
looking for. It'll certainly get me going.
One more thing, how do I do if..else.. thing in there? Like:

if [ $n1 == $n2 ]; then
echo something here
elif [  $n2 == $(($n1*2)) ]; then
echo something else here
.
.
fi

Cheers!!

On Jun 14, 1:42 pm, Ken Barber k...@puppetlabs.com wrote:
 Not pretty - but hacking up your example to work in ruby should be
 something like:

 Facter.add(num_core) do
   setcode do
     dd_code=`which dmidecode`.chomp
     n1=`#{dd_code} -t processor | grep -c Socket Designation`.chomp.to_i
     n2=`#{dd_code} -t processor | grep Core Count | uniq | awk
 '{print $3}'`.chomp.to_i
     n1*n2
   end
 end

 The key things here are the chomps to remove newlines, the #{} format
 for variable interpolation in strings and the to_i to get integers.
 Also not the n1*n2 at the end - this will return the result (no need
 for return unless you want it).

 ken.

-- 
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: how to do conditional check?

2011-06-14 Thread Patrick

On Jun 13, 2011, at 5:00 PM, Sans wrote:

 Well, the file I mention is actually one of the Torque (formerly PBS
 batch system) config file (location: /var/torque/mom_priv/config),
 which is auto generated by yaim but the thing is: if the file is
 already there yaim won't touch it. Let's just say that I don't want
 yaim to create this file (it messes it up very often and ended up with
 wrong value) but wanna make sure that the file is in correct shape,
 otherwise jobs won't run properly. On the other hand, that file
 doesn't mean anything at all, if Torque is not install in the first
 place. That's why I want to put that check in. Cheers!!
 

1) Why not use puppet to decide if Torque should be installed in the first 
place?  Then you can use that logic to decide if the file should be created/put 
in place?
2) Does is matter if you create the file if the package isn't installed?

-- 
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: writing custom facts

2011-06-14 Thread Sans
Hi Dan,

Thanks for the link. That 's probably the next thing I'd be looking
for. Very useful information for the type of things I'm trying to do
here. Cheers!!

On Jun 14, 1:21 pm, Denmat tu2bg...@gmail.com wrote:
 Is this what your after?

 http://projects.puppetlabs.com/projects/1/wiki/Dmidecode_Patterns

 Cheers,
 Den

-- 
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: how to do conditional check?

2011-06-14 Thread Sans


On Jun 14, 2:48 pm, Patrick kc7...@gmail.com wrote:

 1) Why not use puppet to decide if Torque should be installed in the first 
 place?  Then you can use that logic to decide if the file should be 
 created/put in place?

I can't: torque is a vital part of the middleware, which needs to be
installed and configured at the time of middleware installation. And n
the other hand, I use Puppet to prepare the environment for the
middleware to be installed (by yaim). After that installation (and
initial configuration), I wanna make sure that config file is always
there with correct values.

 2) Does is matter if you create the file if the package isn't installed?
As I explained above, if the I create the [especially] the directory-
path, yaim will skip a things, thinking it's an upgrade or re-install,
even though installing for first time.

Hope, I've made it a bit clearer now. Cheers!!

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

2011-06-14 Thread Ken Barber
ruby != bash :-). You need a ruby book if you can :-).

if n1 == n2 then
  # do something
elsif n2 == n1*2 then
  # do something else
end

ken.

On Tue, Jun 14, 2011 at 2:47 PM, Sans r.santanu@gmail.com wrote:
 Very useful info Ken - those are the couple of things I was actually
 looking for. It'll certainly get me going.
 One more thing, how do I do if..else.. thing in there? Like:

 if [ $n1 == $n2 ]; then
    echo something here
 elif [  $n2 == $(($n1*2)) ]; then
    echo something else here
 .
 .
 fi

 Cheers!!

 On Jun 14, 1:42 pm, Ken Barber k...@puppetlabs.com wrote:
 Not pretty - but hacking up your example to work in ruby should be
 something like:

 Facter.add(num_core) do
   setcode do
     dd_code=`which dmidecode`.chomp
     n1=`#{dd_code} -t processor | grep -c Socket Designation`.chomp.to_i
     n2=`#{dd_code} -t processor | grep Core Count | uniq | awk
 '{print $3}'`.chomp.to_i
     n1*n2
   end
 end

 The key things here are the chomps to remove newlines, the #{} format
 for variable interpolation in strings and the to_i to get integers.
 Also not the n1*n2 at the end - this will return the result (no need
 for return unless you want it).

 ken.

 --
 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] puppet CA expired

2011-06-14 Thread j...@squirk.org
hi,

  my puppet CA expired. Anyone knows how to solve the problem and extend
the validity of the CA ? I mean without recreating one and going on each
node to change the certs (that is what puppet is made to prevent, going
to each node ^^)


regards,
Jean.



-- 
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] Managing local + LDAP users and groups

2011-06-14 Thread bradejr
Our environment (mostly RHEL) uses LDAP for user and group
administration. Unfortunately, we have some cases where (broken)
software insists on  local users and groups. I'm guessing it's
checking the files directly instead of using the proper system calls.

Our current process is to create the local user/group matching the
LDAP entries. How are people handling this case? Puppet won't create
the user locally, as it sees the user as already existing. We are
currently using exec to call the local versions of the commands
(luseradd, lusermod, etc), but that's something of a hack and makes
for more complex classes. Does anyone have a graceful way to handle
this in puppet?

Thanks,
Rob

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

2011-06-14 Thread puppeter
Hi people,
I have a quite interesting problem here. We are using Puppet for
deploying configuration files (among others) and GIT for keeping
version history of templates. But now we got a request  to keep also
history of files that are already interpreted and deployed. Does
somebody have an idea how to collect such files?

In fact, we are asked to keep history of configurations across all our
Linux systems with a possibility to roll back to some previous state.
Taking a copy from backup does not make the trick. We are in state of
defining requirements so I'm looking for some prepared solution.

Thanks in advance!

Regards

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



[Puppet Users] array in template

2011-06-14 Thread romuald FREBAULT
Hi,

I have a recipe that deploy a nrpe_local.cfg.
In my template, i want to deploy diffrent lines between 32 and 64 bits.

We have hosts uder redhat and debian,.
When i write % if architecture == i386 -%
no problem, the lines are well deployed on redhat and debian, but for the 64
bits, redhat call the architecture x86_64 and debian amd64...
i tried to make an array like this
% if architecture == x86_64, amd64 -%
or like this
% if architecture == x86_64, amd64 -%
or
% if architecture == x86_64 | amd64 -%

and many other tries, but i couldn't get it to work...

does anyone knows how i could solve my problem?

-- 
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 LDAP users to system group

2011-06-14 Thread Gareth Allen
Hi all,

All our users are stored in LDAP, but I need to add users to a system
group for sudo rules.  Is there a way to do this without having Puppet
manage the user? For example:
getent passwd gareth.allen
gareth.allen:XX:1100:1100:Gareth Allen:/home/gareth.allen:/bin/bash

/etc/group contents:
mysql:x:27:

Now, I need Puppet to do the following:
mysql:x:27:gareth.allen

The only way I can think of doing this is by having Puppet manage
/etc/groups, but I'm a bit nervous of going that route. Does anyone
have any ideas?

Thanks,
Gareth

-- 
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] RHEL 6 Optional channel

2011-06-14 Thread Aaron Grewell
Unless you're using RHN's system management features (and thus paying extra
for the Management Entitlements) you won't be able to do this though.  And
since you're using Puppet that seems unlikely.  I'd use either mrepo or
yum-downloadonly to mirror your RHN repos to local yum repos so you can
manage them more effectively.

On Mon, Jun 13, 2011 at 11:14 PM, Steven Acres ad...@swatteksystems.comwrote:

 On Mon, Jun 13, 2011 at 10:31 PM, Len Rugen lenru...@gmail.com wrote:

 It looks like all of our RHEL 6 systems now need to connect to the RHN
 Optional Channel.  (puppet, ruby vs. selinux deps)

 Is there a way to do that with a script without having to enter RHN userid
 and password?   Is there a way to add a channel during kickstart?

 Thanks

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


 Hi Len,

 https://access.redhat.com/kb/docs/DOC-2475

 --
 Cheers,

 Steven
 ---
 Steven Acres
 UNIX/Linux System Administrator


  --
 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] array in template

2011-06-14 Thread Ken Barber
Try:

% if [x86_64,amd64].include?(architecture) %
... do stuff ...
% end %

ken.

On Tue, Jun 14, 2011 at 11:30 AM, romuald FREBAULT kurgan...@gmail.com wrote:
 Hi,

 I have a recipe that deploy a nrpe_local.cfg.
 In my template, i want to deploy diffrent lines between 32 and 64 bits.

 We have hosts uder redhat and debian,.
 When i write % if architecture == i386 -%
 no problem, the lines are well deployed on redhat and debian, but for the 64
 bits, redhat call the architecture x86_64 and debian amd64...
 i tried to make an array like this
 % if architecture == x86_64, amd64 -%
 or like this
 % if architecture == x86_64, amd64 -%
 or
 % if architecture == x86_64 | amd64 -%

 and many other tries, but i couldn't get it to work...

 does anyone knows how i could solve my problem?

 --
 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] Managing local + LDAP users and groups

2011-06-14 Thread Kinzel, David

Our environment (mostly RHEL) uses LDAP for user and group
administration. Unfortunately, we have some cases where (broken)
software insists on  local users and groups. I'm guessing it's
checking the files directly instead of using the proper system calls.

Our current process is to create the local user/group matching the
LDAP entries. How are people handling this case? Puppet won't create
the user locally, as it sees the user as already existing. We are
currently using exec to call the local versions of the commands
(luseradd, lusermod, etc), but that's something of a hack and makes
for more complex classes. Does anyone have a graceful way to handle
this in puppet?

I'm with you on that. My current path is using luseradd to bootstrap the
user, and then let puppet manage it from there (usermod on local+ldap
seems to work fine). Same goes for groups. Solaris is even worse for
this as there isn't (afaik) a 'luseradd' equivalent, so the bootstrap
process would be modifying the files directly and then letting puppet
manage the user from there.


Thanks,
Rob


This email communication and any files transmitted with it may contain 
confidential and or proprietary information and is provided for the use of the 
intended recipient only.  Any review, retransmission or dissemination of this 
information by anyone other than the intended recipient is prohibited.  If you 
receive this email in error, please contact the sender and delete this 
communication and any copies immediately.  Thank you.
http://www.encana.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.



[Puppet Users] Setting defaults on scoped definitions : Each Word Needs To Be Capitalized

2011-06-14 Thread Matthias Saou
Hi,

The documentation section gives a good example for the exec type :
http://docs.puppetlabs.com/guides/language_guide.html#resource-defaults

But for scoped definitions, I had to figure out that each word needs to
be capitalized, not just the first word :

Mymod::mydef { 'foo': } gives Syntax error at '::mydef'

What works is this (note the second capital 'M') :

Mymod::Mydef { 'foo': }

Could the documentation section about capitalization be updated to
include a scoped example and make it clear for everyone?
http://docs.puppetlabs.com/guides/language_guide.html#capitalization

I'm sure others will bump into this too, or already have :-)

Matthias

-- 
Clean custom Red Hat Linux rpm packages : http://freshrpms.net/
Fedora release 14 (Laughlin) - Linux kernel 2.6.35.13-91.fc14.x86_64
Load : 0.22 0.36 0.46

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

2011-06-14 Thread Craig White

On Jun 13, 2011, at 5:02 PM, Nan Liu wrote:

 On Mon, Jun 13, 2011 at 4:19 PM, Craig White craig.wh...@ttiltd.com wrote:
 
 On Jun 13, 2011, at 3:10 PM, Nan Liu wrote:
 
 On Mon, Jun 13, 2011 at 1:57 PM, Craig White craig.wh...@ttiltd.com wrote:
 I've gone over the documentation several times now and I can't figure out 
 how to 'apply' a manifest to a client.
 
 The client does have a signed certificate but the only thing in the 
 /etc/puppet folder on the client is an ssl directory.\
 
 If you are running puppet against a remote puppet master, you should
 run puppet agent rather than puppet apply. puppet apply is only when
 you have a copy of the manifest locally.
 
 I have a manifest that works fine on the puppet 'master'
 
 I have added the client into /etc/puppet/manifests/nodes.pp
 
 Didn't notice this earlier, the default manifests file puppet master
 compiles is /etc/puppet/manifests/site.pp, you need to import nodes.pp
 in site.pp, or simply write the node information in site.pp manifest.
 
 if the puppet agent command would have worked for me, I wouldn't have asked. 
 My puppet master has manifests/nodes.pp which lists the client fqdn (matches 
 the cert too) and it includes 'ntp' which is found in 
 modules/ntp/manifests/ntp.pp (see my original e-mail) but it doesn't seem to 
 happen no matter how many times I invoke the 'puppet agent command from the 
 client system). The client system did however get a certificate from the 
 server.
 
 If the suggestion above doesn't work, try to include a default node in 
 site.pp:
 node default {
  include ntp
 }
 
 Beyond that, start running puppet master with the option
 --no-daemonize --verbose (add --debug as necessary) and send any
 applicable output. It should autoload classes in modules and compile
 catalog for the taget node successfully (see sample below):

still no joy  ;-(

# cat site.pp
import templates
import nodes

# cat nodes.pp
  node ubuntu.ttinet {
include ntp
}

  node ubuntu2.ttinet {
include ntp
package { apt:
  ensure = installed,  
  }
file{/etc/apt/sources.list:
  ensure = present,
  owner  = root,
  require = Package[apt]
  }
  }

# cat templates.pp 
  class baseclass {
  }

  node default {
include baseclass
  }

root@ubuntu:/etc/puppet/manifests# puppet master --no-daemonize --verbose 
--debug
debug: Failed to load library 'shadow' for feature 'libshadow'
debug: Puppet::Type::User::ProviderUser_role_add: file roledel does not exist
debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl does 
not exist
debug: Puppet::Type::User::ProviderLdap: true value when expecting false
debug: Puppet::Type::User::ProviderPw: file pw does not exist
debug: Failed to load library 'selinux' for feature 'selinux'
debug: Puppet::Type::File::ProviderMicrosoft_windows: feature microsoft_windows 
is missing
debug: Failed to load library 'ldap' for feature 'ldap'
debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/server_data]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/log]: Autorequiring File[/var/lib/puppet]
debug: /File[/etc/puppet/ssl/public_keys/ubuntu.ttinet.pem]: Autorequiring 
File[/etc/puppet/ssl/public_keys]
debug: /File[/etc/puppet/ssl/certs]: Autorequiring File[/etc/puppet/ssl]
debug: /File[/etc/puppet/auth.conf]: Autorequiring File[/etc/puppet]
debug: /File[/etc/puppet/ssl/private]: Autorequiring File[/etc/puppet/ssl]
debug: /File[/var/lib/puppet/yaml]: Autorequiring File[/var/lib/puppet]
debug: /File[/etc/puppet/manifests]: Autorequiring File[/etc/puppet]
debug: /File[/etc/puppet/ssl/private_keys/ubuntu.ttinet.pem]: Autorequiring 
File[/etc/puppet/ssl/private_keys]
debug: /File[/etc/puppet/ssl/certs/ubuntu.ttinet.pem]: Autorequiring 
File[/etc/puppet/ssl/certs]
debug: /File[/var/lib/puppet/run]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/reports]: Autorequiring File[/var/lib/puppet]
debug: /File[/var/lib/puppet/bucket]: Autorequiring File[/var/lib/puppet]
debug: /File[/etc/puppet/manifests/site.pp]: Autorequiring 
File[/etc/puppet/manifests]
debug: /File[/etc/puppet/ssl/public_keys]: Autorequiring File[/etc/puppet/ssl]
debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
debug: /File[/etc/puppet/ssl]: Autorequiring File[/etc/puppet]
debug: /File[/etc/puppet/ssl/crl.pem]: Autorequiring File[/etc/puppet/ssl]
debug: /File[/var/lib/puppet/log/masterhttp.log]: Autorequiring 
File[/var/lib/puppet/log]
debug: /File[/etc/puppet/ssl/certs/ca.pem]: Autorequiring 
File[/etc/puppet/ssl/certs]
debug: /File[/var/lib/puppet/rrd]: Autorequiring File[/var/lib/puppet]
debug: /File[/etc/puppet/ssl/private_keys]: Autorequiring File[/etc/puppet/ssl]
debug: /File[/var/lib/puppet/state]: Autorequiring File[/var/lib/puppet]
debug: /File[/etc/puppet/ssl/certificate_requests]: Autorequiring 
File[/etc/puppet/ssl]
debug: /File[/etc/puppet/fileserver.conf]: Autorequiring File[/etc/puppet]

Re: [Puppet Users] configuration history

2011-06-14 Thread Dan Bode
On Tue, Jun 14, 2011 at 7:47 AM, puppeter puppe...@centrum.cz wrote:

 Hi people,
 I have a quite interesting problem here. We are using Puppet for
 deploying configuration files (among others) and GIT for keeping
 version history of templates. But now we got a request  to keep also
 history of files that are already interpreted and deployed. Does
 somebody have an idea how to collect such files?


the filebucket can be used to centrally store any files that puppet changes.


 In fact, we are asked to keep history of configurations across all our
 Linux systems with a possibility to roll back to some previous state.


In general, I consider rollback to be a dirty word. Its something that looks
great as a bullet point, but quickly falls apart when you start to think
about all of the technical implementations. For example, how do you roll
back a service restart, how do you revert the state of you application data?



 Taking a copy from backup does not make the trick. We are in state of
 defining requirements so I'm looking for some prepared solution.


The best solutions is probably to write a catalog terminus that stores
historical versions of your catalog. The only trick to it is that you would
have to write some code that can do diffs between catalogs (so that you only
store catalogs that are different from the last version). Although you could
store this history, it is unlikely that you would be able to rollback any
machines from these catalogs. It would be more reasonable to build new
machines and get them into the running state by applying the old catalogs.


 Thanks in advance!

 Regards

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



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

2011-06-14 Thread Peter Bukowinski
Try quoting your node names, e.g.

node 'ubuntu2.ttinet' {

-- 
Peter M. Bukowinski
Systems Engineer
Janelia Farm Research Campus, HHMI 

On Tuesday, June 14, 2011 at 11:26 AM, Craig White wrote:

 
 On Jun 13, 2011, at 5:02 PM, Nan Liu wrote:
 
  On Mon, Jun 13, 2011 at 4:19 PM, Craig White craig.wh...@ttiltd.com 
  (mailto:craig.wh...@ttiltd.com) wrote:
   
   On Jun 13, 2011, at 3:10 PM, Nan Liu wrote:
   
On Mon, Jun 13, 2011 at 1:57 PM, Craig White craig.wh...@ttiltd.com 
(mailto:craig.wh...@ttiltd.com) wrote:
 I've gone over the documentation several times now and I can't figure 
 out how to 'apply' a manifest to a client.
 
 The client does have a signed certificate but the only thing in the 
 /etc/puppet folder on the client is an ssl directory.\

If you are running puppet against a remote puppet master, you should
run puppet agent rather than puppet apply. puppet apply is only when
you have a copy of the manifest locally.

 I have a manifest that works fine on the puppet 'master'
 
 I have added the client into /etc/puppet/manifests/nodes.pp
  
  Didn't notice this earlier, the default manifests file puppet master
  compiles is /etc/puppet/manifests/site.pp, you need to import nodes.pp
  in site.pp, or simply write the node information in site.pp manifest.
  
   if the puppet agent command would have worked for me, I wouldn't have 
   asked. My puppet master has manifests/nodes.pp which lists the client 
   fqdn (matches the cert too) and it includes 'ntp' which is found in 
   modules/ntp/manifests/ntp.pp (see my original e-mail) but it doesn't seem 
   to happen no matter how many times I invoke the 'puppet agent command 
   from the client system). The client system did however get a certificate 
   from the server.
  
  If the suggestion above doesn't work, try to include a default node in 
  site.pp:
  node default {
   include ntp
  }
  
  Beyond that, start running puppet master with the option
  --no-daemonize --verbose (add --debug as necessary) and send any
  applicable output. It should autoload classes in modules and compile
  catalog for the taget node successfully (see sample below):
 
 still no joy ;-(
 
 # cat site.pp
 import templates
 import nodes
 
 # cat nodes.pp
  node ubuntu.ttinet {
  include ntp
  }
 
  node ubuntu2.ttinet {
  include ntp
  package { apt:
  ensure = installed, 
  }
  file{/etc/apt/sources.list:
  ensure = present,
  owner = root,
  require = Package[apt]
  }
  }
 
 # cat templates.pp 
  class baseclass {
  }
 
  node default {
  include baseclass
  }
 
 root@ubuntu:/etc/puppet/manifests# puppet master --no-daemonize --verbose 
 --debug
 debug: Failed to load library 'shadow' for feature 'libshadow'
 debug: Puppet::Type::User::ProviderUser_role_add: file roledel does not exist
 debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl does 
 not exist
 debug: Puppet::Type::User::ProviderLdap: true value when expecting false
 debug: Puppet::Type::User::ProviderPw: file pw does not exist
 debug: Failed to load library 'selinux' for feature 'selinux'
 debug: Puppet::Type::File::ProviderMicrosoft_windows: feature 
 microsoft_windows is missing
 debug: Failed to load library 'ldap' for feature 'ldap'
 debug: /File[/var/lib/puppet/facts]: Autorequiring File[/var/lib/puppet]
 debug: /File[/var/lib/puppet/server_data]: Autorequiring File[/var/lib/puppet]
 debug: /File[/var/lib/puppet/log]: Autorequiring File[/var/lib/puppet]
 debug: /File[/etc/puppet/ssl/public_keys/ubuntu.ttinet.pem]: Autorequiring 
 File[/etc/puppet/ssl/public_keys]
 debug: /File[/etc/puppet/ssl/certs]: Autorequiring File[/etc/puppet/ssl]
 debug: /File[/etc/puppet/auth.conf]: Autorequiring File[/etc/puppet]
 debug: /File[/etc/puppet/ssl/private]: Autorequiring File[/etc/puppet/ssl]
 debug: /File[/var/lib/puppet/yaml]: Autorequiring File[/var/lib/puppet]
 debug: /File[/etc/puppet/manifests]: Autorequiring File[/etc/puppet]
 debug: /File[/etc/puppet/ssl/private_keys/ubuntu.ttinet.pem]: Autorequiring 
 File[/etc/puppet/ssl/private_keys]
 debug: /File[/etc/puppet/ssl/certs/ubuntu.ttinet.pem]: Autorequiring 
 File[/etc/puppet/ssl/certs]
 debug: /File[/var/lib/puppet/run]: Autorequiring File[/var/lib/puppet]
 debug: /File[/var/lib/puppet/reports]: Autorequiring File[/var/lib/puppet]
 debug: /File[/var/lib/puppet/bucket]: Autorequiring File[/var/lib/puppet]
 debug: /File[/etc/puppet/manifests/site.pp]: Autorequiring 
 File[/etc/puppet/manifests]
 debug: /File[/etc/puppet/ssl/public_keys]: Autorequiring File[/etc/puppet/ssl]
 debug: /File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet]
 debug: /File[/etc/puppet/ssl]: Autorequiring File[/etc/puppet]
 debug: /File[/etc/puppet/ssl/crl.pem]: Autorequiring File[/etc/puppet/ssl]
 debug: /File[/var/lib/puppet/log/masterhttp.log]: Autorequiring 
 File[/var/lib/puppet/log]
 debug: /File[/etc/puppet/ssl/certs/ca.pem]: Autorequiring 
 File[/etc/puppet/ssl/certs]
 debug: 

Re: [Puppet Users] Setting defaults on scoped definitions : Each Word Needs To Be Capitalized

2011-06-14 Thread Ken Barber
I believe that would be a good addition. You should raise a feature
request with category 'Documentation' so its tracked:

http://projects.puppetlabs.com/projects/puppet/issues

ken.

On Tue, Jun 14, 2011 at 4:26 PM, Matthias Saou
th...@spam.spam.spam.spam.spam.spam.spam.egg.and.spam.freshrpms.net
wrote:
 Hi,

 The documentation section gives a good example for the exec type :
 http://docs.puppetlabs.com/guides/language_guide.html#resource-defaults

 But for scoped definitions, I had to figure out that each word needs to
 be capitalized, not just the first word :

 Mymod::mydef { 'foo': } gives Syntax error at '::mydef'

 What works is this (note the second capital 'M') :

 Mymod::Mydef { 'foo': }

 Could the documentation section about capitalization be updated to
 include a scoped example and make it clear for everyone?
 http://docs.puppetlabs.com/guides/language_guide.html#capitalization

 I'm sure others will bump into this too, or already have :-)

 Matthias

 --
 Clean custom Red Hat Linux rpm packages : http://freshrpms.net/
 Fedora release 14 (Laughlin) - Linux kernel 2.6.35.13-91.fc14.x86_64
 Load : 0.22 0.36 0.46

 --
 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: writing custom facts

2011-06-14 Thread Sans
Google helped me get stared and I did something like this:


 if n1 == (n2 * 2)
# do this
 elsif n1 == n2
# do that
 end


which appears to be working.  Is then optional? cheers!!




On Jun 14, 3:41 pm, Ken Barber k...@puppetlabs.com wrote:
 ruby != bash :-). You need a ruby book if you can :-).

 if n1 == n2 then
   # do something
 elsif n2 == n1*2 then
   # do something else
 end

 ken.

-- 
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] notify defined in exported resource won't work?

2011-06-14 Thread mizuki
Hi all,

I noticed a service notify defined inside of exported resource won't work.

For example, I have the following exported resource defined:

define host($ip = $fqdn, $short_alias = $fqdn) {
@@file {
$nagios_cfgdir/${name}_host.cfg:
ensure = present, content = template( 
nagios/host.erb ),
mode = 644, owner = root, group = root,
notify = Service [nagios],
tag = 'nagios'
}
}

This creates the file fine, but the service won't get restarted.
Notify service outside of exported resource works of course.
So I'm wondering if it's designed by nature or it's just a bug.

Anyone had experinces on that? Can someone advice?

Thanks!

Mizuki

-- 
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: notify defined in exported resource won't work?

2011-06-14 Thread mizuki
Never mind, after I upgraded puppet to the latest version, it's actually
fixed.
Thanks for the developers whoever fixed the problem!!

Mizuki

On Tue, Jun 14, 2011 at 11:53 AM, mizuki mizuki0...@gmail.com wrote:

 Hi all,

 I noticed a service notify defined inside of exported resource won't
 work.

 For example, I have the following exported resource defined:


   define host($ip = $fqdn, $short_alias = $fqdn) {
   @@file {
   $nagios_cfgdir/${name}_host.cfg:
   ensure = present, content = template( 
 nagios/host.erb ),

   mode = 644, owner = root, group = root,
 notify = Service [nagios],
   tag = 'nagios'
   }
   }

 This creates the file fine, but the service won't get restarted.
 Notify service outside of exported resource works of course.
 So I'm wondering if it's designed by nature or it's just a bug.


 Anyone had experinces on that? Can someone advice?

 Thanks!

 Mizuki




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

2011-06-14 Thread Craig White

On Jun 14, 2011, at 8:33 AM, Peter Bukowinski wrote:

 Try quoting your node names, e.g.
 
 node 'ubuntu2.ttinet' {

trying to keep this as simple as possible just to get one client to work.

# cat site.pp
import templates
import nodes

# cat nodes.pp
  node 'ubuntu.ttinet' {
include ntp.
  }

  node 'ubuntu2.ttinet' {
include ntp,
  }

# cat templates.pp 
class baseclass {
}

node default {
include baseclass
}

info: Not using expired node for ubuntu2.ttinet from cache; expired at Tue Jun 
14 09:23:28 -0700 2011
info: Caching node for ubuntu2.ttinet
debug: importing '/etc/puppet/manifests/templates.pp' in environment production
debug: importing '/etc/puppet/manifests/nodes.pp' in environment production
err: Could not parse for environment production: Syntax error at '.'; expected 
'}' at /etc/puppet/manifests/nodes.pp:2 on node ubuntu2.ttinet
err: Could not parse for environment production: Syntax error at '.'; expected 
'}' at /etc/puppet/manifests/nodes.pp:2 on node ubuntu2.ttinet
^Cnotice: Caught INT; calling stop

quoting the node names changed nothing

If there is actually some tutorial somewhere that actually shows me what it is 
I need to do to connect in a second computer beyond just getting the 
certificate, please let me know but I have been working on this since last 
Friday. I am not that stupid. I got Chef working in just 2 or 3 hours.

Thanks

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

2011-06-14 Thread R.I.Pienaar
The error message says:

err: Could not parse for environment production: Syntax error at '.'; expected 
'}' at /etc/puppet/manifests/nodes.pp:2 on node ubuntu2.ttinet

and your file in question:

 # cat nodes.pp
   node 'ubuntu.ttinet' {
 include ntp.
   }


So what's on line 2? a . at the end, and the error tells you it did not 
expect the ..

Did you remove the .?

-- 
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: cannot manage home directories

2011-06-14 Thread vella1tj
We just need the account to have root access and be created
successfully, I looked at the permissions of the assorted folders
everything to the best of my knowledge had root access. I'll
definitely look into it though thanks for the heads up.

On Jun 13, 5:20 pm, Nigel Kersten ni...@puppetlabs.com wrote:
 On Mon, Jun 13, 2011 at 1:30 PM, vella1tj vella...@gmail.com wrote:
  Well I haven't got on top of debugging the createhomdir but I just
  wanted to let you know how we got the command to work. this is the
  exec as follows

  exec {'username':
   command        =cp -R /System/Library/templateuser/English.lproj/ /
  Users/username/,
   path                =/bin/,
   #everything else that we where using has been commented out.
  }

  The path command was key and one of my managers was just screwing with
  it and got it to work. The manifests are different a little bit
  because i went in and changed the User Template to templateuser
  because i thought puppet was having a hard time on the files with
  spaces. Just thought you would want to know. Again thank you so much
  you are awesome Nigel, if there is anything I could do for you just
  let me know:)

 Thank you for the kind words, but making more Mac Puppet users is enough :)

 I'd be a bit careful of the above command though. You may not end up with
 the permissions your users expect, particularly on the Public and
 Public/DropBox folders.











  On Jun 13, 3:53 pm, Nigel Kersten ni...@puppetlabs.com wrote:
   On Mon, Jun 13, 2011 at 12:48 PM, vella1tj vella...@gmail.com wrote:
so the copying way of the user template is prolly not the best way?

   That's basically one of the underlying things createhomedir does, but
  you're
   not going to actually be setting up directories with the correct
   permissions/ACLs, which could be a problem.

   Especially in later versions of OS X, createhomedir problems have often
  been
   a symptom of another directory service related issue in my experience, so
   I'd definitely do some debugging first.

On Jun 13, 3:24 pm, Nigel Kersten ni...@puppetlabs.com wrote:
 On Mon, Jun 13, 2011 at 11:05 AM, vella1tj vella...@gmail.com
  wrote:
  Unfortunately it is still not creating the Home folder but it is at
  least creating the User and assigning it the proper values!!:D

  I'm going to try doing a mdir to create the home folder. Let me
  know
  what you think about that, here is what I have right now.

  user {'user':
   uid        = 501,
   gid        = 'staff',
   #comment    = some random comment,
   ensure     = present,
   home       = '/Users/user',
   shell      = '/bin/bash',
  #  provider   = user_role_add,
   password   = 'Hash,
  }

  exec {/usr/sbin/createhomedir -c -l -u user:
   subscribe     = User[user],
   refreshonly  = true,
  }

  The weird thing is even manually using the createdir command is not
  working. I thought maybe their was something wrong with the OS
  installation because its on a macbook air so I tried it on my
  actual
  Imac work computer. I deleted the local admin account then ran the
  command it created the user but not the home folder still. I forget
  to
  set myself as admin so I had to have my manager su user then create
  the folder and he was able to. So it's def the script that I wrote
  that is not working. Thanks for your time again Nigel I do
  appreciate
  it.

 Sometimes createhomedir is just buggy. :(

 If you do man DirectoryService you'll see the instructions for
  sending
 USR1 signals to the DS process for debugging and there might be
  something
 that leaps out when you interactively run createhomedir for the user.

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

   --
   Nigel Kersten
   Product, Puppet Labs
   @nigelkersten

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

 --
 Nigel Kersten
 Product, Puppet Labs
 @nigelkersten

-- 
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] Velocity and free beer

2011-06-14 Thread James Turnbull
For anyone at Velocity this week we're doing some speaking and buying 
some drinks:


http://www.puppetlabs.com/blog/santa-clara-schedule-asynchronous-real-time-monitoring-with-mcollective-at-velocity-puppet-labs-happy-hour/

Jeff McCune is speaking about MCollective and monitoring on Wednesday at 
1pm.


Also on Wednesday night we're buying drinks at TechMart right next door 
to the Santa Clara Convention Center from 4pm or so until we run out of 
beer. :)


Regards

James

--
James Turnbull
Puppet Labs
1-503-734-8571

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

2011-06-14 Thread Craig White

On Jun 14, 2011, at 9:35 AM, R.I.Pienaar wrote:

 The error message says:
 
 err: Could not parse for environment production: Syntax error at '.'; 
 expected '}' at /etc/puppet/manifests/nodes.pp:2 on node ubuntu2.ttinet
 
 and your file in question:
 
 # cat nodes.pp
  node 'ubuntu.ttinet' {
include ntp.
  }
 
 
 So what's on line 2? a . at the end, and the error tells you it did not 
 expect the ..
 
 Did you remove the .?
 
 -- 
 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.
 


the period was indeed a typo but I had to remove the ',' (comma) as well to 
make it work. It finally worked! I guess you always need the commas except when 
they toss you errors.

I'm sure I will have more questions but I will exhaust Google and the 
documentation first. I've been able to install packages now and see somewhat 
where this is leading.

Thanks all

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] Re: how to do conditional check?

2011-06-14 Thread Matthew Black
I haven’t used torque or yaim but what you want to do in a fact is something
like this to determine installation.

if File.exists?('/path/to/config')

end

I don’t usually install anything on a system without doing it in puppet, so
I don’t typically write facts to find out if something is installed or not.


-Original Message-
From: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com]
On Behalf Of Sans
Sent: Tuesday, June 14, 2011 10:01 AM
To: Puppet Users
Subject: [Puppet Users] Re: how to do conditional check?



On Jun 14, 2:48 pm, Patrick kc7...@gmail.com wrote:

 1) Why not use puppet to decide if Torque should be installed in the first
place?  Then you can use that logic to decide if the file should be
created/put in place?

I can't: torque is a vital part of the middleware, which needs to be
installed and configured at the time of middleware installation. And n
the other hand, I use Puppet to prepare the environment for the
middleware to be installed (by yaim). After that installation (and
initial configuration), I wanna make sure that config file is always
there with correct values.

 2) Does is matter if you create the file if the package isn't installed?
As I explained above, if the I create the [especially] the directory-
path, yaim will skip a things, thinking it's an upgrade or re-install,
even though installing for first time.

Hope, I've made it a bit clearer now. Cheers!!

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


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



Re: [Puppet Users] puppet clients

2011-06-14 Thread Nathan Clemons
I will also mention that there are now a few books on Puppet. I'm currently
reading through Pro Puppet by James Turnbull (who wrote the original Pulling
Strings with Puppet book), and it's quite good. The original book was a bit
light on some details, Pro Puppet really dives in and shows how all the
pieces fit together.

http://www.apress.com/catalogsearch/result/?q=puppetsubmit=Go

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Tue, Jun 14, 2011 at 10:02 AM, Craig White craig.wh...@ttiltd.comwrote:


 On Jun 14, 2011, at 9:35 AM, R.I.Pienaar wrote:

  The error message says:
 
  err: Could not parse for environment production: Syntax error at '.';
 expected '}' at /etc/puppet/manifests/nodes.pp:2 on node ubuntu2.ttinet
 
  and your file in question:
 
  # cat nodes.pp
   node 'ubuntu.ttinet' {
 include ntp.
   }
 
 
  So what's on line 2? a . at the end, and the error tells you it did not
 expect the ..
 
  Did you remove the .?
 
  --
  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.
 

 
 the period was indeed a typo but I had to remove the ',' (comma) as well to
 make it work. It finally worked! I guess you always need the commas except
 when they toss you errors.

 I'm sure I will have more questions but I will exhaust Google and the
 documentation first. I've been able to install packages now and see somewhat
 where this is leading.

 Thanks all

 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.



-- 
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: Setting defaults on scoped definitions : Each Word Needs To Be Capitalized

2011-06-14 Thread Nick Fagerlund
On Jun 14, 8:26 am, Matthias Saou
th...@spam.spam.spam.spam.spam.spam.spam.egg.and.spam.freshrpms.net
wrote:
 Could the documentation section about capitalization be updated to
 include a scoped example and make it clear for 
 everyone?http://docs.puppetlabs.com/guides/language_guide.html#capitalization

Yes! In fact, I just did that yesterday. It's not live on the site
yet, but you can see the commit here:
https://github.com/puppetlabs/puppet-docs/commit/68d0cdc1b2a26a5ed89a204ff59fe73f633d433f

-- 
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: how to do conditional check?

2011-06-14 Thread Sans
On Jun 14, 6:12 pm, Matthew Black mjbl...@gmail.com wrote:
 I haven’t used torque or yaim but what you want to do in a fact is something
 like this to determine installation.

 if File.exists?('/path/to/config')

Does it work for directory as well?

 -San

-- 
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 local + LDAP users and groups

2011-06-14 Thread Jacob Helwig
On Tue, 14 Jun 2011 07:45:44 -0700, bradejr wrote:
 
 Our environment (mostly RHEL) uses LDAP for user and group
 administration. Unfortunately, we have some cases where (broken)
 software insists on  local users and groups. I'm guessing it's
 checking the files directly instead of using the proper system calls.
 
 Our current process is to create the local user/group matching the
 LDAP entries. How are people handling this case? Puppet won't create
 the user locally, as it sees the user as already existing. We are
 currently using exec to call the local versions of the commands
 (luseradd, lusermod, etc), but that's something of a hack and makes
 for more complex classes. Does anyone have a graceful way to handle
 this in puppet?
 
 Thanks,
 Rob
 

Seems like it would be reasonable to make an luseradd provider for the
user type along the same lines as the existing useradd one.

Thanks for already opening a ticket for this!
http://projects.puppetlabs.com/issues/7911

-- 
Jacob Helwig


signature.asc
Description: Digital signature


Re: [Puppet Users] Re: Setting defaults on scoped definitions : Each Word Needs To Be Capitalized

2011-06-14 Thread Ken Barber
Nice idea to hire document writers with clairvoyance skills :-).

On Tue, Jun 14, 2011 at 6:45 PM, Nick Fagerlund
nick.fagerl...@puppetlabs.com wrote:
 On Jun 14, 8:26 am, Matthias Saou
 th...@spam.spam.spam.spam.spam.spam.spam.egg.and.spam.freshrpms.net
 wrote:
 Could the documentation section about capitalization be updated to
 include a scoped example and make it clear for 
 everyone?http://docs.puppetlabs.com/guides/language_guide.html#capitalization

 Yes! In fact, I just did that yesterday. It's not live on the site
 yet, but you can see the commit here:
 https://github.com/puppetlabs/puppet-docs/commit/68d0cdc1b2a26a5ed89a204ff59fe73f633d433f

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

2011-06-14 Thread Craig White
Thanks - asked my company to buy it but I might just buy it myself if they 
aren't interested.

Sounds like just the ticket for me... progress has been really slow.

Craig

On Jun 14, 2011, at 10:32 AM, Nathan Clemons wrote:

 I will also mention that there are now a few books on Puppet. I'm currently 
 reading through Pro Puppet by James Turnbull (who wrote the original Pulling 
 Strings with Puppet book), and it's quite good. The original book was a bit 
 light on some details, Pro Puppet really dives in and shows how all the 
 pieces fit together.
 
 http://www.apress.com/catalogsearch/result/?q=puppetsubmit=Go
 
 --
 Nathan Clemons
 http://www.livemocha.com
 The worlds largest online language learning community
 
 
 
 On Tue, Jun 14, 2011 at 10:02 AM, Craig White craig.wh...@ttiltd.com wrote:
 
 On Jun 14, 2011, at 9:35 AM, R.I.Pienaar wrote:
 
  The error message says:
 
  err: Could not parse for environment production: Syntax error at '.'; 
  expected '}' at /etc/puppet/manifests/nodes.pp:2 on node ubuntu2.ttinet
 
  and your file in question:
 
  # cat nodes.pp
   node 'ubuntu.ttinet' {
 include ntp.
   }
 
 
  So what's on line 2? a . at the end, and the error tells you it did not 
  expect the ..
 
  Did you remove the .?
 
  --
  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.
 
 
 
 the period was indeed a typo but I had to remove the ',' (comma) as well to 
 make it work. It finally worked! I guess you always need the commas except 
 when they toss you errors.
 
 I'm sure I will have more questions but I will exhaust Google and the 
 documentation first. I've been able to install packages now and see somewhat 
 where this is leading.
 
 Thanks all
 
 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.
 
 
 
 -- 
 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.

-- 
Craig White ~~  craig.wh...@ttiltd.com
1.800.869.6908 ~~~ www.ttiassessments.com 

Need help communicating between generations at work to achieve your desired 
success? Let us help!

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

2011-06-14 Thread Craig White
I am using Ubuntu 10.04 and ruby-enterprise (not ubuntu ruby) and installed 
puppet via gem.

How can I install puppet-dashboard if I don't see a gem available and if I use 
the ubuntu package, i get the whole slop of ruby packages sucked in (which i am 
trying to avoid)?

# dpkg -i puppet-dashboard_1.1.0-1_all.deb 
Selecting previously deselected package puppet-dashboard.
(Reading database ... 89313 files and directories currently installed.)
Unpacking puppet-dashboard (from puppet-dashboard_1.1.0-1_all.deb) ...
dpkg: dependency problems prevent configuration of puppet-dashboard:
 puppet-dashboard depends on ruby; however:
  Package ruby is not installed.
 puppet-dashboard depends on ruby1.8 (= 1.8.7); however:
  Package ruby1.8 is not installed.
 puppet-dashboard depends on rake (= 0.8.3); however:
  Package rake is not installed.
 puppet-dashboard depends on dbconfig-common; however:
  Package dbconfig-common is not installed.
 puppet-dashboard depends on libdbd-mysql-ruby; however:
  Package libdbd-mysql-ruby is not installed.
 puppet-dashboard depends on rubygems; however:
  Package rubygems is not installed.
 puppet-dashboard depends on libhttpclient-ruby1.8; however:
  Package libhttpclient-ruby1.8 is not installed.
dpkg: error processing puppet-dashboard (--install):
 dependency problems - leaving unconfigured
Processing triggers for ureadahead ...
Errors were encountered while processing:
 puppet-dashboard

build from source?

Thanks

-- 
Craig White ~~  craig.wh...@ttiltd.com
1.800.869.6908 ~~~ www.ttiassessments.com 

Need help communicating between generations at work to achieve your desired 
success? Let us help!

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



Re: [Puppet Users] puppet dashboard

2011-06-14 Thread Nigel Kersten
On Tue, Jun 14, 2011 at 11:56 AM, Craig White craig.wh...@ttiltd.comwrote:

 I am using Ubuntu 10.04 and ruby-enterprise (not ubuntu ruby) and installed
 puppet via gem.

 How can I install puppet-dashboard if I don't see a gem available and if I
 use the ubuntu package, i get the whole slop of ruby packages sucked in
 (which i am trying to avoid)?


If you're using Ruby EE, I would simply check out the git repository with
the appropriate release tag you want and install it that way, as you'll be
satisfying dependencies manually outside your package manager anyway.

https://github.com/puppetlabs/puppet-dashboard/blob/master/README.markdown




 # dpkg -i puppet-dashboard_1.1.0-1_all.deb
 Selecting previously deselected package puppet-dashboard.
 (Reading database ... 89313 files and directories currently installed.)
 Unpacking puppet-dashboard (from puppet-dashboard_1.1.0-1_all.deb) ...
 dpkg: dependency problems prevent configuration of puppet-dashboard:
  puppet-dashboard depends on ruby; however:
  Package ruby is not installed.
  puppet-dashboard depends on ruby1.8 (= 1.8.7); however:
  Package ruby1.8 is not installed.
  puppet-dashboard depends on rake (= 0.8.3); however:
  Package rake is not installed.
  puppet-dashboard depends on dbconfig-common; however:
  Package dbconfig-common is not installed.
  puppet-dashboard depends on libdbd-mysql-ruby; however:
  Package libdbd-mysql-ruby is not installed.
  puppet-dashboard depends on rubygems; however:
  Package rubygems is not installed.
  puppet-dashboard depends on libhttpclient-ruby1.8; however:
  Package libhttpclient-ruby1.8 is not installed.
 dpkg: error processing puppet-dashboard (--install):
  dependency problems - leaving unconfigured
 Processing triggers for ureadahead ...
 Errors were encountered while processing:
  puppet-dashboard

 build from source?

 Thanks

 --
 Craig White ~~  craig.wh...@ttiltd.com
 1.800.869.6908 ~~~ www.ttiassessments.com

 Need help communicating between generations at work to achieve your desired
 success? Let us help!

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




-- 
Nigel Kersten
Product, Puppet Labs
@nigelkersten

-- 
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: how to do conditional check?

2011-06-14 Thread Matthew Black
Not sure if it does, I'm going with the assumption it would not.

Though there is a Dir.exists that you could use.

-Original Message-
From: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com]
On Behalf Of Sans
Sent: Tuesday, June 14, 2011 1:54 PM
To: Puppet Users
Subject: [Puppet Users] Re: how to do conditional check?

On Jun 14, 6:12 pm, Matthew Black mjbl...@gmail.com wrote:
 I haven’t used torque or yaim but what you want to do in a fact is
something
 like this to determine installation.

 if File.exists?('/path/to/config')

Does it work for directory as well?

 -San

-- 
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: Setting defaults on scoped definitions : Each Word Needs To Be Capitalized

2011-06-14 Thread Matthias Saou
Ken Barber k...@puppetlabs.com wrote:

 Nice idea to hire document writers with clairvoyance skills :-).

I'll second that! :-)

Thanks for the great work : The documentation has really been improving
a lot and my general feeling is that things are much easier to find
than before.

Matthias

 On Tue, Jun 14, 2011 at 6:45 PM, Nick Fagerlund
 nick.fagerl...@puppetlabs.com wrote:
  On Jun 14, 8:26 am, Matthias Saou
  th...@spam.spam.spam.spam.spam.spam.spam.egg.and.spam.freshrpms.net
  wrote:
  Could the documentation section about capitalization be updated to
  include a scoped example and make it clear for
  everyone?http://docs.puppetlabs.com/guides/language_guide.html#capitalization
 
  Yes! In fact, I just did that yesterday. It's not live on the site
  yet, but you can see the commit here:
  https://github.com/puppetlabs/puppet-docs/commit/68d0cdc1b2a26a5ed89a204ff59fe73f633d433f
 
  --
  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] functions and environments

2011-06-14 Thread Gabriel Filion
Hello,

I'm trying to test out new features of a module before I deploy it and I
have difficulty with the functions declared by the module.

I'm using an enviroment called development where I dropped the new
module and would like to test on a node with the following:

puppetd --environment=development -t --noop

I can see that the file containing the function gets created but puppet
complains that it doesn't know the function in question:

info: Retrieving plugin
notice: /File[/var/lib/puppet/lib]/mode: mode changed '775' to '755'
notice: /File[/var/lib/puppet/lib/puppet]/mode: mode changed '775' to '755'
notice: /File[/var/lib/puppet/lib/puppet/parser]/mode: mode changed
'775' to '755'
notice: /File[/var/lib/puppet/lib/puppet/parser/functions]/mode: mode
changed '775' to '755'
notice:
/File[/var/lib/puppet/lib/puppet/parser/functions/debian_nextcodename.rb]/ensure:
defined content as '{md5}930cce14ff8a84fa29f9a2312d564d37'
notice:
/File[/var/lib/puppet/lib/puppet/parser/functions/debian_nextrelease.rb]/ensure:
defined content as '{md5}f314fb8d164034f1562acb00924d4232'
notice:
/File[/var/lib/puppet/lib/puppet/parser/functions/debian_release.rb]/ensure:
defined content as '{md5}cb4789fe5e233f2ae193e84a754350f9'
notice:
/File[/var/lib/puppet/lib/puppet/parser/functions/debian_release_version.rb]/ensure:
defined content as '{md5}8cd893cbb749897d17a28dd17a06ef6c'
info: Loading downloaded plugin
/var/lib/puppet/lib/puppet/parser/functions/debian_nextcodename.rb
info: Loading downloaded plugin
/var/lib/puppet/lib/puppet/parser/functions/debian_nextrelease.rb
info: Loading downloaded plugin
/var/lib/puppet/lib/puppet/parser/functions/debian_release.rb
info: Loading downloaded plugin
/var/lib/puppet/lib/puppet/parser/functions/debian_release_version.rb
info: Loading facts in sshkeys
info: Loading facts in interfaces
info: Loading facts in acpi_available
info: Loading facts in vserver
info: Loading facts in mysql
info: Loading facts in mountpoints
info: Loading facts in netmask
info: Loading facts in smbldap_installed
info: Loading facts in virtual
info: Loading facts in sshkeys
info: Loading facts in interfaces
info: Loading facts in acpi_available
info: Loading facts in vserver
info: Loading facts in mysql
info: Loading facts in mountpoints
info: Loading facts in netmask
info: Loading facts in smbldap_installed
info: Loading facts in virtual
err: Could not retrieve catalog from remote server: Error 400 on SERVER:
Unknown function debian_release at
/etc/puppet/modules-development/apt/manifests/init.pp:73 on node
node.mydomain.net
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run

There's a mention on the wiki [1] about plugins vs. environments but I
don't really get what would be needed.

[1] :
http://projects.puppetlabs.com/projects/1/wiki/Using_Multiple_Environments#Plugins+and+Facts

Could anybody help me sort out a way to do my tests?

-- 
Gabriel Filion

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



Re: [Puppet Users] functions and environments

2011-06-14 Thread Nigel Kersten
On Tue, Jun 14, 2011 at 1:26 PM, Gabriel Filion lelu...@gmail.com wrote:

 Hello,

 I'm trying to test out new features of a module before I deploy it and I
 have difficulty with the functions declared by the module.

 I'm using an enviroment called development where I dropped the new
 module and would like to test on a node with the following:

 puppetd --environment=development -t --noop

 I can see that the file containing the function gets created but puppet
 complains that it doesn't know the function in question:


Functions get executed master side, so even though they get delivered to the
node, they need to be accessible on the master.

What version of Puppet are you running on the master and nodes?



 info: Retrieving plugin
 notice: /File[/var/lib/puppet/lib]/mode: mode changed '775' to '755'
 notice: /File[/var/lib/puppet/lib/puppet]/mode: mode changed '775' to '755'
 notice: /File[/var/lib/puppet/lib/puppet/parser]/mode: mode changed
 '775' to '755'
 notice: /File[/var/lib/puppet/lib/puppet/parser/functions]/mode: mode
 changed '775' to '755'
 notice:

 /File[/var/lib/puppet/lib/puppet/parser/functions/debian_nextcodename.rb]/ensure:
 defined content as '{md5}930cce14ff8a84fa29f9a2312d564d37'
 notice:

 /File[/var/lib/puppet/lib/puppet/parser/functions/debian_nextrelease.rb]/ensure:
 defined content as '{md5}f314fb8d164034f1562acb00924d4232'
 notice:

 /File[/var/lib/puppet/lib/puppet/parser/functions/debian_release.rb]/ensure:
 defined content as '{md5}cb4789fe5e233f2ae193e84a754350f9'
 notice:

 /File[/var/lib/puppet/lib/puppet/parser/functions/debian_release_version.rb]/ensure:
 defined content as '{md5}8cd893cbb749897d17a28dd17a06ef6c'
 info: Loading downloaded plugin
 /var/lib/puppet/lib/puppet/parser/functions/debian_nextcodename.rb
 info: Loading downloaded plugin
 /var/lib/puppet/lib/puppet/parser/functions/debian_nextrelease.rb
 info: Loading downloaded plugin
 /var/lib/puppet/lib/puppet/parser/functions/debian_release.rb
 info: Loading downloaded plugin
 /var/lib/puppet/lib/puppet/parser/functions/debian_release_version.rb
 info: Loading facts in sshkeys
 info: Loading facts in interfaces
 info: Loading facts in acpi_available
 info: Loading facts in vserver
 info: Loading facts in mysql
 info: Loading facts in mountpoints
 info: Loading facts in netmask
 info: Loading facts in smbldap_installed
 info: Loading facts in virtual
 info: Loading facts in sshkeys
 info: Loading facts in interfaces
 info: Loading facts in acpi_available
 info: Loading facts in vserver
 info: Loading facts in mysql
 info: Loading facts in mountpoints
 info: Loading facts in netmask
 info: Loading facts in smbldap_installed
 info: Loading facts in virtual
 err: Could not retrieve catalog from remote server: Error 400 on SERVER:
 Unknown function debian_release at
 /etc/puppet/modules-development/apt/manifests/init.pp:73 on node
 node.mydomain.net
 warning: Not using cache on failed catalog
 err: Could not retrieve catalog; skipping run

 There's a mention on the wiki [1] about plugins vs. environments but I
 don't really get what would be needed.

 [1] :

 http://projects.puppetlabs.com/projects/1/wiki/Using_Multiple_Environments#Plugins+and+Facts

 Could anybody help me sort out a way to do my tests?

 --
 Gabriel Filion

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




-- 
Nigel Kersten
Product, Puppet Labs
@nigelkersten

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



[Puppet Users] Question about custom function.

2011-06-14 Thread Dominik Zyla
Hello group,

I'm trying to generate configuration for tomcat server. I want it to
depend on my mod_jk properties file. I wrote some simple script which
you can see here: http://pastebin.com/CffBr0Nc it works just fine.

So I tried to move it to puppet as my custom function. It's available
for review here: http://pastebin.com/AeQgTTT6

Now, when I'm running first in irb, I see that script loads
properties file and instance() function returns node_#{l} which is
`node_SOME_LETTER' and that's exactly what I want it to do.

But as long as I'm running irb against puppet file, I see there's no
data loaded into `filename' hash. When I run `puppetd -tv' on client,
I've got timeout (after 120 seconds which is default), but puppet master
is still running (spawned by passanger) until it got killed by
oom-killer.

Please, give me some hints what am I doing wrong.

Regards,
-- 
Dominik Zyla

-- 
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] Question about custom function.

2011-06-14 Thread Nan Liu
On Tue, Jun 14, 2011 at 1:40 PM, Dominik Zyla dominik.z...@gmail.com wrote:
 Hello group,

 I'm trying to generate configuration for tomcat server. I want it to
 depend on my mod_jk properties file. I wrote some simple script which
 you can see here: http://pastebin.com/CffBr0Nc it works just fine.

 So I tried to move it to puppet as my custom function. It's available
 for review here: http://pastebin.com/AeQgTTT6

 Now, when I'm running first in irb, I see that script loads
 properties file and instance() function returns node_#{l} which is
 `node_SOME_LETTER' and that's exactly what I want it to do.

 But as long as I'm running irb against puppet file, I see there's no
 data loaded into `filename' hash. When I run `puppetd -tv' on client,
 I've got timeout (after 120 seconds which is default), but puppet master
 is still running (spawned by passanger) until it got killed by
 oom-killer.

 Please, give me some hints what am I doing wrong.

Puppet functions examples:
http://projects.puppetlabs.com/projects/1/wiki/Writing_Your_Own_Functions

You should be doing something along the lines of:
module Puppet::Parser::Functions
  newfunction(:instance, :type= :rvalue) do |args|
letters = args[0]
hosts = args[1]
ports = args[2]
  ...
  end
end

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] Managing local + LDAP users and groups

2011-06-14 Thread Denmat
Just FYI, I use a fact that checks authconfig --test for ldap enabled. Then I 
exclude my user base create run in puppet based on the existence if this fact. 

For services and apps I include their user account creation in the module 
managing the service. Therefore they are no effected by the ldap fact.

Cheers,
Den
On 15/06/2011, at 3:57, Jacob Helwig ja...@puppetlabs.com wrote:

 On Tue, 14 Jun 2011 07:45:44 -0700, bradejr wrote:
 
 Our environment (mostly RHEL) uses LDAP for user and group
 administration. Unfortunately, we have some cases where (broken)
 software insists on  local users and groups. I'm guessing it's
 checking the files directly instead of using the proper system calls.
 
 Our current process is to create the local user/group matching the
 LDAP entries. How are people handling this case? Puppet won't create
 the user locally, as it sees the user as already existing. We are
 currently using exec to call the local versions of the commands
 (luseradd, lusermod, etc), but that's something of a hack and makes
 for more complex classes. Does anyone have a graceful way to handle
 this in puppet?
 
 Thanks,
 Rob
 
 
 Seems like it would be reasonable to make an luseradd provider for the
 user type along the same lines as the existing useradd one.
 
 Thanks for already opening a ticket for this!
 http://projects.puppetlabs.com/issues/7911
 
 -- 
 Jacob Helwig

-- 
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] Question about custom function.

2011-06-14 Thread Dominik Zyla
On Tue, Jun 14, 2011 at 02:04:33PM -0700, Nan Liu wrote:
 On Tue, Jun 14, 2011 at 1:40 PM, Dominik Zyla dominik.z...@gmail.com wrote:
  Hello group,
 
  I'm trying to generate configuration for tomcat server. I want it to
  depend on my mod_jk properties file. I wrote some simple script which
  you can see here: http://pastebin.com/CffBr0Nc it works just fine.
 
  So I tried to move it to puppet as my custom function. It's available
  for review here: http://pastebin.com/AeQgTTT6
 
  Now, when I'm running first in irb, I see that script loads
  properties file and instance() function returns node_#{l} which is
  `node_SOME_LETTER' and that's exactly what I want it to do.
 
  But as long as I'm running irb against puppet file, I see there's no
  data loaded into `filename' hash. When I run `puppetd -tv' on client,
  I've got timeout (after 120 seconds which is default), but puppet master
  is still running (spawned by passanger) until it got killed by
  oom-killer.
 
  Please, give me some hints what am I doing wrong.
 
 Puppet functions examples:
 http://projects.puppetlabs.com/projects/1/wiki/Writing_Your_Own_Functions

I read this so far.

 You should be doing something along the lines of:
 module Puppet::Parser::Functions
   newfunction(:instance, :type= :rvalue) do |args|
 letters = args[0]
 hosts = args[1]
 ports = args[2]
   ...
   end
 end

The problem is that I don't know values of hosts and ports and what I'm
trying to do is to determine this values depending on properties file
(it's similar to Java properties file).

-- 
Dominik Zyla

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

2011-06-14 Thread Denmat
You've got a full stop '.' at the include ntp line.

Cheers,
Den

On 15/06/2011, at 2:30, Craig White craig.wh...@ttiltd.com wrote:

 
 On Jun 14, 2011, at 8:33 AM, Peter Bukowinski wrote:
 
 Try quoting your node names, e.g.
 
 node 'ubuntu2.ttinet' {
 
 trying to keep this as simple as possible just to get one client to work.
 
 # cat site.pp
 import templates
 import nodes
 
 # cat nodes.pp
  node 'ubuntu.ttinet' {
include ntp.
  }
 
  node 'ubuntu2.ttinet' {
include ntp,
  }
 
 # cat templates.pp 
 class baseclass {
 }
 
 node default {
include baseclass
 }
 
 info: Not using expired node for ubuntu2.ttinet from cache; expired at Tue 
 Jun 14 09:23:28 -0700 2011
 info: Caching node for ubuntu2.ttinet
 debug: importing '/etc/puppet/manifests/templates.pp' in environment 
 production
 debug: importing '/etc/puppet/manifests/nodes.pp' in environment production
 err: Could not parse for environment production: Syntax error at '.'; 
 expected '}' at /etc/puppet/manifests/nodes.pp:2 on node ubuntu2.ttinet
 err: Could not parse for environment production: Syntax error at '.'; 
 expected '}' at /etc/puppet/manifests/nodes.pp:2 on node ubuntu2.ttinet
 ^Cnotice: Caught INT; calling stop
 
 quoting the node names changed nothing
 
 If there is actually some tutorial somewhere that actually shows me what it 
 is I need to do to connect in a second computer beyond just getting the 
 certificate, please let me know but I have been working on this since last 
 Friday. I am not that stupid. I got Chef working in just 2 or 3 hours.
 
 Thanks
 
 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.
 

-- 
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] Question about custom function.

2011-06-14 Thread Nan Liu
On Tue, Jun 14, 2011 at 2:30 PM, Dominik Zyla dominik.z...@gmail.com wrote:
 On Tue, Jun 14, 2011 at 02:04:33PM -0700, Nan Liu wrote:
 On Tue, Jun 14, 2011 at 1:40 PM, Dominik Zyla dominik.z...@gmail.com wrote:
  Hello group,
 
  I'm trying to generate configuration for tomcat server. I want it to
  depend on my mod_jk properties file. I wrote some simple script which
  you can see here: http://pastebin.com/CffBr0Nc it works just fine.
 
  So I tried to move it to puppet as my custom function. It's available
  for review here: http://pastebin.com/AeQgTTT6
 
  Now, when I'm running first in irb, I see that script loads
  properties file and instance() function returns node_#{l} which is
  `node_SOME_LETTER' and that's exactly what I want it to do.
 
  But as long as I'm running irb against puppet file, I see there's no
  data loaded into `filename' hash. When I run `puppetd -tv' on client,
  I've got timeout (after 120 seconds which is default), but puppet master
  is still running (spawned by passanger) until it got killed by
  oom-killer.
 
  Please, give me some hints what am I doing wrong.

 Puppet functions examples:
 http://projects.puppetlabs.com/projects/1/wiki/Writing_Your_Own_Functions

 I read this so far.

 You should be doing something along the lines of:
 module Puppet::Parser::Functions
   newfunction(:instance, :type= :rvalue) do |args|
     letters = args[0]
     hosts = args[1]
     ports = args[2]
   ...
   end
 end

 The problem is that I don't know values of hosts and ports and what I'm
 trying to do is to determine this values depending on properties file
 (it's similar to Java properties file).

Sorry, I thought it needed to pass the value for the function, if it's
expected to return the value I took a closer look and used a sample
tomcat worker.properties file, is this what you intend?
http://pastebin.com/kcwm7ZnV

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] RHEL 6 Optional channel

2011-06-14 Thread Michael Stahnke
On Mon, Jun 13, 2011 at 7:31 PM, Len Rugen lenru...@gmail.com wrote:

 It looks like all of our RHEL 6 systems now need to connect to the RHN
 Optional Channel.  (puppet, ruby vs. selinux deps)

 Is there a way to do that with a script without having to enter RHN userid
 and password?   Is there a way to add a channel during kickstart?

 Thanks


While this might be better suited for the Satellite list, you can make keys
that require certain channels automatically and use them in kickstarts.
There's also an API for RHN/Satellte that would allow you to add the
channel, but you might have to use your RHN userid/pw, I don't remember.  I
haven't used Satellite in just over a year now.

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



[Puppet Users] Re: puppet dashboard

2011-06-14 Thread George Bobeck
On Jun 14, 1:56 pm, Craig White craig.wh...@ttiltd.com wrote:
 I am using Ubuntu 10.04 and ruby-enterprise (not ubuntu ruby) and installed 
 puppet via gem.

 How can I install puppet-dashboard if I don't see a gem available and if I 
 use the ubuntu package, i get the whole slop of ruby packages sucked in 
 (which i am trying to avoid)?

I'm not sure if this would be helpful in this case, however here is
how to make dpkg ignore dep issues.

  dpkg -i --ignore-depends=package(s) to ignore package.deb

If more than one package needs to be ignored, seperate them with
commas:

  dpkg -i --ignore-depends=package1,package2 package3.deb

-- 
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] RHEL 6 Optional channel

2011-06-14 Thread Len Rugen
Thanks, we are paying for satellite but not the more useful newer
functions.

My registration key worked, but systems were just attached to the base
channel.  I was able to update my key on RHN and that is all that is
needed.


On Tue, Jun 14, 2011 at 10:09 AM, Aaron Grewell aaron.grew...@gmail.comwrote:

 Unless you're using RHN's system management features (and thus paying extra
 for the Management Entitlements) you won't be able to do this though.  And
 since you're using Puppet that seems unlikely.  I'd use either mrepo or
 yum-downloadonly to mirror your RHN repos to local yum repos so you can
 manage them more effectively.


 On Mon, Jun 13, 2011 at 11:14 PM, Steven Acres 
 ad...@swatteksystems.comwrote:

 On Mon, Jun 13, 2011 at 10:31 PM, Len Rugen lenru...@gmail.com wrote:

 It looks like all of our RHEL 6 systems now need to connect to the RHN
 Optional Channel.  (puppet, ruby vs. selinux deps)

 Is there a way to do that with a script without having to enter RHN
 userid and password?   Is there a way to add a channel during kickstart?

 Thanks

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


 Hi Len,

 https://access.redhat.com/kb/docs/DOC-2475

 --
 Cheers,

 Steven
 ---
 Steven Acres
 UNIX/Linux System Administrator


  --
 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] Question about custom function.

2011-06-14 Thread Dominik Zyla
On Tue, Jun 14, 2011 at 02:59:06PM -0700, Nan Liu wrote:
 On Tue, Jun 14, 2011 at 2:30 PM, Dominik Zyla dominik.z...@gmail.com wrote:
  On Tue, Jun 14, 2011 at 02:04:33PM -0700, Nan Liu wrote:
  On Tue, Jun 14, 2011 at 1:40 PM, Dominik Zyla dominik.z...@gmail.com 
  wrote:
   Hello group,
  
   I'm trying to generate configuration for tomcat server. I want it to
   depend on my mod_jk properties file. I wrote some simple script which
   you can see here: http://pastebin.com/CffBr0Nc it works just fine.
  
   So I tried to move it to puppet as my custom function. It's available
   for review here: http://pastebin.com/AeQgTTT6
  
   Now, when I'm running first in irb, I see that script loads
   properties file and instance() function returns node_#{l} which is
   `node_SOME_LETTER' and that's exactly what I want it to do.
  
   But as long as I'm running irb against puppet file, I see there's no
   data loaded into `filename' hash. When I run `puppetd -tv' on client,
   I've got timeout (after 120 seconds which is default), but puppet master
   is still running (spawned by passanger) until it got killed by
   oom-killer.
  
   Please, give me some hints what am I doing wrong.
 
  Puppet functions examples:
  http://projects.puppetlabs.com/projects/1/wiki/Writing_Your_Own_Functions
 
  I read this so far.
 
  You should be doing something along the lines of:
  module Puppet::Parser::Functions
    newfunction(:instance, :type= :rvalue) do |args|
      letters = args[0]
      hosts = args[1]
      ports = args[2]
    ...
    end
  end
 
  The problem is that I don't know values of hosts and ports and what I'm
  trying to do is to determine this values depending on properties file
  (it's similar to Java properties file).
 
 Sorry, I thought it needed to pass the value for the function, if it's
 expected to return the value I took a closer look and used a sample
 tomcat worker.properties file, is this what you intend?
 http://pastebin.com/kcwm7ZnV
 
 Thanks,

It works now. Thanks a lot, Nan. Now I understand much more about
writing custom functions and tomorrow I'll test it out. Once again
thanks.

Regards, 
-- 
Dominik Zyla

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



Re: [Puppet Users] puppet dashboard

2011-06-14 Thread Craig White

On Jun 14, 2011, at 12:00 PM, Nigel Kersten wrote:

 
 
 On Tue, Jun 14, 2011 at 11:56 AM, Craig White craig.wh...@ttiltd.com wrote:
 I am using Ubuntu 10.04 and ruby-enterprise (not ubuntu ruby) and installed 
 puppet via gem.
 
 How can I install puppet-dashboard if I don't see a gem available and if I 
 use the ubuntu package, i get the whole slop of ruby packages sucked in 
 (which i am trying to avoid)?
 
 If you're using Ruby EE, I would simply check out the git repository with the 
 appropriate release tag you want and install it that way, as you'll be 
 satisfying dependencies manually outside your package manager anyway.
 
 https://github.com/puppetlabs/puppet-dashboard/blob/master/README.markdown
-
I seem to be pretty close to having it working by pulling down w/ git

What I can't figure out is if puppet is in MySQL in a database called puppet 
and the dashboard created the database called dashboard, the dashboard is empty 
and doesn't have a clue about what's installed/available.

Perhaps this is just because the 'agent' must report and to that end, I have 
configured the system running puppetmaster ...

# cat /etc/puppet/puppet.conf
[main]
# Basic config:
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/etc/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
pluginsync=false
templatedir=$confdir/templates

#Puppetmaster-config:
[master]
storeconfigs = true
# MySQL-configuration:
dbadapter = mysql
dbuser = puppet
dbpassword = XX
dbserver = localhost
dbsocket = /var/run/mysqld/mysqld.sock
# SSL-config:
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY
# Reports to puppet-dashboard for each run:
reports = http, store
reporturl = http://puppet.ttinet:8000/reports/upload

[agent]
report = true

but even when I update my 'client' system, dashboard is still empty. I think I 
am missing something really basic.

Is the Dashboard not capable of reading files from /etc/puppet/ tree?  Does it 
only get data from 'agent' reports? Did I miss something in my setup to get the 
'agents' to report to Dashboard?

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] NGINX Puppet Module: Looking for Feedback/Use Cases

2011-06-14 Thread Eric Searcy
On Tue, Jun 7, 2011 at 9:20 AM, Jamison Fryman jami...@puppetlabs.com wrote:
 My ask is this: I'm really interested in the various use cases of nginx that 
 are used by the community today that we can roll into this module.

If I was going to use a module like this I'd probably need a fallback
for directly-controlled vhost config for those vhosts which are rather
complex (which happens to be most :-) ).

Here's a reverse caching proxy vhost of mine in front of SugarCRM
(itself on httpd): http://pastie.org/2069510
A Puppet master vhost: http://pastie.org/2069518
My nginx class (most of my classes look like this;
service+package+file): http://pastie.org/2069558

(I guess I have yet to subscribe to the goal that As Puppet matures,
it expected that the file resource will be used less and less to
manage content, and instead native resources will be used to do
so.---I use file all over the place without it having becoming
cumbersome, and in fact find this easier than abstracting configs
behind native types.  My 2c!)

Eric

-- 
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] dashboard ENC and parameterized classes

2011-06-14 Thread Ashley Gould
Looking at the release notes for dashboard 1.1.1, I see that param
classes are not yet supported within dashboard's external node
classifier feature.  A few months ago I saw a post suggesting the
following work around until there is support:

class foo ($var=default) {
   notify { $var: }
}

Parametrized classes are new in Puppet 2.6. Support for parametrized
classes via ENC was introduced in 2.6.5. Support for parametrized
classes in dashboard is on the road map.

Currently here's the way to declare parametrized classes in site.pp:

node node01 {
  class { foo:
var = hello world!,
  }
}

To support parametrized class in dashboard, I write a wrapper class
(necessary until Dashboard fully supports parametrized classes):
class foo::wrapper {
  class { foo:
 var =  $::foo_var,
  }
}

In this case assign class foo::wrapper to node1 in dashboard and
configure the parameter foo_var=hello world!.

---


I am tring to replicate this workaround without success.  Has anyone 
else gotten param classes working within dashboard ENC?



 

-- 

-ashley

Did you try poking at it with a stick?

-- 
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] ANNOUNCE: Puppet 2.6.9rc1 is available

2011-06-14 Thread Michael Stahnke
This release is a maintenance release of the 2.6.x series of Puppet.

This release is available for download at:
http://puppetlabs.com/downloads/puppet/puppet-2.6.9rc1.tar.gz

As an aside, I will be removing older release candidate files (from all
versions) from our downloads area over the next week or so.  If this is a
problem, please let me know. All older official releases will remain.

See the Verifying Puppet Download section at:
http://projects.puppetlabs.com/projects/puppet/wiki/Downloading_Puppet

Please report feedback via the Puppet Labs Redmine site, using an
affected version of 2.6.9
http://projects.puppetlabs.com/projects/puppet/

CHANGELOG:

2.6.9rc1

c6909a6 Merge branch '2.6.x' into 2.6rc
fc530ac Merge branch 'ticket/2.6.x/7506' into 2.6.x
db1a392 (#7506) Organize READMEs; specify supported Ruby versions in
README.md
4fb7cfe Merge branch 'ticket/2.6.x/6418' into 2.6.x
381fa40 (#6418) Make test 64118 more portable
f8c1132 Merge branch
'ticket/2.6.x/7127-prerun-command-failures-dont-stop-puppet' into 2.6.x
98ba407 (#7127) Stop puppet if a prerun command fails
6996e0b Do not needlessly create multiple reports when creating a
transaction
01c1142 Merge branch 'ticket/2.6.x/4416' into 2.6.x
caca469 (#4416) Ensure types are providified after reloading
413b136 (#4416) Always remove old provider before recreating it
d866ce1 Cleanup indentation, comment, and unused code
b1a506c Merge branch 'ticket/2.6.x/2128_docstrings' into 2.6.x
98f58ce (#2128) Add WARNING for node_name_{fact,value} descriptions
1cd848c (#2128) Whitespace only reflow commit
d9b5c1a (#2128) In-line docs for node_name_{fact,value}
e62734c Merge branch 'ticket/2.6.x/650' into 2.6.x
3f0dbb5 (#650) Allow symlinks for configuration directories
c260cf1 Fix acceptance tests not managing their masters
3d09ca8 Merge branch 'ticket/2.6.x/2128' into 2.6.x
1c70f0c (#2128) Add support for setting node name based on a fact
c629958 (#2128) Get facts before retrieving catalog
cd4fe14 (#2128) Add the ability to specify a node name
8ebec1e (#7193) Fix path issues with acceptance tests that call old shell
tests
9660f5e Merge branch
'ticket/2.6.x/6885-puppet-agent-fingerprint-requires---verbose-to-return-a-value'
into 2.6.x
16b2311 (#6885) puppet agent fingerprint requires --verbose to return a
value.
a00fd25 maint: Refactor specs in preparation for making node name more
flexible
805b287 Merge branch 'bug/2.6.x/5318-minimal-fix' into 2.6.x
75e2764 (#5318) Always notice changes to manifests when compiling.
6a00289 Merge branch 'ticket/2.6.x/7681' into 2.6.x
4a5e99d (#7681) Add an acceptance test for resource refs with array
variables
d7ce922 Merge branch 'test/2.6.x/4123' into 2.6.x
646919e (4123) Fix test for 4123/4 on old egrep in cent4
cbc123c Merge branch '2.6.next' into 2.6.x
25eab1a Merge branch 'ticket/2.6.next/3836' into 2.6.next
8b76be3 (#3836) External nodes should only capture stdout
1f438da Merge branch '2.6.next' into 2.6.x
1f438da Merge branch '2.6.next' into 2.6.x
8f907f2 adding test for ticket 7139
97e8ef3 Merge branch 'ticket/2.6.next/7139' into 2.6.next
90eb937 (#7139) Accept '/' as a valid path in filesets
37c86dd Merge remote-tracking branch 'toddz/feature/2.6.next/vim-indenting'
into 2.6.next
2892068 Merge branch 'ticket/2.6.next/6844' into 2.6.next
1b2a7d9 case seems needless here as there is only two opts, also the rest of
the file seems to use if so this should make thin
c4a2647 Merge branch 'ticket/2.6.x/6845' into 2.6.next
729336e (#6845) Mount writes incorrect vfstab entries
6ab2243 Merge branch 'ticket/2.6.next/6442-agent_doesnt_need_namespaceauth'
into 2.6.next
16cf1ac (#6442) Be able to start agents --listen without namespaceauth.conf
361d6a3 Merge branch 'tickets/2.6.next/3420' into 2.6.next
0352402 (#3420) Nagios name attribute does not output correctly
ddc4e14 Merge branch 'tickets/2.6.next/4487' into 2.6.next
f656818 (#4487) When setting environment on a host, ensure it is a string.
2cce326 add test for ticket 7101
1ee6f94 Merge branch
'tickets/2.6.x/6487-help-directoryservice-provider-work-on-future-OSX-versions'
into 2.6.next
c306db2 (#6487) Add some testing for OS X version support in
DirectoryService provider
0008b63 (#6487) Directoryservice provider will fail in future OS releases
0b9c7ad Merge branch 'maint/2.6.next/defined_type_has_two_parents' into
2.6.next
34f9f41 Maint: Fix a #4655 introduced log inconsistency
6b18f8f Move acceptance tests from puppet-acceptance repo
f6afa87 Merge branch 'ticket/2.6.next/7166' into 2.6.next
9a5bf6e Fixed #7166 - Replaced deprecated stomp send method with publish
72cd6fb Merge branch
'tickets/2.6.x/4655-parameterized-classes-default-stages' into 2.6.next
656eff8 (#4655) Allow stage to be set using a default class parameter
16d1f78 Merge remote branch 'james/tickets/2.6.x/6681' into 2.6.next
7f658e6 vim: Initial ftplugin and indent support
ccbe9f3 Fixed #6681 - Remove --force-yes option from aptitude is used

-- 
You received this message because you are subscribed to the 

[Puppet Users] Puppet Class execution order

2011-06-14 Thread Larry Ludwig
For the life of me I'm not sure why this isn't working properly but Puppet 
appears to execute classes in the order it feels like, not how I'm 
specifying it within the language.

I've tried the newer sytax

Class['one'] - Class['two']

Yet, I see Class two get executed first.

I've also tried doing it by defining the class itself.

class { 'one': require = Class['two'] }

I've even gone down to the specific function within the class to see if this 
helps ie:

class {'one': require = Exec['withinclasstwo'] }

And the same issue.. what gives?

I haven't looked at the resource graph yet but the amount of modules we use 
it's almost readable.

How can I force one class to get executed first before the other? Why in my 
case is it not working?

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/JHv2naxKQ2YJ.
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] require vs include?

2011-06-14 Thread Larry Ludwig
On a related note to my last post, what is the difference between a require 
and an include of a class?

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



[Puppet Users] Re: Puppet Class execution order

2011-06-14 Thread Larry Ludwig
Sorry the typo:

My examples should read:

class { 'two': require = Class['one'] }

class {'two: require = Exec['withinclassone'] }

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/HIBnBYkxst4J.
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] RHEL 6 Optional channel

2011-06-14 Thread Len Rugen
And I misspoke, we don't have satellite, just proxy.   Long day.

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