Re: [Puppet Users] Workaround to Provider groupadd does not support features manages_members ?

2011-08-08 Thread Peter Meier
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

 I wanted to manage a couple of groups membership, under RedHat,
 without managing the users (as they are LDAP users) but found out it
 is not supported Is there a workaround to this?

As denmat mentioned as well I would generally try to avoid a local
groups and ldap users mix.

But, it's possible to use augeas to manage users in a group:
https://github.com/duritong/puppet-user/blob/9bbd720da1549bf58c7707c1ac109a47e4b4a946/manifests/groups/manage_user.pp

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

iEYEARECAAYFAk4/hKkACgkQbwltcAfKi3+XuACePGaZjfkJm+ySkVoMq6z7VDGo
nLgAn2MGcXo7zbpwQNlN7VDtG8A35cE9
=AI9M
-END PGP SIGNATURE-

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



Re: [Puppet Users] Re: Unable to display Filebucket in Dashboard 1.2rc3 : We're sorry, but something went wrong

2011-08-08 Thread Peter Meier
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

 Also I noticed I can only read the first file, the changed file, not
 the second, the original (content changed '{md5}
 70c1c6de6d4b1a02ec32b463e4d255b0' to '{md5}
 78124298c2b4c1e63658599a2c208853') :
 
 info: FileBucket read 70c1c6de6d4b1a02ec32b463e4d255b0
 info: Could not find file_bucket_file for
 'md5/78124298c2b4c1e63658599a2c208853'

This is a known current limitation:
http://projects.puppetlabs.com/issues/7934

Because puppet hasn't yet uploaded the version of the file to the file
bucket it installed, it only uploads the changed versions.

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

iEYEARECAAYFAk4/hukACgkQbwltcAfKi38/mACfbsAwBocPZ/TqGXjWc2SJmWUW
PB8An1Rm+UkZVkQ0BSO5BGqL8ACF2apn
=QIfL
-END PGP SIGNATURE-

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



Re: [Puppet Users] duplicated ssh host keys

2011-08-08 Thread Andreas Kuntzagk

Thanks, that fixed this.

Stefan Schulte wrote:

On Fri, Aug 05, 2011 at 03:51:36PM +0200, Andreas Kuntzagk wrote:

Hi,

I'm managing hosts ssh keys by using exported resources.
I do this with this little config I found in the interWeb:

...
@@sshkey { $hostname,$ipaddress,$hostname-ext,$ipaddress_eth2: type = dsa, 
key = $sshdsakey }

...
Sshkey | |


You should only use $hostname as the resource title. What you want to do
is

@@sshkey { $hostname:
  ensure   = present,
  type = dsa,
  key  = $sshdsakey,
  host_aliases = [ $ipaddress, $hostname-ext, $ipaddress_eth2 ],
}

The problem is, that you specified host_aliases in the title and puppet
doesnt warn you about that.  This should be fixed in 2.7.0
(https://projects.puppetlabs.com/issues/2495)

-Stefan



--
Andreas Kuntzagk
SystemAdministrator
MDC Berlin / BIMSB
Tel.: +49 30 9406 2997

--
You received this message because you are subscribed to the Google Groups Puppet 
Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, 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] Workaround to Provider groupadd does not support features manages_members ?

2011-08-08 Thread Mohamed Lrhazi
Cool. Thanks you so much guys.

Mohamed.

On Mon, Aug 8, 2011 at 2:39 AM, Peter Meier peter.me...@immerda.ch wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi

 I wanted to manage a couple of groups membership, under RedHat,
 without managing the users (as they are LDAP users) but found out it
 is not supported Is there a workaround to this?

 As denmat mentioned as well I would generally try to avoid a local
 groups and ldap users mix.

 But, it's possible to use augeas to manage users in a group:
 https://github.com/duritong/puppet-user/blob/9bbd720da1549bf58c7707c1ac109a47e4b4a946/manifests/groups/manage_user.pp

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

 iEYEARECAAYFAk4/hKkACgkQbwltcAfKi3+XuACePGaZjfkJm+ySkVoMq6z7VDGo
 nLgAn2MGcXo7zbpwQNlN7VDtG8A35cE9
 =AI9M
 -END PGP SIGNATURE-

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



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, 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] The Debian service provider issue

