[Puppet Users] Re: custom fact in custom facts resolves to nil

2015-05-27 Thread Thomas Müller


Am Mittwoch, 27. Mai 2015 08:36:39 UTC+2 schrieb ashe...@gmail.com:

 Hi,

 is it possible to use custom facts inside other custom facts? 

 With facter -p the custom fact is listed ( e.g.):

  the -p / --puppet flag for facter is deprecated. use of puppet facts 
will be required. 

https://docs.puppetlabs.com/facter/2.4/release_notes.html#facter-244
 

 ...
 userblweb = 1000

 With irb:

 irb(main):001:0 require 'facter'
 = true
 irb(main):002:0 a = Facter.value(:userblweb)
 = nil

 Any idea?


You would need to  somehow do what the -p/--puppet flag does so it loads 
the facts in the puppet environment.

another note: IMHO ruby facter is also deprecated and native facter will be 
default with facter v3.

- Thomas

-- 
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/156556e8-61d1-4013-9294-0c9dc0ff4056%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: custom fact in custom facts resolves to nil

2015-05-27 Thread Thomas Müller


Am Mittwoch, 27. Mai 2015 11:26:35 UTC+2 schrieb Thomas Müller:



 Am Mittwoch, 27. Mai 2015 08:36:39 UTC+2 schrieb ashe...@gmail.com:

 Hi,

 is it possible to use custom facts inside other custom facts? 

 With facter -p the custom fact is listed ( e.g.):

  the -p / --puppet flag for facter is deprecated. use of puppet facts 
 will be required. 

 https://docs.puppetlabs.com/facter/2.4/release_notes.html#facter-244
  

 ...
 userblweb = 1000

 With irb:

 irb(main):001:0 require 'facter'
 = true
 irb(main):002:0 a = Facter.value(:userblweb)
 = nil

 Any idea?


 You would need to  somehow do what the -p/--puppet flag does so it loads 
 the facts in the puppet environment.


seems like the relevant code:
https://github.com/puppetlabs/facter/blob/stable/lib/facter/application.rb#L199

- Thomas

-- 
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/88254476-eca8-4dcc-ad4d-ae1502f202fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Calling hiera functions from inside Ruby templates broken in Puppet 4.x?

2015-05-27 Thread Maura Dailey
Thank you for your detailed response. It appears the primary problem could 
be in the hiera documentation, then, as it still refers to calling 
conventions that are apparently now completely outdated. I've read your 
blog before but didn't pick up on the meaning of the article about epp 
templates.

On Tuesday, May 26, 2015 at 8:16:23 PM UTC-4, Henrik Lindberg wrote:

 On 2015-23-05 24:39, Maura Dailey wrote: 
  Yes, I know this practice is discouraged in the documentation, but the 
  updated hiera 2.0 documentation also assures me that it's supported and 
  implies no changes to puppet 3.x manifests or templates are required. 
  
  This networking.erb file used to work in puppet 3.8 (this is a cruddy 
  example, I use callouts to hiera data EXTENSIVELY in dozens of much more 
  complicated configuration templates): 
  | 
  NETWORKING=yes 
  NETWORKING_IPV6=no 
  HOSTNAME=%=@fqdn% 
  GATEWAY=%=scope.function_hiera(['gateway'])% 
  NOZEROCONF=yes 
  | 
  
  Now in puppet 4.1, I get the following: 
  | 
  Info:Retrievingpluginfacts 
  Info:Retrievingplugin 
  Info:Loadingfacts 
  Error:Couldnotretrieve catalog fromremote server:Error400on 
  SERVER:EvaluationError:Errorwhileevaluating a FunctionCall,Failedto 
  parse templatenetworking/network.erb: 
  
 Filepath:/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/functions/fail.rb
  

  Line:3 
  Detail:hiera()has been converted to 4xAPI 
  | 
  
  I checked the hiera 2.0 documentation on the names of functions 
  here: 
 http://docs.puppetlabs.com/hiera/latest/puppet.html#hiera-lookup-functions 
  
  and the hiera 2.0 documention on how to call them from inside templates 
  here: 
  
 http://docs.puppetlabs.com/hiera/latest/puppet.html#using-the-lookup-functions-from-templates
  
  
  What am I missing? I tried to read the Ruby source for hints, but I'm 
  more of a Python person and couldn't find any documentation on how to 
  call the 4x API functions correctly. Thanks in advance for any 
 assistance. 

 You have unfortunately run into a problem with a puppet 3.x function 
 (template()) making a call to a function that have been migrated to the 
 4.x function API. In the new API functions are not called via scope, and 
 a 3x function does not have the needed information to do so easily. 

 You can get around the problem by using the new templating system EPP 
 where the logic is written in the Puppet Language. This is also the long 
 term direction (The more safe, and better specified EPP over ERB where 
 you are exposed to the internals of the puppet runtime). 

 The snippet you showed can be written like this in EPP: 

 NETWORKING=yes 
 NETWORKING_IPV6=no 
 HOSTNAME=%= $fqdn % 
 GATEWAY=%= hiera('gateway') % 
 NOZEROCONF=yes 

 I understand this may be a bit of work when you have many and 
 complicated templates esp. if you rely on the internals of Puppet. 
 For regular templates that only access variables, it should be as easy 
 as replacing a @varname with $varname). 


