Re: [Puppet Users] puppet user context

2014-01-17 Thread Andrey Kozichev
Not sure, what is your task.
Where are you getting users from? Is it everyone or do you have defined
list?


Andrey


On 17 Jan 2014 07:39, Robert Turk r.t...@reproflex.de wrote:


 Am 16.01.14 13:50, schrieb Andrey Kozichev:

 Do you need to run this only for logged in users?

 No not really... You suggest I could do something like checking which
 users exist on the machine and then run it for these users
 ignoring if they are logged in or not?

  You can use facter fact to return logged in users and use it in your
 manifest.

 Do you mean building a custom fact for this value?

 Robert


 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit https://groups.google.com/d/
 msgid/puppet-users/52D8DE22.6050906%40reproflex.de.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CACzr%3DFfwNV0zOcQYVVopck-xC-Rvv_wxnvOXywDXkjZghFA9ww%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Collector, Overriding Params and undef vars

2014-01-17 Thread William Leese
Hi,

I had a nice setup where I'd load a hash of from hiera as virtual 
resources. These would be considered defaults that could be overridden 
through a defined type. The defined type would allow things like homedir 
and such to be overridden and the rest of the params would use the defaults 
as already set when declaring the virtual resource.

Suddenly someone discovered that this no longer worked. I'm pretty sure it 
did in the past though.

define userman_mw::users::virtualuser (
  $tagged = undef,
  $account= undef,
  $email  = undef,
  $groups = undef,
  $uid= undef,
  $shell  = undef,
  $homedir= undef,
  $homemode   = undef,
  $manage_homedir = undef,
  $service= false,
) {
  Userman_mw::Add_user | $attribute == $value | {
email  = $email,
groups = $groups,
uid= $uid,
shell  = $shell,
homedir= $homedir,
homemode   = $homemode,
manage_homedir = $manage_homedir,
  }
}

This a snipped version of the define that allows overriding. In the past, 
when no overrides were provided, the collector seemed to interpret that as 
'do not change whatever the param was initially declared as'. Now, despite 
being 'undef', these variables cause the declared parameters values to be 
set to nil.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/35922b4a-bd48-463b-9efb-ce336b6ac370%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Dynamic lookup deprecation warning

2014-01-17 Thread Andrea Cappelli

Il 17/01/2014 13:12, Jason Antman ha scritto:

On 01/16/2014 11:56 AM, Andrea Cappelli wrote:

Hi,
I'm searching through the logs of my master for the warning in the
subject, to move to Puppet3

Sometimes in the warning the manifest name isn't showed up, thereis a
reason?

Thu Jan 16 14:58:02 +0100 2014 Puppet (warning): Dynamic lookup of
$mailaddr is deprecated. For more information, see
http://docs.puppetlabs.com/guides/scope_and_puppet.html. To see the
change in behavior, use the --debug flag.

Have you tried running with the --debug flag as suggested?


Using --debug doesn't give me more info on the path where the error is, 
only adds info about what changed. My problem is that I don't know  
(exactly) where to find ythe manifests



Have you tried just grepping your modules/manifests for $mailaddr ???


Sure, and with some work I can find all problems, I was just wondering 
why in some cases the path is showed and in some others it isn't



There's a specific location: Dynamic lookup of $domain at 
/path/to/a/file/dotpp.pp/:127


I pick up 2 lines form my log file to show that for some warning the 
path is reported (as in this case) but in other case (the former log 
line) it isn't



Thanks for your help

--
Andrea Cappelli

--
You received this message because you are subscribed to the Google Groups Puppet 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/52D91FE5.9000400%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Puppet failed run: How to find?

2014-01-17 Thread kaustubh chaudhari
Hey Jason,

Thanks for the email!

Yes i am using Open Source Puppet! 3.3.2 and dashboard version 1.2.23.

I would appreciate if you can redirect me or share a link regarding the 
options that you mentioned.

-Kaustubh

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/8ead04a4-d72c-47a3-8b4a-31ec7b4fd25a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Dynamic lookup deprecation warning

2014-01-17 Thread Jason Antman
Andrea,

Ok, now I see your question more clearly, about the missing information.
I've seen this before as well, but don't remember why. I *believe* (but
may be totally wrong) it's something about included or required classes,
and that by time the dynamic lookup is evaluated, the source line where
it occurred is no longer known.

Someone else will probably chime in and correct me if my memory was
totally inaccurate.

-Jason

On 01/17/2014 07:19 AM, Andrea Cappelli wrote:
 Il 17/01/2014 13:12, Jason Antman ha scritto:
 On 01/16/2014 11:56 AM, Andrea Cappelli wrote:
 Hi,
 I'm searching through the logs of my master for the warning in the
 subject, to move to Puppet3

 Sometimes in the warning the manifest name isn't showed up, thereis a
 reason?

 Thu Jan 16 14:58:02 +0100 2014 Puppet (warning): Dynamic lookup of
 $mailaddr is deprecated. For more information, see
 http://docs.puppetlabs.com/guides/scope_and_puppet.html. To see the
 change in behavior, use the --debug flag.
 Have you tried running with the --debug flag as suggested?

 Using --debug doesn't give me more info on the path where the error
 is, only adds info about what changed. My problem is that I don't
 know  (exactly) where to find ythe manifests

 Have you tried just grepping your modules/manifests for $mailaddr ???

 Sure, and with some work I can find all problems, I was just wondering
 why in some cases the path is showed and in some others it isn't


 There's a specific location: Dynamic lookup of $domain at
 /path/to/a/file/dotpp.pp/:127

 I pick up 2 lines form my log file to show that for some warning the
 path is reported (as in this case) but in other case (the former log
 line) it isn't


 Thanks for your help


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/52D92121.40205%40jasonantman.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Puppet failed run: How to find?

2014-01-17 Thread Jason Antman
Kaustubh,