2011-08-08 Thread Johan Sunnerstig
Hello people.
Regarding the issue with Debian 6 and enable/disable of services, I was 
wondering how people have worked around this while it's being worked out?
For reference, http://projects.puppetlabs.com/issues/7296

Do you simply make sure the services are turned off when puppet runs and 
disregard the enable/disable functionality for now? Or run smart exec's? Or 
something else I haven't thought about?

Any input on how others have worked with this would be much appreciated.

Regards
Johan

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, 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] Handling ENC / Class interface changes

2011-08-08 Thread Oliver Hookins
Hi all,

Recently I've hit against this problem which is proving to be a
formidable foe. We have an in-house developed ENC and use
parameterised classes just about everywhere and as a result enjoy a
fairly flexible way of handing out configurations and very well-
defined interfaces between components. We also quite strictly version
our Puppet code but there isn't a fixed versioning between the ENC
YAML and the Puppet code that it drives.

Whenever we want to add additional parameters to certain classes,
unless we update that class and the YAML that drives it atomically
everywhere, we end up in a situation where the YAML does not match the
parameterised class and causes errors. Perhaps it is best shown as
code:

YAML:
classes:
  foo:
var1: foo
var2: bar

Puppet:
class foo (
  $var1,
  $var2
) { ... }

Now we want to add a new parameter to this class for a certain subset
of nodes that need new functionality:
class foo (
  $var1,
  $var2,
  $var3 = 'somedefault'
) { ... }

Since we have module versioning, we only need to worry about the new
nodes getting this version of the class. Unfortunately the YAML that
drives them is the same. The problem now is that adding the new
parameter to the YAML will break any machine that uses the old class -
additional parameters that don't exist in the class interface will
cause a failure.

We've thought of a few solutions:
  * pass all the parameters as a hash (breaks the interface
consistency and verification, requires additional hash parameter
handling)
  * hack Puppet to not complain about additional unexpected parameters
(breaks the concept of well-defined interfaces)
  * hack Puppet to take an arg* final parameter (an awful combination
of the above two)
  * version our YAML interfaces in lockstep with Puppet classes
(removes our ability to benefit from inheritance of common class
definitions in the ENC)
  * never add new parameters to anything unless we can atomically
change it everywhere at once
  * using class introspection, generate class interface YAML that is
read and used by our ENC instead of using a separate configuration
specification, store this with the versioned Puppet classes.

I guess this could constitute a fairly solid argument against the
parameterised class interface benefits I've been arguing for and a
theoretical vote for Hiera ;) Anyway any thoughts or abuse are welcome!

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, 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] Handling ENC / Class interface changes

2011-08-08 Thread Ken Barber
Hey Oliver :-).

  * using class introspection, generate class interface YAML that is
 read and used by our ENC instead of using a separate configuration
 specification, store this with the versioned Puppet classes.

I guess resource_type is your friend in this case. Info should be
available in the REST API guide. Sounds tricky though.

 I guess this could constitute a fairly solid argument against the
 parameterised class interface benefits I've been arguing for and a
 theoretical vote for Hiera ;)

Indeed. Hiera or any function could be designed to be more forgiving
... since you can be in control of the class instantiation not Puppet
core. Really you would just be solving the problem in similar ways as
you defined in your email ... but without hacking core.
Benefits/drawback's don't change much - just the methodology becomes
easier.

ken.

-- 
Join us for PuppetConf, September 22nd and 23rd in Portland, OR:
http://bit.ly/puppetconfsig;

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



[Puppet Users] Re: Does Node Inheritance work for people?