I did a quick test using this syntax, and this appears to work perfectly. 
This will work for 99% of my existing templates, I think. (I had to switch 
the calling convention inside the pp file to call epp instead of template 
before it stopped giving me errors. Oops.)


 I think a ticket should be logged regarding the difficulty of calling a 
 4x function (this has popped up in other contexts (where it was possible 
 to work around the issue more easily)). 

 What is needed is a calling mechanism that is agnostic; a function that 
 is written with the 4.x. API simply uses the method 
 'call_function(NAME, ARG1, ARG2, ...)' and it calls either a 3.x 
 or a 4.x function. A similar thing is needed in an accessible way from 
 within a 3.x. function or template (e.g. scope.call_function with the 
 same signature as in the 4.x API). The fix would entail something like 
 what I am describing below... 

 Alternatively, to get past the problem if you do not want to move to EPP 
 right away here is how to call a 4.x function (but this is not 
 considered API, as we are planning refactoring how calls are made - they 
 are done in several different ways atm): 

 # Note that this requires = 3.8.1 with future parser or 4.1.0. 
 # 
 def call_function(name, args, scope, block) 
# Get the loader that serves the environment - i.e for a call that 
# comes from within the environment. This makes all functions in the 
# environment (all modules, and environment private function) visible) 
# to the caller. (This is somewhat cheating wrt. visibility - i.e. 
# 'private' functions which will be supported in a later version). 
# 
loader = scope.compiler.loaders.private_environment_loader 
if loader  func = loader.load(:function, name) 
  return func.call(scope, *args, block) 
end 
# the function was not found... deal with it 
 end 

 The above is a modified version of what is used in the puppet runtime, 
 and should be possible to use in a template - even as a 

Re: [Puppet Users] Calling hiera functions from inside Ruby templates broken in Puppet 4.x?

2015-05-27 Thread Stephen Gelman
Unfortunately using EPP is not sufficient for all of our templates.  (In a
few places we use some pretty intense logic that we are working to simplify
but it will take a while)  Are there plans to make it easier to call hiera
from within a template?  Would porting the template function to be a 4.x
function change its ability to call the hiera function more easily?  I'm a
little frustrated that a huge breaking change like this was made without
the behavior either being deprecated first and also without any mention of
the breaking change in the puppet 4 release notes.

Thanks,

Stephen