The *easiest* method would be to use PuppetDB, but until a feature
request (https://tickets.puppetlabs.com/browse/PDB-16) is finished, it
only stores successful reports, not failed ones. Hopefully that ticket
will get closed soon, but it would probably be at least weeks until it
gets released.

If you're comfortable with it, you can hook into the Puppet Dashboard
database to pull out the information you want. I don't think there are
any real documents about it, because the database isn't really intended
to be used by anything other than Dashboard itself. But the schema is
pretty stable. You should be able to just connect to MySQL as the same
user that Dashboard uses and find what you need - the schema is pretty
straightforward. If you need a rough example, you can take a look at a
Nagios check I wrote that uses the Dashboard DB
(https://github.com/jantman/nagios-scripts/blob/master/check_puppet_dashboard_node.pl)
though it may be for an older version of Dashboard, so some things may
have changed.

The last thing you could do, which is probably the most time consuming,
is to implement your own custom report processor in Ruby to do whatever
you want with the reports. Documentation on this can be found in the
Reporting Guide, at http://docs.puppetlabs.com/guides/reporting.html

-Jason


On 01/17/2014 07:20 AM, kaustubh chaudhari wrote:
 Hey Jason,

 Thanks for the email!

 Yes i am using Open Source Puppet! 3.3.2 and dashboard version 1.2.23.

 I would appreciate if you can redirect me or share a link regarding
 the options that you mentioned.

 -Kaustubh
 -- 
 You received this message because you are subscribed to the Google
 Groups Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/8ead04a4-d72c-47a3-8b4a-31ec7b4fd25a%40googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/52D92307.807%40jasonantman.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Puppet failed run: How to find?

2014-01-17 Thread kaustubh chaudhari
Thanks Jason,

This is useful info! going through it now!

Thanks again!

-Kaustubh

On Friday, January 17, 2014 7:33:11 AM UTC-5, Jason Antman wrote:

 Kaustubh, 

 The *easiest* method would be to use PuppetDB, but until a feature 
 request (https://tickets.puppetlabs.com/browse/PDB-16) is finished, it 
 only stores successful reports, not failed ones. Hopefully that ticket 
 will get closed soon, but it would probably be at least weeks until it 
 gets released. 

 If you're comfortable with it, you can hook into the Puppet Dashboard 
 database to pull out the information you want. I don't think there are 
 any real documents about it, because the database isn't really intended 
 to be used by anything other than Dashboard itself. But the schema is 
 pretty stable. You should be able to just connect to MySQL as the same 
 user that Dashboard uses and find what you need - the schema is pretty 
 straightforward. If you need a rough example, you can take a look at a 
 Nagios check I wrote that uses the Dashboard DB 
 (
 https://github.com/jantman/nagios-scripts/blob/master/check_puppet_dashboard_node.pl)
  

 though it may be for an older version of Dashboard, so some things may 
 have changed. 

 The last thing you could do, which is probably the most time consuming, 
 is to implement your own custom report processor in Ruby to do whatever 
 you want with the reports. Documentation on this can be found in the 
 Reporting Guide, at http://docs.puppetlabs.com/guides/reporting.html 

 -Jason 


 On 01/17/2014 07:20 AM, kaustubh chaudhari wrote: 
  Hey Jason, 
  
  Thanks for the email! 
  
  Yes i am using Open Source Puppet! 3.3.2 and dashboard version 1.2.23. 
  
  I would appreciate if you can redirect me or share a link regarding 
  the options that you mentioned. 
  
  -Kaustubh 
  -- 
  You received this message because you are subscribed to the Google 
  Groups Puppet Users group. 
  To unsubscribe from this group and stop receiving emails from it, send 
  an email to puppet-users...@googlegroups.com javascript:. 
  To view this discussion on the web visit 
  
 https://groups.google.com/d/msgid/puppet-users/8ead04a4-d72c-47a3-8b4a-31ec7b4fd25a%40googlegroups.com.
  

  For more options, visit https://groups.google.com/groups/opt_out. 



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/215d64e0-6dd6-4193-9fbb-b7cdc267e85e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Replacing file errors: getaddrinfo: No such host is known

2014-01-17 Thread pskovshurik
I am an idiot. The issue was indeed with filebucket configuration in 
site.pp, which was copied over from another server. As soon as I changed 
it, it started working!

Thanks Jose!



On Thursday, January 16, 2014 8:24:49 PM UTC, pskov...@gmail.com wrote:

 What's filebucket? Don't think I've been introduced to that yet

 Debug or verbose isn't giving anything useful :(


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/ee98631a-1cb3-4792-a1d8-2dae36a4514c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Managing Eclipse with Puppet

2014-01-17 Thread Simon Tremblay
https://github.com/runthebusiness/puppet-eclipse

Le jeudi 23 août 2012 17:43:19 UTC-4, Jeff Sussna a écrit :

 Does anyone know if there's a Puppet module available for managing Eclipse 
 plugins? 


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/3c13edc0-0d9d-42b0-a49b-e7d0d47a27c5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Collector, Overriding Params and undef vars

2014-01-17 Thread jcbollinger


On Friday, January 17, 2014 2:39:16 AM UTC-6, William Leese wrote:

 code wise, I guess this boils down to:

 @user{ 'wleese3':
   comment = bleh,
   uid = ,
 }

 User | title == 'wleese3' | { comment = 'blah', uid = undef }

 where I used to rely on uid = undef resulting in  being used.



If that ever worked for you as you think it did then that represented a 
Puppet bug.  The behavior does not correspond to current or any historic 
behavior of which I am aware.

Declaring a resource parameter to have the pseudo-value undef is an 
affirmative expression of not declaring any value for that parameter.  
Resource parameter *overrides*, on the other hand, are more literal than 
that.  Overriding a parameter with undef is not an expression of not 
overriding that parameter at all; rather, doing so overrides the target 
resource declaration as if it had originally declared undef for the 
parameter in question.  That is, it overrides the original declaration as 
if it had not declared any value for the parameter.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/7db37b50-8c0c-4a39-a4b2-779d2d7946d6%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: config.pp not working as expected

2014-01-17 Thread jcbollinger


On Thursday, January 16, 2014 10:30:10 AM UTC-6, John wrote:

 I've got the following code in my config.pp file on a FreeBSD 8.3 host:



You say my config.pp file as if we should know what file that is, where 
it is, and what its significance is.  In fact, we know none of those things.



 freebsd# more config.pp ; 
 class ssh::config {
   include ssh::params
   $listenaddress = $ssh::params::listenaddress
   file { $ssh::params::sshd_config_file:
 ensure = present,
 owner = 'root',
 group = 'root',
 mode = '0600',
 content = template('ssh/sshd_config.erb'),
   }
   file { $ssh::params::ssh_config_file:
 ensure = present,
 owner = 'root',
 group = 'root',
 mode = '0644',
 content = template('ssh/ssh_config.erb'),
   }
 }

 I want to test that puppet will put back a configuration so I remove the 
 contents of /etc/ssh_config file ( echo   /etc/ssh_config).  I would 
 expect the puppet SSH module I'm using to restore the file contents.  It 
 does not.



That is likely because you have not instructed Puppet to manage the file in 
question.

 

   Furthermore, I believe it thinks I'm running this on a  linux host.



I don't see why you say that.

 

 Check out the following and please advice.

 [root@freebsd ~]# puppet apply --verbose --debug --noop 
 /usr/local/etc/puppet/modules/ssh/manifests/init.pp
 debug: Creating default schedules
 debug: Failed to load library 'selinux' for feature 'selinux'
 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::ProviderUseradd: file chage does not exist
 debug: Failed to load library 'ldap' for feature 'ldap'
 debug: Puppet::Type::User::ProviderLdap: feature ldap is missing
 debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl 
 does not exist
 debug: /File[/var/puppet/state]: Autorequiring File[/var/puppet]
 debug: /File[/var/puppet/ssl/certs]: Autorequiring File[/var/puppet/ssl]
 debug: /File[/var/puppet/state/graphs]: Autorequiring 
 File[/var/puppet/state]
 debug: /File[/var/puppet/state/last_run_report.yaml]: Autorequiring 
 File[/var/puppet/state]
 debug: /File[/var/puppet/facts]: Autorequiring File[/var/puppet]
 debug: /File[/var/puppet/client_data]: Autorequiring File[/var/puppet]
 debug: /File[/var/puppet/lib]: Autorequiring File[/var/puppet]
 debug: /File[/var/puppet/log]: Autorequiring File[/var/puppet]
 debug: /File[/var/puppet/ssl/certificate_requests]: Autorequiring 
 File[/var/puppet/ssl]
 debug: /File[/var/puppet/ssl/private_keys]: Autorequiring 
 File[/var/puppet/ssl]
 debug: /File[/var/puppet/ssl/public_keys]: Autorequiring 
 File[/var/puppet/ssl]
 debug: /File[/var/puppet/client_yaml]: Autorequiring File[/var/puppet]
 debug: /File[/var/puppet/state/state.yaml]: Autorequiring 
 File[/var/puppet/state]
 debug: /File[/var/puppet/clientbucket]: Autorequiring File[/var/puppet]
 debug: /File[/var/puppet/ssl/private]: Autorequiring File[/var/puppet/ssl]
 debug: /File[/var/puppet/state/last_run_summary.yaml]: Autorequiring 
 File[/var/puppet/state]
 debug: /File[/var/puppet/ssl]: Autorequiring File[/var/puppet]
 debug: Finishing transaction 17215411540
 debug: Loaded state in 0.00 seconds
 debug: Loaded state in 0.00 seconds
 info: Applying configuration version '1389889969'
 debug: /Schedule[daily]: Skipping device resources because running on a 
 host
 debug: /Schedule[monthly]: Skipping device resources because running on a 
 host
 debug: /Schedule[hourly]: Skipping device resources because running on a 
 host
 debug: /Schedule[never]: Skipping device resources because running on a 
 host
 debug: /Schedule[weekly]: Skipping device resources because running on a 
 host
 debug: /Schedule[puppet]: Skipping device resources because running on a 
 host
 debug: Finishing transaction 17214171820
 debug: Storing state
 debug: Stored state in 0.01 seconds
 notice: Finished catalog run in 0.06 seconds
 debug: Finishing transaction 17213963220
 debug: Received report to process from freebsd.cde.vrsn.com
 debug: Processing report from freebsd.cde.vrsn.com with processor 
 Puppet::Reports::Store
 [root@-freebsd ~]# 



In all likelihood, the manifest you are applying defines class ssh of a 
like-named module, but does not declare that any particular class should be 
applied to the target node.  You have given Puppet a cookbook, but not told 
it to cook anything.  (Moreover, you have told it (--noop) that whatever 
you might instruct it to cook, it should only pretend to cook it.)

Supposing that your Puppet is configured to have 
/usr/local/etc/puppet/modules as [part of] its module path, what you are 
looking for appears to be something more like this:

puppet apply --verbose --debug -e include 'ssh'


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 

Re: [Puppet Users] Augeas: Duplicate declaration

2014-01-17 Thread Reinaldo Lima
With create_resources the error is:

*Invalid parameter hostName on node*


And including the entry[name] in the resource name:

*Resource title must be a String, not Hash*

 

=(

On Friday, January 17, 2014 5:10:16 AM UTC-2, Andrew wrote:

 another option to use create_resources('hostinclude',$netentry)
 On 16 Jan 2014 23:47, Nick Cammorato nick.ca...@gmail.com javascript: 
 wrote:

 Your augeas resource is always called hosts_include which is why it's 
 doing that.  Try including the entry[name] in that resource name.
 On Jan 16, 2014 4:15 PM, Reinaldo Lima reim...@gmail.com javascript: 
 wrote:

 Hi Everyone,

 I'm trying to write a class that put some entries in /etc/hosts file 
 as follow below:

 *class hosts {*

 *$netentry = {*
 *host01 = { iphost = '192.168.10.1', hostName = 
 host01 },*
 *host02 = { iphost = '192.168.10.2', hostName = 
 host02 },*
 *host03 = { iphost = '192.168.10.3', hostName = 
 host03 },*
 *}*

 *define hostsinclude ($entry) {*
 *   augeas { hosts_include:*
 *   incl = /etc/hosts,*
 *   lens = Hosts.lns,*
 *   changes = [*
 *   set /files/etc/hosts/01/ipaddr 
 $entry[$name]['iphost'],*
 *   set 
 /files/etc/hosts/01/canonical$entry[$name]['hostName'],*
 *   ],*
 *   onlyif = match */ipaddr[ . = 
 $entry[$name]['iphost'] ] size == 0*
 *   }*
 *}*

 *hostsinclude { [*
 *'host01',*
 *'host02',*
 *'host03'*
 *]:*
 *entry = $netentry*
 *}*

 *}*


 and, when puppet compiles the manifest, I get the following error: 

 *err: Could not retrieve catalog from remote server: Error 400 on 
 SERVER: Duplicate declaration: Augeas[hosts_include] is already declared in 
 file /puppet/environments/production/modules/checklist/manifests/hosts.pp 
 at line 10; cannot redeclare at 
 /puppet/environments/production/modules/checklist/manifests/hosts.pp:29 on 
 node*

 Someone can help me?

 Thanks

 -- 
 You received this message because you are subscribed to the Google 
 Groups Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to puppet-users...@googlegroups.com javascript:.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/fe9040f2-54de-4f9c-9787-4736b37219d9%40googlegroups.com
 .
 For more options, visit https://groups.google.com/groups/opt_out.

  -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to puppet-users...@googlegroups.com javascript:.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/CAKJ8awc5X%2B97jtxwbe%3DpjqhjqyuF8S_dR_GvAAXM%2BC8t3FC9xA%40mail.gmail.com
 .
 For more options, visit https://groups.google.com/groups/opt_out.



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/4f31358c-652d-4afc-9919-aae783afa36c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Variable scoping question

2014-01-17 Thread Bret Wortman
I'm trying to improve my code reuse a bit, and I have some templates that 
all start with a common case statement to determine a local proxy (I'm 
simplifying the file slightly for our discussion here):

file: proxy.erb
% proxy = case @site
   when a then proxya
   when b then proxyb
   when c then proxyc
   when d then proxyd
end -%

This gets included in each template something like this:

file: CentOS-Base.repo.erb
%= scope.function_template([yum/proxy.erb]) -%
:
[base]
name=CentOS-$releasever - Base
:
% if $proxy -%
proxy=http://%= $proxy %:3128
% end -%
:

The problem is that the proxy variable isn't visible from the outer 
scope. How can I either qualify the outer reference to see it, or somehow 
export it? Is this possible in some other fashion? I don't want to repeat 
this code across all the various repo files; adding a proxy shouldn't mean 
editing every single repo file template when it could mean editing just one 
file that gets included somehow. At least, that's the goal.

Thanks!


Bret

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/926cc7db-5357-44f6-a802-101bf3a986d9%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Three level hashes in ERB

2014-01-17 Thread jcbollinger


On Thursday, January 16, 2014 10:47:34 AM UTC-6, paul@complex.com wrote:

 I have been trying to create a three level hash to dump into a template, 
 but the deepest layer of the hash seems to not work.

 My hash:

 $clusters = {
 'Default' = {
   '127.0.0.1:11211' = { 
 'hostname' = '127.0.0.1', 
 'port' = '11211'
   },
 },
   }

 My ERB template (modified for readability):
 % @clusters.sort.map do |k,v| -%
   % if v.is_a?(Hash) -%
 '%= k %'
 % @clusters[k].sort.map do |ki, vi| -%
   % if vi.is_a?(Hash) -%
 '%= ki %'
 % @clusters[ki].sort.map do |kii, vii| -%
   % if vi and vi != '' -%
 '%= kii %' = '%= vii %',
   % end -%
 % end -%
   % end -%
 % end -%
   % end -%
 % end -%

 For some reason that I can't quite figure out, the innermost hash throws 
 a Detail: undefined method `sort' for nil:NilClass error. I assume if ki 
 was not a hash, the if vi.us_a?(Hash) would have been false and skipped 
 that sort.

 What am I doing wrong here?



You're writing non-idiomatic Ruby, and you're embedding it into a template 
in a way that makes it hard to read.  I would write that template more like 
this:

%
@clusters.select { |k, v| v.is_a?(Hash) }.sort.each_pair do |k,v|
-%
  '%= k %'
%
  v.select { |ki, vi| vi.is_a?(Hash) }.sort.each_pair do |ki, vi|
-%
'%= ki %'
%
vi.select { |kii, vii| vii and vii != '' }.sort.each_pair do |kii, vii|
-%
  '%= kii %' = '%= vii %',
%
end
  end
end
-%

Things to note:

   - You are iterating over key/value pairs, but you are not fully using 
   the values provided to you.  You test them for whether they are Hashes, but 
   then you go back and retrieve them again via their keys.  Relying strictly 
   on the values passed into your blocks (as above) would avoid the indexing 
   confusion you experienced and be clearer overall.
   - Embedding each Ruby line into your template separately makes 
   everything harder to follow.  Moreover, doing it in the way you have done 
   puts a bunch of extra whitespace into the template output.  (My version 
   differed more from the original in this regard before I reduced the number 
   of separate lines of Ruby code.)
   - The each_pair() method is better for your iteration purposes than is 
   map() because each_pair() makes your intent clearer.  It's pointless and 
   somewhat confusing to use map() and then throw away the result.
   - Using select() to filter your hashes prior to iteration, as above, is 
   more idiomatic and clearer than testing the iterated values.  In this case 
   it also cuts the number of levels of nesting in half.
   - In the innermost 'if' statement of your original code, you are testing 
   variable 'vi', whereas it looks like you should be to testing 'vii' instead.



John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/97c66547-d705-4370-acff-e5202c1a26ec%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Rspec-puppet and testing for expected failures...

2014-01-17 Thread Gavin Williams
Ok, looks like the error's I was seeing with 3.0.2 was a known bug[1], and 
so I've updated travis to allow failures on the 3.0.2 builds. 

However I've now hit my next error[2]:

1) glassfish on a RedHat OSFamily with create_domain = true and 
 create_service = true 

 Failure/Error: should 
 contain_glassfish__create_domain('domain1').that_requires('Class[glassfish::install]')

 Puppet::Error:

 Duplicate declaration: Glassfish::Create_service[domain1] is already 
 declared in file 
 /home/travis/build/fatmcgav/puppet-glassfish/spec/fixtures/modules/glassfish/manifests/init.pp:111;
  
 cannot redeclare at 
 /home/travis/build/fatmcgav/puppet-glassfish/spec/fixtures/modules/glassfish/manifests/create_domain.pp:41
  
 on node testing-worker-linux-7-2-11652-linux-5-17137606.localdomain

 # ./spec/classes/init_spec.rb:88

Spec test is available here[3], failing test is highlighted.

I've googled and haven't managed to find anything obvious...  

Any ideas/pointers? 

Cheers
Gavin 

[1] http://projects.puppetlabs.com/issues/17543
[2] https://travis-ci.org/fatmcgav/puppet-glassfish/jobs/17137606
[3] 
https://github.com/fatmcgav/puppet-glassfish/blob/4ee7a5cfe260494fc5bf48c01964e06ca18facbd/spec/classes/init_spec.rb#L77-96

On Friday, 17 January 2014 09:39:54 UTC, Gavin Williams wrote:

 Morning all... 

 Next strange error... The Travis CI tests are failing against Puppet 3.0.2 
 only[1].

 The error being returned is: 

 1) glassfish::create_domain with default params 

 Failure/Error: })

 Puppet::Error:

 Unknown function validate_absolute_path at 
 /home/travis/build/fatmcgav/puppet-glassfish/spec/fixtures/modules/glassfish/manifests/create_domain.pp:17
  
 on node testing-worker-linux-3-1-6934-linux-4-17115342.blueboxgrid.com

 # ./spec/defines/create_domain_spec.rb:41

 Spec tests work fine on multiple other versions of Puppet[2], from 2.7.25 
 through to 3.4.1, just failing on 3.0.2... 

 Any ideas? 

 Cheers
 Gavin 

 [1] https://travis-ci.org/fatmcgav/puppet-glassfish/jobs/17115342
 [2] https://travis-ci.org/fatmcgav/puppet-glassfish/builds/17115340

 On Thursday, 16 January 2014 21:37:37 UTC, Gavin Williams wrote:

 Quick update... 

 Many thanks to @superseb for working up a PR[1] that fixes the expect 
 errors. Trick was to use 'subject' within the expect, rather than a 
 resource title... 

 @superseb also highlighted an old Puppet bug[2] which I've migrated 
 across to Jira[3] for review/decision. 
 However as per the notes on Redmine, I should be able to work around said 
 bug by using a case statement rather then the tenary operator... 

 Onwards and upwards. 

 Cheers 
 Gav 

 [1] https://github.com/fatmcgav/puppet-glassfish/pull/8
 [2] http://projects.puppetlabs.com/issues/4598
 [3] https://tickets.puppetlabs.com/browse/PUP-1457
 On 16 Jan 2014 17:27, Gavin Williams fatmc...@gmail.com wrote:

 Afternoon all, 

 I'm trying to add some rspec-puppet testing to my Glassfish module[1], 
 in preparation for releasing it to the forge. 

 I've got some stuff working fine, however I'm trying to test expected 
 failure scenarios without much luck. 

 Travis CI[2] highlights the issues I'm seeing. 
 An example error message is: 

 Failure/Error: expect {

 expected Puppet::Error with message matching /OSFamily Suse not 
 supported/ but nothing was raised

 This is as a result of a test[3] which is testing some validation logic 
 in my create_service[4] defined type. 

 Any pointers on where I could be going wrong? 

 Thanks in advance for any responses. 

 Regards
 Gavin 

 [1] https://github.com/fatmcgav/puppet-glassfish
 [2] https://travis-ci.org/fatmcgav/puppet-glassfish/jobs/17072897#
 [3] 
 https://github.com/fatmcgav/puppet-glassfish/blob/master/spec/defines/create_service_spec.rb#L127-149
 [4] 
 https://github.com/fatmcgav/puppet-glassfish/blob/master/manifests/create_service.pp#L14-19
  
 -- 
 You received this message because you are subscribed to a topic in the 
 Google Groups Puppet Users group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/puppet-users/Ek0ckKfPGYw/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/f04c1f56-60c0-4fa9-be03-f5fbe1129ce5%40googlegroups.com
 .
 For more options, visit https://groups.google.com/groups/opt_out.



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/911ac45b-553f-4c41-9f36-fe6358aed85b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Variable scoping question

2014-01-17 Thread Bret Wortman
Stare at your own problem long enough and it'll come to you.

Move the case to the manifest:

class yum {
:
case $site {
'a': { $proxy = 'proxya' }
'b': { $proxy = 'proxyb' }
'c': { $proxy = 'proxyc' }
:
default: { $proxy = '' }
}

Then change the $proxy to @proxy in the templates and lose the first 
line (scope.function_template()). Worked like a charm. 

Then I realized the data actually belonged in Hiera, not in code, so the 
case statement then just decomposed into:

$proxy = hiera('proxy')


Bret

On Friday, January 17, 2014 10:43:36 AM UTC-5, Bret Wortman wrote:

 I'm trying to improve my code reuse a bit, and I have some templates that 
 all start with a common case statement to determine a local proxy (I'm 
 simplifying the file slightly for our discussion here):

 file: proxy.erb
 % proxy = case @site
when a then proxya
when b then proxyb
when c then proxyc
when d then proxyd
 end -%

 This gets included in each template something like this:

 file: CentOS-Base.repo.erb
 %= scope.function_template([yum/proxy.erb]) -%
 :
 [base]
 name=CentOS-$releasever - Base
 :
 % if $proxy -%
 proxy=http://%= $proxy %:3128
 % end -%
 :

 The problem is that the proxy variable isn't visible from the outer 
 scope. How can I either qualify the outer reference to see it, or somehow 
 export it? Is this possible in some other fashion? I don't want to repeat 
 this code across all the various repo files; adding a proxy shouldn't mean 
 editing every single repo file template when it could mean editing just one 
 file that gets included somehow. At least, that's the goal.

 Thanks!


 Bret



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/988d847f-8f39-4f39-88e9-64039c958002%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Puppet Fundamentals training - how fundamental is it?

2014-01-17 Thread David Taylor
Hi all,

I've been playing around with Puppet with a view to implementing it at my 
workplace. I've already run through the Learning Puppet tutorial on 
docs.puppetlabs.com and the quizzes in the Puppet Learn Library, and now 
I'm looking into more formal training to try and get everything nailed down 
in my head and to get an idea of best practices for module design, 
environments etc. I was wondering if anyone could advise on whether the 
Puppet Fundamentals course is the right course to go for, or is it aimed at 
the complete Puppet novice - i.e. will I find that it just retreads things 
I already know? 

Thanks,

-- 
Dave Taylor

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/2252a549-b862-4ffc-ae19-a1b3912b695c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Augeas: Duplicate declaration

2014-01-17 Thread Andrey Kozichev
ah, right you are supplying entire hash in your defined resource. Missed it.

If your defined resource would accept: name, iphost and hostname - then you
can use create_resources to define all 3 entry.
On 17 Jan 2014 15:21, Reinaldo Lima reiml...@gmail.com wrote:

 With create_resources the error is:

 *Invalid parameter hostName on node*


 And including the entry[name] in the resource name:

 *Resource title must be a String, not Hash*



 =(

 On Friday, January 17, 2014 5:10:16 AM UTC-2, Andrew wrote:

 another option to use create_resources('hostinclude',$netentry)
 On 16 Jan 2014 23:47, Nick Cammorato nick.ca...@gmail.com wrote:

 Your augeas resource is always called hosts_include which is why it's
 doing that.  Try including the entry[name] in that resource name.
 On Jan 16, 2014 4:15 PM, Reinaldo Lima reim...@gmail.com wrote:

 Hi Everyone,

 I'm trying to write a class that put some entries in /etc/hosts file
 as follow below:

 *class hosts {*

 *$netentry = {*
 *host01 = { iphost = '192.168.10.1', hostName =
 host01 },*
 *host02 = { iphost = '192.168.10.2', hostName =
 host02 },*
 *host03 = { iphost = '192.168.10.3', hostName =
 host03 },*
 *}*

 *define hostsinclude ($entry) {*
 *   augeas { hosts_include:*
 *   incl = /etc/hosts,*
 *   lens = Hosts.lns,*
 *   changes = [*
 *   set /files/etc/hosts/01/ipaddr
 $entry[$name]['iphost'],*
 *   set
 /files/etc/hosts/01/canonical$entry[$name]['hostName'],*
 *   ],*
 *   onlyif = match */ipaddr[ . =
 $entry[$name]['iphost'] ] size == 0*
 *   }*
 *}*

 *hostsinclude { [*
 *'host01',*
 *'host02',*
 *'host03'*
 *]:*
 *entry = $netentry*
 *}*

 *}*


 and, when puppet compiles the manifest, I get the following error:

 *err: Could not retrieve catalog from remote server: Error 400 on
 SERVER: Duplicate declaration: Augeas[hosts_include] is already declared in
 file /puppet/environments/production/modules/checklist/manifests/hosts.pp
 at line 10; cannot redeclare at
 /puppet/environments/production/modules/checklist/manifests/hosts.pp:29 on
 node*

 Someone can help me?

 Thanks

 --
 You received this message because you are subscribed to the Google
 Groups Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to puppet-users...@googlegroups.com.
 To view this discussion on the web visit https://groups.google.com/d/
 msgid/puppet-users/fe9040f2-54de-4f9c-9787-4736b37219d9%
 40googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.

  --
 You received this message because you are subscribed to the Google
 Groups Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to puppet-users...@googlegroups.com.
 To view this discussion on the web visit https://groups.google.com/d/
 msgid/puppet-users/CAKJ8awc5X%2B97jtxwbe%3DpjqhjqyuF8S_dR_
 GvAAXM%2BC8t3FC9xA%40mail.gmail.com.
 For more options, visit https://groups.google.com/groups/opt_out.

  --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/4f31358c-652d-4afc-9919-aae783afa36c%40googlegroups.com
 .
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CACzr%3DFdwj-bmkdUzMoutEBLPMa%2BZA%3Dt7v98COQfT%2Bk%2BjBrUzGg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Puppet Fundamentals training - how fundamental is it?

2014-01-17 Thread Andrey Kozichev
Best training you can get: define a task and then try to solve it.
On 17 Jan 2014 17:38, David Taylor david.a.tay...@gmail.com wrote:

 Hi all,

 I've been playing around with Puppet with a view to implementing it at my
 workplace. I've already run through the Learning Puppet tutorial on
 docs.puppetlabs.com and the quizzes in the Puppet Learn Library, and now
 I'm looking into more formal training to try and get everything nailed down
 in my head and to get an idea of best practices for module design,
 environments etc. I was wondering if anyone could advise on whether the
 Puppet Fundamentals course is the right course to go for, or is it aimed at
 the complete Puppet novice - i.e. will I find that it just retreads things
 I already know?

 Thanks,

 --
 Dave Taylor

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/2252a549-b862-4ffc-ae19-a1b3912b695c%40googlegroups.com
 .
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CACzr%3DFcHKUfq1OErC1fV9ZxjaGQBKXqxgPDuhbicoC%2BHyucasA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Puppet Fundamentals training - how fundamental is it?

2014-01-17 Thread Patrick Lesher
Hi Dave,
  I had a good amount of experience using puppet before taking the course and 
while there were somethings that were repetitive I definitely got a lot out of 
the class.  I would say you set yourself up perfectly to take the class already 
and will be able to solidify those skills and learn new things.  Our instructor 
was very willing to answer questions and help with what if I wanted... types 
of things.

  Good luck with the class and enjoy!

--Patrick



On Jan 17, 2014, at 9:35 AM, David Taylor wrote:

Hi all,

I've been playing around with Puppet with a view to implementing it at my 
workplace. I've already run through the Learning Puppet tutorial on 
docs.puppetlabs.comhttp://docs.puppetlabs.com and the quizzes in the Puppet 
Learn Library, and now I'm looking into more formal training to try and get 
everything nailed down in my head and to get an idea of best practices for 
module design, environments etc. I was wondering if anyone could advise on 
whether the Puppet Fundamentals course is the right course to go for, or is it 
aimed at the complete Puppet novice - i.e. will I find that it just retreads 
things I already know?

Thanks,

--
Dave Taylor

--
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
puppet-users+unsubscr...@googlegroups.commailto:puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/2252a549-b862-4ffc-ae19-a1b3912b695c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/A666D05C-695E-4DAD-9333-1D00BDB6BA78%40marketleader.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Puppet Fundamentals training - how fundamental is it?

2014-01-17 Thread Nathan Valentine
Hey, David.

I'm a trainer for Puppet Labs and just finished teaching my bazillionth
Fundamentals class yesterday. ;)

The class is appropriate for those with at least a little bit of Ops or Dev
experience and it helps greatly if you are at least minimally comfortable
with VMWare/Virtualbox and things like SSH and Unix-y text editors (vi or
nano). That said of my my most impressive students was an MBA and had been
out of pure tech for 5 or 6 years. The classes assume no previous Puppet
experience but scripting experience certainly won't hurt you.

The class covers Puppet agent + master workflow, some basic version
control, Puppet modules, Defines, Parameterized Classes, Hiera and a few
other bits specific to Puppet Enterprise. I've had students who have been
doing Puppet for a couple of years come to the Fundamentals class and say
afterwards they were surprised how much they learned. One particular
student who expressed that view was maintaining a Puppet codebase of nearly
10k lines and thought he had seen it all before coming to class.

I will warn you that most people how decide to skip Fundamentals and go
straight to Advanced often regret it. It is quite a step up.

You might want to check the training schedule on our site. I think we list
Puppet Introduction classes there. They are a one-day very accelerated
and stripped down version of the Fundamentals class. They are almost always
taught at industry conferences as opposed to a public training center.
Sitting through one of those would give you a very good idea what to expect
in Fundamentals.

Feel free to email my offlist if you have other questions.






On Fri, Jan 17, 2014 at 9:35 AM, David Taylor david.a.tay...@gmail.comwrote:

 Hi all,

 I've been playing around with Puppet with a view to implementing it at my
 workplace. I've already run through the Learning Puppet tutorial on
 docs.puppetlabs.com and the quizzes in the Puppet Learn Library, and now
 I'm looking into more formal training to try and get everything nailed down
 in my head and to get an idea of best practices for module design,
 environments etc. I was wondering if anyone could advise on whether the
 Puppet Fundamentals course is the right course to go for, or is it aimed at
 the complete Puppet novice - i.e. will I find that it just retreads things
 I already know?

 Thanks,

 --
 Dave Taylor

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/2252a549-b862-4ffc-ae19-a1b3912b695c%40googlegroups.com
 .
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
---
Nathan Valentine, Puppet Labs Professional Services
Have you seen : http://ask.puppetlabs.com , http://puppetlabs.com/learn ?

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CA%2BsYer1%2B9Q0KcS9LK_ETYh9RRrD1hG%3Db4NLSPg25jHbZyEC1sQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Puppet apply hangs

2014-01-17 Thread Guy Knights
I have a bunch of dev servers which have begun experiencing the same issue
when I run puppet apply. The full command I'm using is: sudo puppet apply
--modulepath=/opt/puppet-conf/development/modules
--environment=development.

I've never had a problem running this command before, but very recently,
when I run it on any of my dev servers it just hangs right after I hit
enter. It never times out and I don't get any output, event when I add
--verbose, --debug and --detailed-exitcodes.

I investigated further, and ran the above command using strace. It appears
that puppet hangs when trying to read /etc/puppet/routes.yaml (which
doesn't exist). I created /etc/puppet/routes.yaml but then puppet apply
just fails (I'm not really sure what to put in routes.yaml, though).

Does anyone have any idea what's happening here? I'm not sure why this only
just started happening. For the record, here are the packages I have
installed:

ii  facter1.7.4-1puppetlabs1   Ruby
module for collecting simple facts about a host operating system
ii  hiera 1.3.0-1puppetlabs1   A simple
pluggable Hierarchical Database.
ii  puppet3.4.2-1puppetlabs1
Centralized configuration management - agent startup and compatibility
scripts
ii  puppet-common 3.4.2-1puppetlabs1
Centralized configuration management
ii  puppetlabs-release1.0-7Package
to install Puppet Labs gpg key and apt repo
ii  ruby-rgen 0.6.5-1puppetlabs1   A
framework supporting Model Driven Software Development (MDSD)

Thanks,
Guy

g...@eastsidegamestudio.com

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CA%2BgQdWBXJtPer6%2BrNJ68-hTbFrXv3Nhz%2Bdg30%2Bf4LW4Sy1CWmA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Puppet apply hangs

2014-01-17 Thread Guy Knights
I went a bit further and found a routes.yaml config which I believe works,
but it looks like this isn't actually the issue. The routes.yaml I used is:

---
master:
  facts:
terminus: yaml
cache: yaml

Here's the last few lines of puppet apply when using strace:

stat(/etc/puppet/routes.yaml, {st_mode=S_IFREG|0644, st_size=56, ...}) = 0
open(/etc/puppet/routes.yaml, O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=56, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f87e13ba000
read(3, ---\nmaster:\n  facts:\nterminu..., 4096) = 56
read(3, , 4096)   = 0
close(3)= 0
munmap(0x7f87e13ba000, 4096)= 0
fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f87e13ba000
read(0,

It just hangs there at the read(0, line.





On Fri, Jan 17, 2014 at 11:04 AM, Guy Knights 
g...@eastsidegamestudio.comwrote:

 I have a bunch of dev servers which have begun experiencing the same issue
 when I run puppet apply. The full command I'm using is: sudo puppet apply
 --modulepath=/opt/puppet-conf/development/modules
 --environment=development.

 I've never had a problem running this command before, but very recently,
 when I run it on any of my dev servers it just hangs right after I hit
 enter. It never times out and I don't get any output, event when I add
 --verbose, --debug and --detailed-exitcodes.

 I investigated further, and ran the above command using strace. It appears
 that puppet hangs when trying to read /etc/puppet/routes.yaml (which
 doesn't exist). I created /etc/puppet/routes.yaml but then puppet apply
 just fails (I'm not really sure what to put in routes.yaml, though).

 Does anyone have any idea what's happening here? I'm not sure why this
 only just started happening. For the record, here are the packages I have
 installed:

 ii  facter1.7.4-1puppetlabs1   Ruby
 module for collecting simple facts about a host operating system
 ii  hiera 1.3.0-1puppetlabs1   A
 simple pluggable Hierarchical Database.
 ii  puppet3.4.2-1puppetlabs1
 Centralized configuration management - agent startup and compatibility
 scripts
 ii  puppet-common 3.4.2-1puppetlabs1
 Centralized configuration management
 ii  puppetlabs-release1.0-7
  Package to install Puppet Labs gpg key and apt repo
 ii  ruby-rgen 0.6.5-1puppetlabs1   A
 framework supporting Model Driven Software Development (MDSD)

 Thanks,
 Guy

 g...@eastsidegamestudio.com




-- 
Guy Knights
Lead Systems Administrator
http://eastsidegamestudio.com
www.eastsidegamestudio.com
g...@eastsidegamestudio.com

g...@eastsidegamestudio.com

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CA%2BgQdWDQdq6qZWjDv1JHu3QEWB7aC%2B9y8hwsGw02Q%2BtwRpqfPQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Puppet apply hangs

2014-01-17 Thread Jose Luis Ledesma
0 is standard input... Seems that puppet is waiting for some input??? Or did 
puppet close fd 0?

Regards

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/ab4db526-15b5-492d-8a84-8066029e88a1%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Puppet apply hangs

2014-01-17 Thread Guy Knights
Oops...never mind. I just realised that I forgot to point the puppet apply
command at a manifest file. I did that and the command works now. Still, it
would be nice if it gave an error message if you don't supply a manifest.


On Fri, Jan 17, 2014 at 11:11 AM, Guy Knights 
g...@eastsidegamestudio.comwrote:

 I went a bit further and found a routes.yaml config which I believe works,
 but it looks like this isn't actually the issue. The routes.yaml I used is:

 ---
 master:
   facts:
 terminus: yaml
 cache: yaml

 Here's the last few lines of puppet apply when using strace:

 stat(/etc/puppet/routes.yaml, {st_mode=S_IFREG|0644, st_size=56, ...}) =
 0
 open(/etc/puppet/routes.yaml, O_RDONLY) = 3
 fstat(3, {st_mode=S_IFREG|0644, st_size=56, ...}) = 0
 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
 0x7f87e13ba000
 read(3, ---\nmaster:\n  facts:\nterminu..., 4096) = 56
 read(3, , 4096)   = 0
 close(3)= 0
 munmap(0x7f87e13ba000, 4096)= 0
 fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
 fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
 0x7f87e13ba000
 read(0,

 It just hangs there at the read(0, line.





 On Fri, Jan 17, 2014 at 11:04 AM, Guy Knights 
 g...@eastsidegamestudio.comwrote:

 I have a bunch of dev servers which have begun experiencing the same
 issue when I run puppet apply. The full command I'm using is: sudo puppet
 apply --modulepath=/opt/puppet-conf/development/modules
 --environment=development.

 I've never had a problem running this command before, but very recently,
 when I run it on any of my dev servers it just hangs right after I hit
 enter. It never times out and I don't get any output, event when I add
 --verbose, --debug and --detailed-exitcodes.

 I investigated further, and ran the above command using strace. It
 appears that puppet hangs when trying to read /etc/puppet/routes.yaml
 (which doesn't exist). I created /etc/puppet/routes.yaml but then puppet
 apply just fails (I'm not really sure what to put in routes.yaml, though).

 Does anyone have any idea what's happening here? I'm not sure why this
 only just started happening. For the record, here are the packages I have
 installed:

 ii  facter1.7.4-1puppetlabs1   Ruby
 module for collecting simple facts about a host operating system
 ii  hiera 1.3.0-1puppetlabs1   A
 simple pluggable Hierarchical Database.
 ii  puppet3.4.2-1puppetlabs1
 Centralized configuration management - agent startup and compatibility
 scripts
 ii  puppet-common 3.4.2-1puppetlabs1
 Centralized configuration management
 ii  puppetlabs-release1.0-7
  Package to install Puppet Labs gpg key and apt repo
 ii  ruby-rgen 0.6.5-1puppetlabs1   A
 framework supporting Model Driven Software Development (MDSD)

 Thanks,
 Guy

 g...@eastsidegamestudio.com




 --
 Guy Knights
 Lead Systems Administrator
 http://eastsidegamestudio.com
 www.eastsidegamestudio.com
 g...@eastsidegamestudio.com

 g...@eastsidegamestudio.com




-- 
Guy Knights
Lead Systems Administrator
http://eastsidegamestudio.com
www.eastsidegamestudio.com
g...@eastsidegamestudio.com

g...@eastsidegamestudio.com

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CA%2BgQdWARv4Y%3DkcY55ry%2BGoscpJ2bdr4Fr8NtfKJLSZimY8W_wA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Puppet apply hangs

2014-01-17 Thread Jose Luis Ledesma
I think it was waiting for a manifest in the standard input

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/0f1b0e4d-0e05-4a46-b88b-73709a841246%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Puppet Fundamentals training - how fundamental is it?

2014-01-17 Thread Johan De Wit

On 01/17/2014 07:30 PM, Nathan Valentine wrote:

Hey, David.

I'm a trainer for Puppet Labs and just finished teaching my 
bazillionth Fundamentals class yesterday. ;)


The class is appropriate for those with at least a little bit of Ops 
or Dev experience and it helps greatly if you are at least minimally 
comfortable with VMWare/Virtualbox and things like SSH and Unix-y text 
editors (vi or nano). That said of my my most impressive students was 
an MBA and had been out of pure tech for 5 or 6 years. The classes 
assume no previous Puppet experience but scripting experience 
certainly won't hurt you.


The class covers Puppet agent + master workflow, some basic version 
control, Puppet modules, Defines, Parameterized Classes, Hiera and a 
few other bits specific to Puppet Enterprise. I've had students who 
have been doing Puppet for a couple of years come to the Fundamentals 
class and say afterwards they were surprised how much they learned. 
One particular student who expressed that view was maintaining a 
Puppet codebase of nearly 10k lines and thought he had seen it all 
before coming to class.


 will warn you that most people how decide to skip Fundamentals and go 
straight to Advanced often regret it. It is quite a step up.




I can confirm this.  I gave an advanced training recently to some people 
skipping the fundamentals.  And they were missing some stuff we teach in 
the fundamentals on which advanced is building upon.


Not a general rule, but ...even experienced puppet people are 
positive about the fundamentals, because the still learn a lot.


And even I still learn while teaching those courses.  Puppetlabs put a 
lot of effort in them to keep them accurate and up to date.


You might want to check the training schedule on our site. I think we 
list Puppet Introduction classes there. They are a one-day very 
accelerated and stripped down version of the Fundamentals class. They 
are almost always taught at industry conferences as opposed to a 
public training center. Sitting through one of those would give you a 
very good idea what to expect in Fundamentals.


Feel free to email my offlist if you have other questions.





On Fri, Jan 17, 2014 at 9:35 AM, David Taylor 
david.a.tay...@gmail.com mailto:david.a.tay...@gmail.com wrote:


Hi all,

I've been playing around with Puppet with a view to implementing
it at my workplace. I've already run through the Learning Puppet
tutorial on docs.puppetlabs.com http://docs.puppetlabs.com and
the quizzes in the Puppet Learn Library, and now I'm looking into
more formal training to try and get everything nailed down in my
head and to get an idea of best practices for module design,
environments etc. I was wondering if anyone could advise on
whether the Puppet Fundamentals course is the right course to go
for, or is it aimed at the complete Puppet novice - i.e. will I
find that it just retreads things I already know?

Thanks,

-- 
Dave Taylor
-- 
You received this message because you are subscribed to the Google

Groups Puppet Users group.
To unsubscribe from this group and stop receiving emails from it,
send an email to puppet-users+unsubscr...@googlegroups.com
mailto:puppet-users%2bunsubscr...@googlegroups.com.
To view this discussion on the web visit

https://groups.google.com/d/msgid/puppet-users/2252a549-b862-4ffc-ae19-a1b3912b695c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




--
---
Nathan Valentine, Puppet Labs Professional Services
Have you seen : http://ask.puppetlabs.com , http://puppetlabs.com/learn ?

--
You received this message because you are subscribed to the Google 
Groups Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CA%2BsYer1%2B9Q0KcS9LK_ETYh9RRrD1hG%3Db4NLSPg25jHbZyEC1sQ%40mail.gmail.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
Johan De Wit

Open Source Consultant

Red Hat Certified Engineer (805008667232363)
Puppet Certified Professional 2013 (PCP006)
_
 
Open-Future Phone +32 (0)2/255 70 70

Zavelstraat 72  Fax   +32 (0)2/255 70 71
3071 KORTENBERG Mobile+32 (0)474/42 40 73
BELGIUM http://www.open-future.be
_
 



Next Events:
Puppet Fundamentals Training | 
http://www.open-future.be/puppet-fundamentals-training-4-till-6th-february
Puppet Intruction Course | 
http://www.open-future.be/puppet-introduction-course-7th-february
Zabbix Certified Training | 
http://www.open-future.be/zabbix-certified-training-10-till-12th-february
Zabbix for Large Environments Training | 

Re: [Puppet Users] error testing puppet 3.x upgrade: You need rubygems to use Hiera

2014-01-17 Thread Tim Mooney

In regard to: [Puppet Users] error testing puppet 3.x upgrade: You need...:

All-

Does anyone have any thoughts on what's causing this issue?

Since I posted the original question, I've also tried starting with
a fresh RHEL 6.5 system that's never had puppet on it, and installed 3.4.2
from Puppet Labs.  I still get exactly the same error when a client
connects to the test master: You need rubygems to use Hiera.

I can't imagine what the problem really is, but it definitely isn't that
rubygems is missing; it gets installed as part of the package dependency
for puppet 3.4.2.

Thanks,

Tim



The TL;DR version:

On a 2.7.14 puppet client promoted to be a test 3.4.2 master, whenever a
client connects I get:

Warning: Puppet.features.rubygems? is deprecated. Require rubygems in your
application's entry point if you need it.
  (at /usr/lib/ruby/site_ruby/1.8/puppet/util/feature.rb:17:in `add')
Error: You need rubygems to use Hiera at /etc/puppet/manifests/users.pp:243 on
node rh6client.example.com
Error: You need rubygems to use Hiera at /etc/puppet/manifests/users.pp:243 on
node rh6client.example.com
Error: You need rubygems to use Hiera at /etc/puppet/manifests/users.pp:243 on
node rh6client.example.com

I have the RHEL-provided rubygems package installed (it gets installed
automatically as a dependency of puppet 3.4.2 from Puppet Labs), so why
the error?


The full version:

We're currently using puppet 2.7.14 with facter 1.5.9, both on master and
on our clients.  All of our clients are currently RHEL 5.x or RHEL 6.x,
though we'll likely be adding other OSes once we're on Puppet 3.x.

I'm beginning our testing of 3.4.x by following the documentation here:

http://docs.puppetlabs.com/guides/upgrading.html

I'm following the Option 1 route, promoting a client to be the master.
The client I'm promoting is a fresh install of RHEL 6.5 with our puppet 
2.7.14,

and I have done a puppet apply on it to get all local config in place for
a basic puppet client in our environment.

I then copied all of /etc/puppet and /var/lib/puppet from our
current master over to the client I wish to promote.

To promote the client to be the test master, I uninstall our locally-built
RPMs for facter  puppet, then install the PuppetLabs EL6 rpms for

facter-1.7.4-1.el6
hiera-1.3.0-1.el6
puppet-3.4.2-1.el6
puppet-server-3.4.2-1.el6
rubygem-json-1.5.5-1.el6
ruby-rgen-0.6.5-1.el6

That also auto-installed, for dependencies, Red Hat's packages for

ruby-rdoc-1.8.7.352-13.el6.x86_64
ruby-irb-1.8.7.352-13.el6.x86_64
rubygems-1.3.7-5.el6.noarch

I have updated the auth.conf to have allow_ip stanzas for the one custom
file serving location we use.

I start up the temporary puppet master:

# puppet master --no-daemonize --verbose
Notice: Starting Puppet master version 3.4.2

I then pick an existing client, rh6client.example.com, uninstall
facter  puppet, install the Puppet Labs facter  puppet, which also
pull in Puppet Labs' hiera  rubygem-json, as well as the Red Hat ruby-rdoc,
ruby-irb, and rubygems.

I point the client at the temporary master and receive (on the client)
the error:

# puppet agent --server pm-tmp.example.com --test --noop
Info: Retrieving plugin
Info: Loading facts in /var/lib/puppet/lib/facter/printers.rb
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
Info: Loading facts in /var/lib/puppet/lib/facter/net_location.rb
Info: Loading facts in /var/lib/puppet/lib/facter/biosversion.rb
Info: Loading facts in /var/lib/puppet/lib/facter/net_info.rb
Info: Loading facts in /var/lib/puppet/lib/facter/ipmi_product.rb
Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/lib/puppet/lib/facter/pacemaker.rb
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: You
need rubygems to use Hiera at /etc/puppet/manifests/users.pp:243 on node 
rh6client.example.com

Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run


On the temporary server, it has output a bunch of Info statements about
processing for auth.conf, but follows that with:

Info: Caching node for rh6client.example.com
Info: Caching node for rh6client.example.com
Warning: Puppet.features.rubygems? is deprecated. Require rubygems in your
application's entry point if you need it.
  (at /usr/lib/ruby/site_ruby/1.8/puppet/util/feature.rb:17:in `add')
Error: You need rubygems to use Hiera at /etc/puppet/manifests/users.pp:243 on
node rh6client.example.com
Error: You need rubygems to use Hiera at /etc/puppet/manifests/users.pp:243 on
node rh6client.example.com
Error: You need rubygems to use Hiera at /etc/puppet/manifests/users.pp:243 on
node rh6client.example.com


That part of the manifest looks like this:


# used on the netflow server
@user { 'ncsprime':
 home   = '/var/netflow/ncsprime',
 gid= 'ncsprime',
 comment= 'Cisco NCS Prime backup file owner',
 membership = 

Re: [Puppet Users] error testing puppet 3.x upgrade: You need rubygems to use Hiera

2014-01-17 Thread Moses Mendoza
Tim, this is a very odd message that you're getting.

The reason I say so is that code is from the old hiera-puppet, and it
was removed from hiera-puppet before the 1.0.0 release (here's the
pull request: https://github.com/puppetlabs/hiera-puppet/pull/11), and
as such was never part of hiera-puppet that was merged into puppet
proper in 3.0.0.

Doesn't seem like it is, but do you possibly have an old hiera-puppet
somewhere that's still getting loaded by your master?

On Fri, Jan 17, 2014 at 3:09 PM, Tim Mooney tim.moo...@ndsu.edu wrote:
 In regard to: [Puppet Users] error testing puppet 3.x upgrade: You need...:

 All-

 Does anyone have any thoughts on what's causing this issue?

 Since I posted the original question, I've also tried starting with
 a fresh RHEL 6.5 system that's never had puppet on it, and installed 3.4.2
 from Puppet Labs.  I still get exactly the same error when a client
 connects to the test master: You need rubygems to use Hiera.

 I can't imagine what the problem really is, but it definitely isn't that
 rubygems is missing; it gets installed as part of the package dependency
 for puppet 3.4.2.

 Thanks,

 Tim



 The TL;DR version:

 On a 2.7.14 puppet client promoted to be a test 3.4.2 master, whenever a
 client connects I get:

 Warning: Puppet.features.rubygems? is deprecated. Require rubygems in your
 application's entry point if you need it.
   (at /usr/lib/ruby/site_ruby/1.8/puppet/util/feature.rb:17:in `add')
 Error: You need rubygems to use Hiera at
 /etc/puppet/manifests/users.pp:243 on
 node rh6client.example.com
 Error: You need rubygems to use Hiera at
 /etc/puppet/manifests/users.pp:243 on
 node rh6client.example.com
 Error: You need rubygems to use Hiera at
 /etc/puppet/manifests/users.pp:243 on
 node rh6client.example.com

 I have the RHEL-provided rubygems package installed (it gets installed
 automatically as a dependency of puppet 3.4.2 from Puppet Labs), so why
 the error?


 The full version:

 We're currently using puppet 2.7.14 with facter 1.5.9, both on master and
 on our clients.  All of our clients are currently RHEL 5.x or RHEL 6.x,
 though we'll likely be adding other OSes once we're on Puppet 3.x.

 I'm beginning our testing of 3.4.x by following the documentation here:

 http://docs.puppetlabs.com/guides/upgrading.html

 I'm following the Option 1 route, promoting a client to be the master.
 The client I'm promoting is a fresh install of RHEL 6.5 with our puppet
 2.7.14,
 and I have done a puppet apply on it to get all local config in place for
 a basic puppet client in our environment.

 I then copied all of /etc/puppet and /var/lib/puppet from our
 current master over to the client I wish to promote.

 To promote the client to be the test master, I uninstall our locally-built
 RPMs for facter  puppet, then install the PuppetLabs EL6 rpms for

 facter-1.7.4-1.el6
 hiera-1.3.0-1.el6
 puppet-3.4.2-1.el6
 puppet-server-3.4.2-1.el6
 rubygem-json-1.5.5-1.el6
 ruby-rgen-0.6.5-1.el6

 That also auto-installed, for dependencies, Red Hat's packages for

 ruby-rdoc-1.8.7.352-13.el6.x86_64
 ruby-irb-1.8.7.352-13.el6.x86_64
 rubygems-1.3.7-5.el6.noarch

 I have updated the auth.conf to have allow_ip stanzas for the one custom
 file serving location we use.

 I start up the temporary puppet master:

 # puppet master --no-daemonize --verbose
 Notice: Starting Puppet master version 3.4.2

 I then pick an existing client, rh6client.example.com, uninstall
 facter  puppet, install the Puppet Labs facter  puppet, which also
 pull in Puppet Labs' hiera  rubygem-json, as well as the Red Hat
 ruby-rdoc,
 ruby-irb, and rubygems.

 I point the client at the temporary master and receive (on the client)
 the error:

 # puppet agent --server pm-tmp.example.com --test --noop
 Info: Retrieving plugin
 Info: Loading facts in /var/lib/puppet/lib/facter/printers.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/net_location.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/biosversion.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/net_info.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/ipmi_product.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/pacemaker.rb
 Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
 You
 need rubygems to use Hiera at /etc/puppet/manifests/users.pp:243 on node
 rh6client.example.com
 Warning: Not using cache on failed catalog
 Error: Could not retrieve catalog; skipping run


 On the temporary server, it has output a bunch of Info statements about
 processing for auth.conf, but follows that with:

 Info: Caching node for rh6client.example.com
 Info: Caching node for rh6client.example.com
 Warning: Puppet.features.rubygems? is deprecated. Require rubygems in your
 application's entry point if you need 

Re: [Puppet Users] Re: Collector, Overriding Params and undef vars

2014-01-17 Thread William Leese
makes perfect sense.

Attacking my problem from a different angle, without completely redesigning
the module, how would one go about checking to see if multiple variables
are defined and using only those that are defined as parameter overrides
for a collector?


--
William Leese

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAEFhNOvM1yi9chohFFf4wUYV9y4q1HdSEgvJBL5a_rjtpDTrhg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] unable to execute an installation (create instance) command - vfabric tcserver

2014-01-17 Thread Sam Rajagopal
I have the exec resource defined as follows, to be able to install tcserver 
using a command line, inside of my init.pp. For some reason, it is not able 
to execute the install command, when I run puppet agent -t on the agent

 exec { tomcat-conf:
path = 
'/opt/vmware/vfabric-tc-server-standard:/bin:/usr/bin:/sbin:/usr/sbin',
cwd = /opt/vmware/vfabric-tc-server-standard,
command =  '. /etc/profile.d/vimo_envs.sh' 
/opt/vmware/vfabric-tc-server-standard/tcruntime-instance.sh create 
--instance-directory=/opt/apps/stage/tcserver/mshix-stg 
--java-home=/opt/apps/stage/Java/jdk1.6.0_45 tcserver_app,
timeout = 0,
logoutput = 'true',
subscribe = File[/etc/profile.d/vimo_envs.sh],
refreshonly = true,

}

JAVA_HOME=/opt/apps/stage/Java/jdk1.6.0_45 is provided by 
/etc/profile.d/vimo_envs.sh, and required at the time of creating tc server 
instance.

When I invoke puppet agent, it is able to create an empty directory 
/opt/apps/stage/tcserver/mshix-stg. But nothing else. 
There are no sub-directories containing the conf/ bin/ . I don't get a 
complete configuration

I can run the tcruntime-instance.sh from command line successfully but not 
from within puppet.
Any suggestions ? thanks

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/d465bf0c-e4fd-4403-8223-96450f355ffc%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.