2011-08-08 Thread Alessandro Franceschi
I've ALWAYS used nodes inheritance and have NEVER had problems with
them:
- no scoping issues (well just at the beginning when I didn't realize
what I'm going to write below)
- no problems with resource defaults (I actually just set few general
defaults without overriding them).

I've always wondered what's this fuzz about nodes' inheritance bad
reputation, even in James' book.
You just have to take care of one thing:
- Use nodes inheritance to set and override variables NOT to include
classes.
NEVER include a class in the inheritance tree (well you can if you
don't redefine variables used in that class but still is not
necessary).
In a nodes inheritance layout BEFORE you set the variables and THEN
you include classes (in my case role classes).

In my typical layout I've one or more inheritance levels where I set
and, according to needs, override variables and in the final node (the
one with the actual node hostname) I just include a role class.
In the role class sometimes I set some more variables (typically
related to the classes included in the role), THEN include a general
class (which includes all the common classes) and FINALLY include the
classes and defines related to that role.

So the point IMHO is much better to explain the minimal
recommendations that the nodes' inheritance approach require rather
than just saying that it's wrong or not recommended. Said this I'm not
saying that this is the BEST possible (still wonder what could be the
best, in Puppet's world), but that it works well and without
problems, that scales well.

An example of such a layout is here:
https://github.com/example42/puppet-infrastructures

My2c
Al

On Aug 5, 3:33 pm, Nigel Kersten ni...@puppetlabs.com wrote:
 We have a bunch of problems people regularly run into with node inheritance,
 and it's something we'd like to find a better solution for.

 Is anyone using node inheritance and happy with how it works? If so, can you
 describe your setup briefly?

 --
 Nigel Kersten
 Product Manager, Puppet Labs

 *Join us for **PuppetConf *
 http://www.bit.ly/puppetconfsig
 Sept 22/23 Portland, Oregon, USA.
 *
 *

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, 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: pluginsync before catalogue?

2011-08-08 Thread jcbollinger


On Aug 6, 1:10 am, John Martin pbweb...@gmail.com wrote:
 Hey John,

 I've been using environments quite some time with lots of success.  I
 love the idea of creating a bootstrap environment which I never
 thought of.

 This gave me an idea to address an issue I'm trying to tackle.   A
 client s using Puppet for their app setup/deployment. We provide the
 sysops management.  We need to isolate app from ops so what I'm
 thinking is having a cron job that invoke puppet updates twice passing
 different environment name (i.e. prod_app or prod_opp).  Do you see
 any problem with that?


Yes, actually, I'm afraid I do.  It's one thing to orchestrate a
bootstrapping process by using Puppet to progress the client through a
sequence of states represented by different environments.  In that
case, each environment encompasses everything about the node that is
managed at the corresponding point in the process.

It's a different thing altogether to apply configurations that
alternate between entirely separate sets of managed resources.  It
would be even worse if the resources managed in the different
configurations did not fall into disjoint sets.  Conceptually, it's
the wrong model.  Practically, it opens the door to a variety of
problems, though I don't currently see any that would be complete
showstoppers.

Every configuration delivered to your nodes should be complete.

For your situation, I like Aaron's idea of giving the client their own
module path to work with.  This does not completely isolate their
classes from yours, inasmuch as resource declarations and global
variable definitions are globally visible, but I think that's what you
actually want.  If the app has a different idea about the needed
properties of some resource than sysops has, then the two of you need
to work out an agreement.  Anything else will result in the resource
always having the wrong properties from at least one party's
perspective.


 Also you mentioned issues with environments and how to get around
 them.  Could you elaborate on that?


I was mostly talking about the matters discussed in Puppet issue
#3910, which Craig linked in a much earlier post in this thread.  The
issue description and the associated comments are a worthwhile read
for anyone using environments or considering doing so.  As for working
around the problems, here are some things that you might consider;

1) IF it is consistent with your security model and other needs,
consider always putting nodes in their self-specified environments.
In that case, all should be good from a Puppet perspective.

2) If you choose to specify node environments server-side, then beware
of setting different module paths for different environments.  If you
must do so, then structure your manifests so that you can keep all the
common path elements at the beginning of the path, in the same order
for all environments.  Serve plugins and files only out of those
paths, or otherwise keep plugins and served files synchronized across
all module paths.

3) Do not rely on node environment for access control to files and
plugins.