On Wed, May 27, 2015 at 1:04 PM, Maura Dailey ma...@eclipse.ncsc.mil
wrote:

 Thank you for your detailed response. It appears the primary problem could
 be in the hiera documentation, then, as it still refers to calling
 conventions that are apparently now completely outdated. I've read your
 blog before but didn't pick up on the meaning of the article about epp
 templates.

 On Tuesday, May 26, 2015 at 8:16:23 PM UTC-4, Henrik Lindberg wrote:

 On 2015-23-05 24:39, Maura Dailey wrote:
  Yes, I know this practice is discouraged in the documentation, but the
  updated hiera 2.0 documentation also assures me that it's supported and
  implies no changes to puppet 3.x manifests or templates are required.
 
  This networking.erb file used to work in puppet 3.8 (this is a cruddy
  example, I use callouts to hiera data EXTENSIVELY in dozens of much
 more
  complicated configuration templates):
  |
  NETWORKING=yes
  NETWORKING_IPV6=no
  HOSTNAME=%=@fqdn%
  GATEWAY=%=scope.function_hiera(['gateway'])%
  NOZEROCONF=yes
  |
 
  Now in puppet 4.1, I get the following:
  |
  Info:Retrievingpluginfacts
  Info:Retrievingplugin
  Info:Loadingfacts
  Error:Couldnotretrieve catalog fromremote server:Error400on
  SERVER:EvaluationError:Errorwhileevaluating a FunctionCall,Failedto
  parse templatenetworking/network.erb:
 
 Filepath:/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/functions/fail.rb

  Line:3
  Detail:hiera()has been converted to 4xAPI
  |
 
  I checked the hiera 2.0 documentation on the names of functions
  here:
 http://docs.puppetlabs.com/hiera/latest/puppet.html#hiera-lookup-functions
 
  and the hiera 2.0 documention on how to call them from inside templates
  here:
 
 http://docs.puppetlabs.com/hiera/latest/puppet.html#using-the-lookup-functions-from-templates
 
  What am I missing? I tried to read the Ruby source for hints, but I'm
  more of a Python person and couldn't find any documentation on how to
  call the 4x API functions correctly. Thanks in advance for any
 assistance.

 You have unfortunately run into a problem with a puppet 3.x function
 (template()) making a call to a function that have been migrated to the
 4.x function API. In the new API functions are not called via scope, and
 a 3x function does not have the needed information to do so easily.

 You can get around the problem by using the new templating system EPP
 where the logic is written in the Puppet Language. This is also the long
 term direction (The more safe, and better specified EPP over ERB where
 you are exposed to the internals of the puppet runtime).

 The snippet you showed can be written like this in EPP:

 NETWORKING=yes
 NETWORKING_IPV6=no
 HOSTNAME=%= $fqdn %
 GATEWAY=%= hiera('gateway') %
 NOZEROCONF=yes

 I understand this may be a bit of work when you have many and
 complicated templates esp. if you rely on the internals of Puppet.
 For regular templates that only access variables, it should be as easy
 as replacing a @varname with $varname).


 I did a quick test using this syntax, and this appears to work perfectly.
 This will work for 99% of my existing templates, I think. (I had to switch
 the calling convention inside the pp file to call epp instead of template
 before it stopped giving me errors. Oops.)


 I think a ticket should be logged regarding the difficulty of calling a
 4x function (this has popped up in other contexts (where it was possible
 to work around the issue more easily)).

 What is needed is a calling mechanism that is agnostic; a function that
 is written with the 4.x. API simply uses the method
 'call_function(NAME, ARG1, ARG2, ...)' and it calls either a 3.x
 or a 4.x function. A similar thing is needed in an accessible way from
 within a 3.x. function or template (e.g. scope.call_function with the
 same signature as in the 4.x API). The fix would entail something like
 what I am describing below...

 Alternatively, to get past the problem if you do not want to move to EPP
 right away here is how to call a 4.x function (but this is not
 considered API, as we are planning refactoring how calls are made - they
 are done in several different ways atm):

 # Note that this requires = 3.8.1 with future parser or 4.1.0.
 #
 def call_function(name, args, scope, block)
# Get the loader that serves the environment - i.e for a call that
# comes from within the environment. This makes all functions in 

Re: [Puppet Users] Exported resource collection timing out

2015-05-27 Thread Huaqing Zheng
Documentation says

configtimeout

How long the client should wait for the configuration to be retrieved
before considering it a failure. This setting is deprecated and has been
replaced by http_connect_timeout and http_read_timeout. This setting can be
a time interval in seconds (30 or 30s), minutes (30m), hours (6h), days
(2d), or years (5y).

Default: 2m

I'll try tweaking http_read_timeout.