4) Beware of the $::environment variable.  Its semantics are not well
defined when the client requests one environment and the server
chooses a different one for it.  I am not personally confident that
its current behavior will be retained when issue #3910 is finally
resolved, which appears to be slated for Real Soon Now.


John

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



[Puppet Users] Re: puppet dashboard error 500 when trying to view a report detail

2011-08-08 Thread Nathan Yehle
I get this error too using rpms for puppet installed on SL55 x86_64
puppet-2.6.6-1.el5
puppet-dashboard-1.1.1-1
puppet-server-2.6.6-1.el5


Did you ever fix it?
-Nate

-- 
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/-/-9oVwf7xHFwJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, 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] Hash Interpolation inside double quotes?

2011-08-08 Thread Douglas Garstang
I've got this:

file {
'/opt/sugarsync/tomcat/tomcat-home/current':
ensure = tomcat-$config['tomcat_version_server'];

where $config['tomcat_version_server'] was set with extlookup (the yaml
one), by loading:

---
tomcat_config:
  tomcat_version_server: 6.0.20-1
  tomcat_version_libs: 1.0-1

Inside those double quotes, where variable interpolation is supposed to
occur, I'm actually getting:

tomcat-tomcat_version_libs1.0-1tomcat_version_server6.0.20-1['tomcat_version_server']

Not '6.0.20-1'. How can I interpolate a hash inside a string? Is this a bug?

Doug.

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



Re: [Puppet Users] Hash Interpolation inside double quotes?

2011-08-08 Thread Brian Gallew
String interpolation in the Puppet DSL is strictly variable-string, and does 
not handle arrays.  For what you want, use
inline_template(tomcat-%= $config['tomcat_version_server'] %)


On Aug 8, 2011, at 11:19 AM, Douglas Garstang wrote:

 I've got this:
 
 file {
 '/opt/sugarsync/tomcat/tomcat-home/current':
 ensure = tomcat-$config['tomcat_version_server'];
 
 where $config['tomcat_version_server'] was set with extlookup (the yaml one), 
 by loading:
 
 ---
 tomcat_config:
   tomcat_version_server: 6.0.20-1
   tomcat_version_libs: 1.0-1
 
 Inside those double quotes, where variable interpolation is supposed to 
 occur, I'm actually getting:
 
 tomcat-tomcat_version_libs1.0-1tomcat_version_server6.0.20-1['tomcat_version_server']
 
 Not '6.0.20-1'. How can I interpolate a hash inside a string? Is this a bug?
 
 Doug.
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-users?hl=en.

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



Re: [Puppet Users] Hash Interpolation inside double quotes?

2011-08-08 Thread Douglas Garstang
Hmmm I tried that, with:

file {
'/opt/sugarsync/tomcat/tomcat-home/current':
ensure = inline_template(tomcat-%=
$config['tomcat_version_server'] %);
}

and that results in:

Aug  8 11:51:03 hpma01p1 puppet-master[18712]: compile error (erb):1: no
.digit floating literal anymore; put 0 before dot _erbout = '';
_erbout.concat tomcat-; _erbout.concat((
tomcat_version_libs1.0-1tomcat_version_server6.0.20-1['tomcat_version_server']
).to_s); _erbout
  ^ (erb):1: syntax error _erbout = ''; _erbout.concat
tomcat-; _erbout.concat((
tomcat_version_libs1.0-1tomcat_version_server6.0.20-1['tomcat_version_server']
).to_s); _erbout
   ^ (erb):1: syntax error _erbout = ''; _erbout.concat
tomcat-; _erbout.concat((
tomcat_version_libs1.0-1tomcat_version_server6.0.20-1['tomcat_version_server']
).to_s); _erbout
   ^ (erb):1: no .digit floating
literal anymore; put 0 before dot _erbout = ''; _erbout.concat tomcat-;
_erbout.concat(( tomcat_versi



On Mon, Aug 8, 2011 at 11:22 AM, Brian Gallew g...@gallew.org wrote:

 String interpolation in the Puppet DSL is strictly variable-string, and
 does not handle arrays.  For what you want, use
 inline_template(tomcat-%= $config['tomcat_version_server'] %)


 On Aug 8, 2011, at 11:19 AM, Douglas Garstang wrote:

  I've got this:
 
  file {
  '/opt/sugarsync/tomcat/tomcat-home/current':
  ensure = tomcat-$config['tomcat_version_server'];
 
  where $config['tomcat_version_server'] was set with extlookup (the yaml
 one), by loading:
 
  ---
  tomcat_config:
tomcat_version_server: 6.0.20-1
tomcat_version_libs: 1.0-1
 
  Inside those double quotes, where variable interpolation is supposed to
 occur, I'm actually getting:
 
 
 tomcat-tomcat_version_libs1.0-1tomcat_version_server6.0.20-1['tomcat_version_server']
 
  Not '6.0.20-1'. How can I interpolate a hash inside a string? Is this a
 bug?
 
  Doug.
 
  --
  You received this message because you are subscribed to the Google Groups
 Puppet Users group.
  To post to this group, send email to puppet-users@googlegroups.com.
  To unsubscribe from this group, send email to
 puppet-users+unsubscr...@googlegroups.com.
  For more options, visit this group at
 http://groups.google.com/group/puppet-users?hl=en.

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




-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, 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] Hash Interpolation inside double quotes?

2011-08-08 Thread vagn scott

On 08/08/2011 02:52 PM, Douglas Garstang wrote:


file {
'/opt/sugarsync/tomcat/tomcat-home/current':
ensure = inline_template(tomcat-%= 
$config['tomcat_version_server'] %);

}



Try without the dollar sign:

  file {
'/opt/sugarsync/tomcat/tomcat-home/current':
ensure = inline_template(tomcat-%= 
config['tomcat_version_server'] %);

}

--
You received this message because you are subscribed to the Google Groups Puppet 
Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, 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] Hash Interpolation inside double quotes?

2011-08-08 Thread Douglas Garstang
Thanks. That did it. Ugly...

On Mon, Aug 8, 2011 at 12:47 PM, vagn scott vagnsc...@gmail.com wrote:

 On 08/08/2011 02:52 PM, Douglas Garstang wrote:


file {
'/opt/sugarsync/tomcat/tomcat-**home/current':
ensure = inline_template(tomcat-%= $config['tomcat_version_
 **server'] %);
}


 Try without the dollar sign:


  file {
'/opt/sugarsync/tomcat/tomcat-**home/current':
ensure = inline_template(tomcat-%=
 config['tomcat_version_server'**] %);
}

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




-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, 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] Hash Interpolation inside double quotes?

2011-08-08 Thread Scott Smith
Works the same as it does in Bourne shell. If you want to use double quotes
inside a double-quoted string, you have to escape them. Or use single
quotes.

On Mon, Aug 8, 2011 at 12:58 PM, Douglas Garstang
doug.garst...@gmail.comwrote:

 Thanks. That did it. Ugly...


 On Mon, Aug 8, 2011 at 12:47 PM, vagn scott vagnsc...@gmail.com wrote:

 On 08/08/2011 02:52 PM, Douglas Garstang wrote:


file {
'/opt/sugarsync/tomcat/tomcat-**home/current':
ensure = inline_template(tomcat-%= $config['tomcat_version_
 **server'] %);
}


 Try without the dollar sign:


  file {
'/opt/sugarsync/tomcat/tomcat-**home/current':
ensure = inline_template(tomcat-%=
 config['tomcat_version_server'**] %);
}

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




 --
 Regards,

 Douglas Garstang
 http://www.linkedin.com/in/garstang
 Email: doug.garst...@gmail.com
 Cell: +1-805-340-5627

  --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, 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] Hash Interpolation inside double quotes?

2011-08-08 Thread Douglas Garstang
I wasn't trying to use double quotes inside a double quoted string.

On Mon, Aug 8, 2011 at 1:01 PM, Scott Smith sc...@ohlol.net wrote:

 Works the same as it does in Bourne shell. If you want to use double quotes
 inside a double-quoted string, you have to escape them. Or use single
 quotes.

 On Mon, Aug 8, 2011 at 12:58 PM, Douglas Garstang doug.garst...@gmail.com
  wrote:

 Thanks. That did it. Ugly...


 On Mon, Aug 8, 2011 at 12:47 PM, vagn scott vagnsc...@gmail.com wrote:

 On 08/08/2011 02:52 PM, Douglas Garstang wrote:


file {
'/opt/sugarsync/tomcat/tomcat-**home/current':
ensure = inline_template(tomcat-%=
 $config['tomcat_version_**server'] %);
}


 Try without the dollar sign:


  file {
'/opt/sugarsync/tomcat/tomcat-**home/current':
ensure = inline_template(tomcat-%=
 config['tomcat_version_server'**] %);
}

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




 --
 Regards,

 Douglas Garstang
 http://www.linkedin.com/in/garstang
 Email: doug.garst...@gmail.com
 Cell: +1-805-340-5627

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




-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, 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] Hash Interpolation inside double quotes?

2011-08-08 Thread Scott Smith
D'oh, looks like I need to refresh my vision prescription :(

On Mon, Aug 8, 2011 at 1:09 PM, Douglas Garstang doug.garst...@gmail.comwrote:

 I wasn't trying to use double quotes inside a double quoted string.


 On Mon, Aug 8, 2011 at 1:01 PM, Scott Smith sc...@ohlol.net wrote:

 Works the same as it does in Bourne shell. If you want to use double
 quotes inside a double-quoted string, you have to escape them. Or use single
 quotes.

 On Mon, Aug 8, 2011 at 12:58 PM, Douglas Garstang 
 doug.garst...@gmail.com wrote:

 Thanks. That did it. Ugly...


 On Mon, Aug 8, 2011 at 12:47 PM, vagn scott vagnsc...@gmail.com wrote:

 On 08/08/2011 02:52 PM, Douglas Garstang wrote:


file {
'/opt/sugarsync/tomcat/tomcat-**home/current':
ensure = inline_template(tomcat-%=
 $config['tomcat_version_**server'] %);
}


 Try without the dollar sign:


  file {
'/opt/sugarsync/tomcat/tomcat-**home/current':
ensure = inline_template(tomcat-%=
 config['tomcat_version_server'**] %);
}

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




 --
 Regards,

 Douglas Garstang
 http://www.linkedin.com/in/garstang
 Email: doug.garst...@gmail.com
 Cell: +1-805-340-5627

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




 --
 Regards,

 Douglas Garstang
 http://www.linkedin.com/in/garstang
 Email: doug.garst...@gmail.com
 Cell: +1-805-340-5627

  --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, 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] Hash Interpolation inside double quotes?

2011-08-08 Thread Douglas Garstang
But, I would like to replace:

file {
${tomcat_home_dir}/current:
ensure = inline_template(tomcat-%=
config['tomcat_version_server'] %);
}

with:

file {
$config['tomcat_home_dir']/current:
ensure = inline_template(tomcat-%=
config['tomcat_version_server'] %);
}

... and I don't think that will work. Obviously, I can't use an inline
template here...

Doug.

On Mon, Aug 8, 2011 at 1:11 PM, Scott Smith sc...@ohlol.net wrote:

 D'oh, looks like I need to refresh my vision prescription :(


 On Mon, Aug 8, 2011 at 1:09 PM, Douglas Garstang 
 doug.garst...@gmail.comwrote:

 I wasn't trying to use double quotes inside a double quoted string.


 On Mon, Aug 8, 2011 at 1:01 PM, Scott Smith sc...@ohlol.net wrote:

 Works the same as it does in Bourne shell. If you want to use double
 quotes inside a double-quoted string, you have to escape them. Or use single
 quotes.

 On Mon, Aug 8, 2011 at 12:58 PM, Douglas Garstang 
 doug.garst...@gmail.com wrote:

 Thanks. That did it. Ugly...


 On Mon, Aug 8, 2011 at 12:47 PM, vagn scott vagnsc...@gmail.comwrote:

 On 08/08/2011 02:52 PM, Douglas Garstang wrote:


file {
'/opt/sugarsync/tomcat/tomcat-**home/current':
ensure = inline_template(tomcat-%=
 $config['tomcat_version_**server'] %);
}


 Try without the dollar sign:


  file {
'/opt/sugarsync/tomcat/tomcat-**home/current':
ensure = inline_template(tomcat-%=
 config['tomcat_version_server'**] %);
}

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




 --
 Regards,

 Douglas Garstang
 http://www.linkedin.com/in/garstang
 Email: doug.garst...@gmail.com
 Cell: +1-805-340-5627

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




 --
 Regards,

 Douglas Garstang
 http://www.linkedin.com/in/garstang
 Email: doug.garst...@gmail.com
 Cell: +1-805-340-5627

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




-- 
Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garst...@gmail.com
Cell: +1-805-340-5627

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, 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] Hash Interpolation inside double quotes?

2011-08-08 Thread vagn scott

On 08/08/2011 04:26 PM, Douglas Garstang wrote:

But, I would like to replace:

file {
${tomcat_home_dir}/current:
ensure = inline_template(tomcat-%= 
config['tomcat_version_server'] %);

}

with:

file {
$config['tomcat_home_dir']/current:
ensure = inline_template(tomcat-%= 
config['tomcat_version_server'] %);

}



$f = inline_template(%= config['tomcat_home_dir'] -%/current)
$v = inline_template(tomcat-%= config['tomcat_version_server'] %)

file {
${f}:
ensure = ${v},
}

Or similar.

--
vagn

--
You received this message because you are subscribed to the Google Groups Puppet 
Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, 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] Hash Interpolation inside double quotes?

2011-08-08 Thread Thomas Bellman
Douglas Garstang wrote:

 How can I interpolate a hash inside a string?

Like this:

tomcat-${config['tomcat_version_server']}

The curly braces groups things so the parser knows that the
variable expression to expand doesn't end after the g in
config.

I'm not sure where this is documented, though.  I can't find
it after a quick look in the language guide, where I had
expected it to be.


/Bellman

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



Re: [Puppet Users] Hash Interpolation inside double quotes?

2011-08-08 Thread Stefan Schulte
On Mon, Aug 08, 2011 at 11:19:36AM -0700, Douglas Garstang wrote:
 I've got this:
 
 file {
 '/opt/sugarsync/tomcat/tomcat-home/current':
 ensure = tomcat-$config['tomcat_version_server'];
 
 where $config['tomcat_version_server'] was set with extlookup (the yaml
 one), by loading:
 
 ---
 tomcat_config:
   tomcat_version_server: 6.0.20-1
   tomcat_version_libs: 1.0-1
 
 Inside those double quotes, where variable interpolation is supposed to
 occur, I'm actually getting:
 
 tomcat-tomcat_version_libs1.0-1tomcat_version_server6.0.20-1['tomcat_version_server']
 
 Not '6.0.20-1'. How can I interpolate a hash inside a string? Is this a bug?
 
 Doug.
 
IIRC it should read tomcat-${config['tomcat_version_server']} (notice
the curling braces). Otherwise puppet will print the hash first (and
concats all keys and values) and then just put ['tomcat_version_server']
after it.

Does the above suggestion work?

-Stefan


pgpWcTdQLgzNq.pgp
Description: PGP signature


[Puppet Users] Re: pluginsync before catalogue?

2011-08-08 Thread John Martin
John-

Thanks for that in-depth feedback.  It was great and something to chew
on.  I'm going to need to evaluate the integrity risk to the isolation
requirements of the client to see which practice makes most sense.  I
do agree that the addition module approach would add to the
consistency.

It occurred to me that I can have separate source code trees for our
own modules there by supporting separate release cycles as well
instead of checking the code into the same repo.  The Dev team manages
5-6 environments but Ops only has test and production.

-John

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



[Puppet Users] Run command based on OS version

2011-08-08 Thread Steve
I'm trying to write a script that runs command based on version of
Redhat OS. For example, if the RHEL version is 6.0, it will run
command. I was able to write file read script in ruby that would read
file and execute but it didn't seem to work in puppet script. Has
anyone done something like this?



$redhat_version_file = /etc/redhat-release
$redhat_version = File.read($redhat_version_file)
if ($redhat_version =~ /6.0/) { command }

or

$redhat_version_file = /etc/redhat-release
if ( File.open($redhat_version_file).read().include? 6.0) {command}

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, 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] Help with retrieving a user's environment variable

2011-08-08 Thread Corey Osman
Hi,

I need to get the environment variable ORACLE_SID from the OS.  I know this can 
be done with the following:

$blah = env(PATH)

However, the ORACLE_SID variable is only set under the oracle user account.  So 
I would need a way to login as the oracle account first to retrieve the 
ORACLE_SID variable.  Is there anyway to get the environment variable from a 
user's account instead of the default account puppet runs under?


Corey

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, 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] Run command based on OS version

2011-08-08 Thread Kinzel, David

I'm trying to write a script that runs command based on version of
Redhat OS. For example, if the RHEL version is 6.0, it will run
command. I was able to write file read script in ruby that would read
file and execute but it didn't seem to work in puppet script. Has
anyone done something like this?



Look at the pre-built $operatingsystemrelease fact before you try to
roll your own.


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] class locating problem

2011-08-08 Thread David Kavanagh
I have a problem importing a class. Here's they layout

eucalyptus/manifests/init.pp (imports eucalyptus::ntp)
eucalyptus/modules/ntp/manifests/init.pp (defines class eucalyptus::ntp)

when I run puppet apply, specifying the modulepath to be the parent
directory of eucalyptus, I see this;

Could not find class eucalyptus::ntp for eucahost-51-97.eucalyptus at
/root/git/puppetlabs-eucalyptus/eucalyptus/manifests/init.pp:32 on
node eucahost-51-97.eucalyptus


Any thoughts?

David

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, 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] Return a value from a definition?

2011-08-08 Thread Douglas Garstang
All,

I have this:

#
# External configuration data.
#
$config = extlookup(platform_config,
  extlookup(platform_config,
  extlookup(platform_config,
  extlookup(platform_config,
  Unknown,
  config/${ss_fac}/${ss_env}/${ss_clu}/${fqdn}/platform),
  config/${ss_fac}/${ss_env}/${ss_clu}/platform),
  config/${ss_fac}/${ss_env}/platform),
  config/${ss_fac}/platform)