On Wed, May 27, 2015 at 10:20 AM, Matthew Schmitt killas...@gmail.com
wrote:

 In the past, I’ve added a time to my puppet agent run and then adjusted
 this setting in puppet.conf - configtimeout

 I believe the default is 2 minutes, so if your collection is taking
 longer, you’ll hit the timeout error.

 Matt

 On May 27, 2015, at 9:17 AM, Huaqing Zheng huas...@gmail.com wrote:

 I have a server that's collecting exported resources (icinga/nagios
 configurations) but it's frequently timing out with:

 Error: Could not retrieve catalog from remote server: Timeout::Error
 Warning: Not using cache on failed catalog
 Error: Could not retrieve catalog; skipping run

 Any ideas about how to extend the timeout?

 --
 Huaqing Zheng
 Code Wrangler

 --
 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/CAKSYJTN_3-gBk%3DoesSgu%2B%2Bfiz%2BxF3zefZ5GYP3cGgiE6Kz4hXA%40mail.gmail.com
 https://groups.google.com/d/msgid/puppet-users/CAKSYJTN_3-gBk%3DoesSgu%2B%2Bfiz%2BxF3zefZ5GYP3cGgiE6Kz4hXA%40mail.gmail.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.


  --
 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/EB465765-21E8-4496-A815-1DD9B74958DB%40gmail.com
 https://groups.google.com/d/msgid/puppet-users/EB465765-21E8-4496-A815-1DD9B74958DB%40gmail.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




-- 
Huaqing Zheng
Code Wrangler

-- 
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/CAKSYJTNvHMBRx6tUpv9nrbe6TvT_%2B8MxbY6ZE2ip5OCqP%3D37CQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Exported resource collection timing out

2015-05-27 Thread Huaqing Zheng
I have a server that's collecting exported resources (icinga/nagios
configurations) but it's frequently timing out with:

Error: Could not retrieve catalog from remote server: Timeout::Error
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Any ideas about how to extend the timeout?

-- 
Huaqing Zheng
Code Wrangler

-- 
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/CAKSYJTN_3-gBk%3DoesSgu%2B%2Bfiz%2BxF3zefZ5GYP3cGgiE6Kz4hXA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Error 400 on SERVER: Could not find class lamp

2015-05-27 Thread Joe Koenig


On Tuesday, May 26, 2015 at 8:15:43 AM UTC-5, jcbollinger wrote:



 On Friday, May 22, 2015 at 3:34:11 PM UTC-5, Joe Koenig wrote:

 Hi all,

 I'm trying to learn puppet and am running into a roadblock trying to get 
 an agent to pickup its configuration from a master server. On master, I 
 have created a class called 'lamp':

 [x@master manifests]# pwd

 /etc/puppet/modules/lamp/manifests

 [x@master manifests]# ls -l

 total 4

 -r--r--r--. 1 puppet puppet 1014 May 21 22:06 init.pp


 Well, *perhaps* you created a class called lamp.  All you actually show 
 is that you created the file in which Puppet will look for the definition 
 of such a class.


  

 On my agent, I run:

 sudo puppet agent --test --noop --debug

 The output is (note, I changed the valid FQDN to 'fqdn' in the log 
 entries):
 [many ordinary debug-level messages, but no mention of a class lamp]



 Supposing that you really did create a class lamp, it will be applied 
 only to those nodes to which you assign it.  There is a variety of ways to 
 perform a class assignment, but they fall into two main categories: using 
 an external node classifier (ENC), or declaring it either directly or 
 indirectly via the node's environment's starting-point manifest.  If you 
 have not done this then your class will not be applied to any node.

 Additionally, you may be running into an issue with Puppet's environment 
 cache.  Unless you affirmatively disable caching (thereby accepting a 
 performance penalty) it's safest to restart the master after changing your 
 manifest set to ensure that the changes are recognized right away.

 
Thanks for the response. It looks like Google was trimming part of my 
original post (see trimmed content above for more log, too). I have the 
code that exists in the init.pp above, along with the error log entry:

*Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Could not find class lamp for web-agent-1.fqdn on node web-agent-1.fqdn*

*Warning: Not using cache on failed catalog*

*Error: Could not retrieve catalog; skipping run*


For simplicity, the 'lamp' class contains this:

class lamp {

exec { 'yum-update':# exec resource named 'yum-update'

  command = '/usr/bin/yum update -y'  # command this resource will run

}


# install apache2 package

package { 'apache2':

  require = Exec['yum-update'],# require 'apt-update' before 
installing

  ensure = installed,

}


# ensure apache2 service is running

service { 'apache2':

  ensure = running,

}


# install mysql-server package

package { 'mariadb-server':

  require = Exec['yum-update'],# require 'apt-update' before 
installing

  ensure = installed,

}


# ensure mysql service is running

service { 'mysql':

  ensure = running,

}


# install php5 package

package { 'php5':

  require = Exec['yum-update'],# require 'apt-update' before 
installing

  ensure = installed,

}


# ensure info.php file exists

file { '/var/www/html/info.php':

  ensure = file,

  content = '?php  phpinfo(); ?',# phpinfo code

  require = Package['apache2'],# require 'apache2' package before 
creating

} 

}

-

I'm fully expecting issues with that class, which I can debug once I'm able 
to get puppet to locate it, and I am ultimately planning on converting it 
over to use existing modules to handle things like apache/php install, 
etc., but I wanted to try my hand at it in order to get a good feel of 
how/what puppet does.

To me, the error seems to indicate that it is successfully identifying the 
node in the site.pp file, but it's just not able to locate that lamp class.

I did try turning off cache and restarting the master, both to no avail.

Any help would be much appreciated.

Thanks,

Joe

-- 
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/50e2140d-f91c-4c0e-853f-06e93c8daf39%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Announce: Puppet 3.8.1 available

2015-05-27 Thread Kylo Ginsberg
On Tue, May 26, 2015 at 10:53 PM, Poil p...@quake.fr wrote:

  Hi,

 PUP-1208 is not included :( ?


Fixed in puppet 4!

Best,
Kylo

-- 
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/CALsUZFFun_LGayXcRpSqF8z4Zj%2BzCSqd62Kpe3WX7icX5-CG0g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] custom fact in custom facts resolves to nil

2015-05-27 Thread Peter Huene
Hi Andreas,

On Tue, May 26, 2015 at 11:16 PM, ashee...@gmail.com wrote:

 Hi,

 is it possible to use custom facts inside other custom facts?

 With facter -p the custom fact is listed ( e.g.):

 ...
 userblweb = 1000

 With irb:

 irb(main):001:0 require 'facter'
 = true
 irb(main):002:0 a = Facter.value(:userblweb)
 = nil

 Any idea?


When using the Facter API, Facter needs to be told where the custom facts
are stored:

irb Facter.search 'path_to_custom_facts'

Note: despite being a verb, the 'search' method only adds the given path to
the list of search paths.

The same thing happens during Puppet's settings initialization that is
invoked when you pass the '-p' option to Facter (as Thomas mentioned, this
is deprecated).

Likewise, the path can be specified to Facter by using the FACTERLIB
environment variable set to a list of paths to search for custom facts.

Facter 3 will be adding a '--custom-dir' command line option that is
another way of specifying where custom facts are stored.

I hope this helps.


-- 
*Join us at **PuppetConf 2015, October 5-9 in Portland, OR - *www.
http://www.google.com/url?q=http%3A%2F%2Fwww.sa=Dsntz=1usg=AFQjCNEnS7itqgvQV3E4Se1fu4Um_UapSw
2015.puppetconf.com
http://www.google.com/url?q=http%3A%2F%2F2015.puppetconf.comsa=Dsntz=1usg=AFQjCNE1uQL4Sh23Vr-XkPLa4xfNcoXSog

*Register early to save 40%!*

-- 
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/CACZQQfOMw7igPKm_ZWKcFWzrv6%3DGguWJbs%2B2aAeaaJdX2QQxMw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Exported resource collection timing out

2015-05-27 Thread Matthew Schmitt
In the past, I’ve added a time to my puppet agent run and then adjusted this 
setting in puppet.conf - configtimeout