... which is kinda ugly. Is there a way to wrap this up in a defintion and
return the value from the definition? As far as I know, definitions can't
return values.

Doug.

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



[Puppet Users] Re: Run command based on OS version

2011-08-08 Thread Steve
That's good to know that there is '$operatingsystemrelease' built-in
variable. But I have other applications with version files and I need
to run specific class/command based on versions. Any suggestions how I
should go around it?

On Aug 8, 2:52 pm, Kinzel, David david.kin...@encana.com wrote:
 I'm trying to write a script that runs command based on version of
 Redhat OS. For example, if the RHEL version is 6.0, it will run
 command. I was able to write file read script in ruby that would read
 file and execute but it didn't seem to work in puppet script. Has
 anyone done something like this?

 Look at the pre-built $operatingsystemrelease fact before you try to
 roll your own.

 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.



Re: [Puppet Users] Re: Run command based on OS version

2011-08-08 Thread Len Rugen
Create a custom fact for your own needs.

FYI $operatingsystemrelase (or some facts) may need the *lsb* packages.
(I don't have the exact name, redhat-lsb, I think, if redhat)

On Mon, Aug 8, 2011 at 6:30 PM, Steve some1youk...@gmail.com wrote:

 That's good to know that there is '$operatingsystemrelease' built-in
 variable. But I have other applications with version files and I need
 to run specific class/command based on versions. Any suggestions how I
 should go around it?

 On Aug 8, 2:52 pm, Kinzel, David david.kin...@encana.com wrote:
  I'm trying to write a script that runs command based on version of
  Redhat OS. For example, if the RHEL version is 6.0, it will run
  command. I was able to write file read script in ruby that would read
  file and execute but it didn't seem to work in puppet script. Has
  anyone done something like this?
 
  Look at the pre-built $operatingsystemrelease fact before you try to
  roll your own.
 
  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.



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