I believe the default is 2 minutes, so if your collection is taking longer, 
you’ll hit the timeout error.

Matt

 On May 27, 2015, at 9:17 AM, Huaqing Zheng huas...@gmail.com wrote:
 
 I have a server that's collecting exported resources (icinga/nagios 
 configurations) but it's frequently timing out with:
 
 Error: Could not retrieve catalog from remote server: Timeout::Error
 Warning: Not using cache on failed catalog
 Error: Could not retrieve catalog; skipping run
 
 Any ideas about how to extend the timeout?
 
 -- 
 Huaqing Zheng
 Code Wrangler
 
 -- 
 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+unsubscr...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/CAKSYJTN_3-gBk%3DoesSgu%2B%2Bfiz%2BxF3zefZ5GYP3cGgiE6Kz4hXA%40mail.gmail.com
  
 https://groups.google.com/d/msgid/puppet-users/CAKSYJTN_3-gBk%3DoesSgu%2B%2Bfiz%2BxF3zefZ5GYP3cGgiE6Kz4hXA%40mail.gmail.com?utm_medium=emailutm_source=footer.
 For more options, visit https://groups.google.com/d/optout 
 https://groups.google.com/d/optout.

-- 
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/EB465765-21E8-4496-A815-1DD9B74958DB%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] odd new error with puppet version 3.8.1

2015-05-27 Thread Peter Berghold
Ever since I upgraded to Puppet version 3.8.1 I now see this error:
Error: /File[/var/lib/puppet/facts.d]: Could not evaluate: Could not
retrieve information from environment production source(s) puppet://
mcadprod1.mca.sharkrivertech.com/pluginfacts


What's that about?  Should I worry.  Something need configuring?

-- 
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/CAArvnv22FAx8RumyP2WyFo%3DMzPx%3DLoGs2RMEO%2BpKBbMnyC%3DdwQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: centos 7 boxes on vagrant cloud?

2015-05-27 Thread Vince Skahan
On Wednesday, October 8, 2014 at 2:15:25 PM UTC-7, Scott Schneider wrote:

 I was wondering when there will be official centos 7 boxes from puppet 
 labs on https://vagrantcloud.com/puppetlabs 
 https://www.google.com/url?q=https%3A%2F%2Fvagrantcloud.com%2Fpuppetlabssa=Dsntz=1usg=AFQjCNEE88DCnBFChQGREk2MUMsz0xmbgA
 ?
 Also it would be nice to have a link on the puppet vagrant cloud homepage 
 to what repo these boxes are generated from like the chef project does to 
 https://github.com/opscode/bento.


 Hi Chris,

 You've caught us in the middle of re-working our automated Vagrant imaging 
 pipeline.  I expect to have new builds published to Vagrant Cloud later 
 this week or early next week.

 We're also working on setting up a ticketing project for bug reporting and 
 publicizing our Packer repository, as suggested.  Stay tuned!



It's been over 'eight' months - would it be possible to at least have a 
readme file in that directory saying what the heck is in each box and what 
isn't ?

The pattern seems to be:

   - distro-version-arch-nocm = is this a base box with no puppet 
   software at all ?
   - distro-version-arch-puppet   = is this base + puppet server + 
   agent ?   The free one ?  The trial version of enterprise ?
   - distro-version-arch-puppet-enterprise = is this base + puppet 
   enterprise agent-only ?
   - distro-version-arch-openstack = no clue what this is

It would be greatly appreciated if somebody who knows at PL would take five 
minutes and provide the secret decoder ring at the top of the webpage.




The cryptic descriptions are basically unreadable 

-- 
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/f340c814-56fa-4028-b7ef-248f50f1ee20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Error 400 on SERVER: Could not find class lamp

2015-05-27 Thread Joe Koenig

Hi All,

This seems to be resolved. I was running puppet 3.7.5 and updated to 3.8.1 
and it magically all worked as expected.

-- 
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/a9396f89-ffdf-4a8a-9257-5eaca5c6a2bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] odd new error with puppet version 3.8.1

2015-05-27 Thread Josh Cooper
On Wed, May 27, 2015 at 1:02 PM, Peter Berghold salty.cowd...@gmail.com
wrote:

 Ever since I upgraded to Puppet version 3.8.1 I now see this error:
 Error: /File[/var/lib/puppet/facts.d]: Could not evaluate: Could not
 retrieve information from environment production source(s) puppet://
 mcadprod1.mca.sharkrivertech.com/pluginfacts


 What's that about?  Should I worry.  Something need configuring?


When the agent runs, it will attempt to download external facts from all of
the modules on the master to the /var/lib/puppet/facts.d directory on the
agent. If no module has a facts.d directory on the master, e.g. in 3.8.x
that'd be /etc/puppet/modules/some_module/facts.d, then the agent will
display the above message. I think there is a ticket to not display an
error message, as it's not really an error. And I think you can work around
the issue by creating an empty facts.d directory for one of your modules.

Josh

-- 
Josh Cooper
Developer, Puppet Labs

*PuppetConf 2015 http://2015.puppetconf.com/ is coming to Portland,
Oregon! Join us October 5-9.*
*Register now to take advantage of the Early Adopter discount
https://www.eventbrite.com/e/puppetconf-2015-october-5-9-tickets-13115894995?discount=EarlyAdopter
*
*—**save $349!*

-- 
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%2Bu97unVEaSPr4SisA_pC5AtG3usauNVMGJLoqBQ6ABE_ThDeQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] custom fact in custom facts resolves to nil

2015-05-27 Thread asheepen
Hi,

is it possible to use custom facts inside other custom facts? 

With facter -p the custom fact is listed ( e.g.):

...
userblweb = 1000

With irb:

irb(main):001:0 require 'facter'
= true
irb(main):002:0 a = Facter.value(:userblweb)
= nil

Any idea?

puppetversion: 3.7.3
facter 2.3.0

Regards
Andreas

-- 
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/b9819241-6494-4c37-a10f-b240bcb0faf4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Unable to use Weblogic slinet installation on puppet

2015-05-27 Thread Bala chandran


Having this error when the module is run

Notice: /Stage[main]/Weblogic/Exec[install weblogic]/returns: Unable to 
change access permissions on the temporary directory 
/tmp/OraInstall2015-05-27_01-02-38PM.
Notice: /Stage[main]/Weblogic/Exec[install weblogic]/returns: Unable to 
locate or create a temporary directory for the Oracle Universal Installer.
what permisiion is required for /tmp folder.
I have already assign 777 for the .tmp folder.

The Java -jar wls_212100.far is not working to install.

-- 
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/8bc3cb5f-5e6c-4e4d-bf45-94bbfa29ece4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] [Swift] Ring sync with separate proxy and storage servers

2015-05-27 Thread Mark Kirkwood
Ok - helping myself on this one, I notice that
modules/swift/tests/site.pp is a 'worked' example for this. Excellent
(reads).

On 26/05/15 12:44, Mark Kirkwood wrote:
 Hi,
 
 I'm trying to deploy a proxy and two storage servers (VMs, it's a test
 environment). I started following the examples in
 https://forge.puppetlabs.com/puppetlabs/swift and made some progress
 (see attached):
 
 - on 2 storage servers the swift processes start
 - on proxy server they do not start
 
 Closer inspection show that:
 
 - rings on each storage server have only the local devices
 - there are no rings at all on the proxy
 
 I'm clearly 'doing it wrong' and not setting up the exported resources
 correctly. Any pointers appreciated!
 
 Cheers
 
 Mark
 

-- 
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/556698BC.2030804%40catalyst.net.nz.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppetlabs/concat - appears to have a negative number of dependencies

2015-05-27 Thread Miguel Di Ciurcio Filho
On Wed, May 27, 2015 at 7:46 PM, Danny Roberts
dannyroberts.perso...@googlemail.com wrote:
 I have noticed now that when testing my auditd module
 (https://github.com/kemra102/puppet-auditd) that in CentOS 7 (the only one
 with a different $rules_file) having an even number of rules defined causes
 the following errors to be given ad nausium:


I've spotted this too using the puppetlabs/apache module. There is
already a bug open.

https://tickets.puppetlabs.com/browse/MODULES-2074

I'm not sure what is the issue too.

-- 
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/CAK6Yst%3Dctg5CWZN878AuC44M5ORHr_-9bUHxW_CoMLPF5s9wbw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] odd new error with puppet version 3.8.1

2015-05-27 Thread Garrett Honeycutt
On 5/27/15 5:02 PM, Josh Cooper wrote:
 
 
 On Wed, May 27, 2015 at 1:02 PM, Peter Berghold salty.cowd...@gmail.com
 mailto:salty.cowd...@gmail.com wrote:
 
 Ever since I upgraded to Puppet version 3.8.1 I now see this error:
 Error: /File[/var/lib/puppet/facts.d]: Could not evaluate: Could not
 retrieve information from environment production source(s)
 puppet://mcadprod1.mca.sharkrivertech.com/pluginfacts
 http://mcadprod1.mca.sharkrivertech.com/pluginfacts
 
 
 What's that about?  Should I worry.  Something need configuring?
 
 
 When the agent runs, it will attempt to download external facts from all
 of the modules on the master to the /var/lib/puppet/facts.d directory on
 the agent. If no module has a facts.d directory on the master, e.g. in
 3.8.x that'd be /etc/puppet/modules/some_module/facts.d, then the
 agent will display the above message. I think there is a ticket to not
 display an error message, as it's not really an error. And I think you
 can work around the issue by creating an empty facts.d directory for one
 of your modules.
 
 Josh
 
 -- 
 Josh Cooper
 Developer, Puppet Labs

Hi,

This seems to be what I described in PUP-3324.

https://tickets.puppetlabs.com/browse/PUP-3324

Best regards,
-g

--
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658

-- 
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/556647FE.8050303%40garretthoneycutt.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] puppetlabs/concat - appears to have a negative number of dependencies

2015-05-27 Thread Danny Roberts
I have noticed now that when testing my auditd module 
(https://github.com/kemra102/puppet-auditd) that in CentOS 7 (the only one 
with a different $rules_file) having an even number of rules defined causes 
the following errors to be given ad nausium:

Warning: /etc/audit/rules.d: appears to have a negative number of 
dependencies
Warning: /etc/audit/rules.d/puppet.rules: appears to have a negative number 
of dependencies
Warning: Concat[/etc/audit/rules.d/puppet.rules]: appears to have a 
negative number of dependencies
Warning: Class[Auditd]: appears to have a negative number of dependencies
Warning: /Stage[main]/Auditd/Service[auditd]: appears to have a negative 
number of dependencies
Warning: Class[Auditd]: appears to have a negative number of dependencies
Warning: Class[Auditd]: appears to have a negative number of dependencies
Warning: Concat[/etc/audit/rules.d/puppet.rules]: appears to have a 
negative number of dependencies
Warning: 
/Stage[main]/Auditd/Concat[/etc/audit/rules.d/puppet.rules]/Concat_file[/etc/audit/rules.d/puppet.rules]:
 
appears to have a negative number of dependencies
Warning: 
/Stage[main]/Auditd/Concat[/etc/audit/rules.d/puppet.rules]/Concat_fragment[/etc/audit/rules.d/puppet.rules_header]:
 
appears to have a negative number of dependencies
Warning: 
/Stage[main]/Auditd/Concat[/etc/audit/rules.d/puppet.rules]/Concat_file[/etc/audit/rules.d/puppet.rules]:
 
appears to have a negative number of dependencies

e.g. this works:

include '::auditd'

auditd::rule { 'delete other rules':
  content = '-D',
  order   = '00',
}

this does not:

include '::auditd'

auditd::rule { 'delete other rules':
 content = '-D',
  order   = 00,
}
auditd::rule { 'set buffer size':
  content = '-b 1024',
  order   = 01,
}

I have gone over the code and there is no issues (now) with the 
dependencies that I can see and there is no documentation covering this 
error from Puppetlabs that I can find. Does anyone have any ideas what 
might be causing this?

-- 
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/5cbe7774-5864-4cf8-a225-c68aa3a9eef4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.