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

2015-06-01 Thread Bala chandran
I am running puppet version 3.7.3 (Puppet Enterprise 3.7.1)
Pls advice is there any issues with compatibility issue with Linux centos 

On Thursday, May 28, 2015 at 12:31:25 PM UTC+8, Bala chandran wrote:

> 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/65c922d0-a334-4c0d-982f-77dbd70f4ec4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2015-06-01 Thread Bala chandran


What are the privileged user that need to set on the Centos Linux version 
Linux centos 2.6.32-504.16.2.el6.x86_64
Please advice any setting we need to do on the puppet module...

 user {
'weblogic':
ensure => present,
groups => ['root'],
}






Running 3.7.3 (Puppet Enterprise 3.7.1) on 
On Thursday, May 28, 2015 at 12:31:25 PM UTC+8, Bala chandran wrote:

> 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/297a304a-9dd7-4dc0-a267-2247687aed5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: [Puppet Users] Stupid hiera.yaml wildcard question.

2015-06-01 Thread Robert Davidson
On Monday, June 01, 2015 at 1:48 PM, Christopher Wood 
 said:

*snip*

> It sounds like more pain than it's worth, figuring out which hiera key to use
> in two dimensions of lookup instead of one.

It wouldn't be two dimensions, though. As it currently stands, my profile.yaml 
file contains keys that look like so:

# Logrotate Profile  
profile::logrotate::package::present:
  'logrotate':   
'ensure': 'present'  
profile::logrotate::serviceconf: "/etc/logrotate.conf"   
profile::logrotate::servicefile: "logrotate.conf"
profile::logrotate::cronloc: "/etc/cron.daily/logrotate" 
profile::logrotate::cronfile: "logrotate.cron"   
 
# NTP Profile
profile::ntp::servicename: "ntpd"
profile::ntp::serviceconf: "/etc/ntp.conf"   
profile::ntp::servicefile: "ntp.conf"
profile::ntp::package::present:  
  'ntp': 
'ensure': 'present'  
  'ntpdate': 
'ensure': 'present'  

. . . with a whole bunch more profile::$MODULE::$KEY entries for other profile 
modules following that. (We're making an extremely concerted effort to minimize 
the amount of data built into our modules, due to past experience with how much 
of a pain in the ass that becomes.)

What I would rather have is a profile directory in my hiera.yaml, where all the 
files there are loaded automatically by hiera, so I can have 
profile/logrotate.yaml with the logrotate keys, profile/ntp.yaml with ntp 
related keys, and so on down the line.  This would make it simpler to keep 
things clear between different modules when setting the assorted defaults.  

Unless there's a dead simple way to set a fact that will load a a yaml 
associated with each assigned class, which would make everything so much 
easier. . . 


-- 
Robert Davidson




-- 
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/1EE73329D6577F44A3C2FB0F7D4ACAE98CEE328F%40MBX-02.WIN.NOMINUM.COM.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Can I use the 'contain' function and relationship ordering?

2015-06-01 Thread Stefan Lasiewski
Hello Everyone,

I'm using Puppet 3.8 and I have a question about containment, anchoring and 
relationship ordering.

I am following the Beginner's Guide to Modules 

 
section on "Containment and Anchoring". The guide provides a containment 
example for a basic install/config/service pattern like this in init.pp :


anchor { 'module::begin': }
anchor { 'module::end' } 
 
Anchor['module::begin'] ->
  Class['module::install'] ->
  Class['module::config']  ->
  Class['module::service'] ->
Anchor['module::end']

>From what I understand, this advantage can keep the relationship ordering 
inside the main manifest, where the relationships are visible and obvious. 
This is a style that some folks prefer.

However, the 'Anchor' syntax seems a little verbose and archaic, and I read 
that I can also contain classes using the `contain` function, as of Puppet 
3.4 and later. So, something like this might work:

contain ( 'install', 'config', 'service')


My question: Is it possible to use the `contain` function and still use 
ordering arrows? For example, I'd like the `install` class to be called 
before the `config` class, and the `config` class to be called before the 
`service` class.

Thank you,

-= Stefan




 




 

-- 
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/1763d7f0-9f65-4ebb-8174-5e507eb652ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Stupid hiera.yaml wildcard question.

2015-06-01 Thread Philip Wigg
On 1 June 2015 at 21:12, Robert Davidson  wrote:
> Note: We're still running puppet 3.6.2 and hiera 1.3.
>
> What I would like to do is to have hiera load all yaml files inside a 
> directory - ie, have all the profile specific data split up into independent 
> files sitting inside a 'profile' directory, without having to tell hiera to 
> load them individually. This would purely be for ease of working with data 
> for each profile module, rather than having all data changes committed 
> against a single profile.yaml file.
>
> Is that a thing that can be done? I don't see a way to do it, but it seems so 
> staggeringly obvious a thing to want to do that I'm sure I'm missing 
> something.

I think what you're suggesting might have been rejected in the past
(i.e. a * wildcard in hiera.yaml):-

https://tickets.puppetlabs.com/browse/HI-120

Are you using a custom fact for your roles? Maybe something like the
hiera.yaml example is a better solution anyway?

http://rnelson0.com/2014/07/14/intro-to-roles-and-profiles-with-puppet-and-hiera/

Regards,
Phil.

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


Re: [Puppet Users] Stupid hiera.yaml wildcard question.

2015-06-01 Thread Christopher Wood
On Mon, Jun 01, 2015 at 08:12:33PM +, Robert Davidson wrote:
> Note: We're still running puppet 3.6.2 and hiera 1.3.
> 
> What I would like to do is to have hiera load all yaml files inside a 
> directory - ie, have all the profile specific data split up into independent 
> files sitting inside a 'profile' directory, without having to tell hiera to 
> load them individually. This would purely be for ease of working with data 
> for each profile module, rather than having all data changes committed 
> against a single profile.yaml file. 

I have never heard of such a thing, but you could probably scribble together 
your own hiera backend to do this. Or copy something from the net:

https://ask.puppetlabs.com/question/1149/using-wildcards-in-hierayaml/
https://ask.puppetlabs.com/question/11151/merging-multiple-files-with-hiera/

(I searched for (no quotes) "hiera multiple files". If you read those links 
there are always caveats.)

> Is that a thing that can be done? I don't see a way to do it, but it seems so 
> staggeringly obvious a thing to want to do that I'm sure I'm missing 
> something.

It sounds like more pain than it's worth, figuring out which hiera key to use 
in two dimensions of lookup instead of one. 

> 
> -- 
> Robert Davidson
> 
> 
> -- 
> 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/1EE73329D6577F44A3C2FB0F7D4ACAE98CEE3058%40MBX-02.WIN.NOMINUM.COM.
> 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/20150601204754.GA29623%40iniquitous.heresiarch.ca.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Stupid hiera.yaml wildcard question.

2015-06-01 Thread Robert Davidson
Note: We're still running puppet 3.6.2 and hiera 1.3.

What I would like to do is to have hiera load all yaml files inside a directory 
- ie, have all the profile specific data split up into independent files 
sitting inside a 'profile' directory, without having to tell hiera to load them 
individually. This would purely be for ease of working with data for each 
profile module, rather than having all data changes committed against a single 
profile.yaml file. 

Is that a thing that can be done? I don't see a way to do it, but it seems so 
staggeringly obvious a thing to want to do that I'm sure I'm missing something.

-- 
Robert Davidson


-- 
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/1EE73329D6577F44A3C2FB0F7D4ACAE98CEE3058%40MBX-02.WIN.NOMINUM.COM.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppetserver 2.0.0 and fileserver.conf counterpart?

2015-06-01 Thread Sergey Arlashin
Hi! 

I'm also wondering how I can configure fileserver parameters in puppetserver ?
Is webserver.conf a substitute for fileserver.conf now ? 

Thank you.

--
Best regards,
Sergey Arlashin




On Apr 30, 2015, at 12:40 PM, Stefan Wiederoder 
 wrote:

> I´m struggling with puppetserver 2.0.0 on RHEL7, how do I configure 
> puppetserver regarding the fileserver settings?
> 
> 
> 
> -- 
> 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/2d119b9e-7fe7-43b3-baef-ddedad426f55%40googlegroups.com.
> 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/0B81B2E3-1476-41EA-8A43-861C9CB8AFD4%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppetserver 2.0.0 and fileserver.conf counterpart?

2015-06-01 Thread Sergey Arlashin
Hi!

I'm also wondering how I can configure fileserver parameters in puppet server .

Is webserver.conf a substitute for fileserver.conf now ? 

Thank you.

--
Best regards,
Sergey Arlashin



On Apr 30, 2015, at 12:40 PM, Stefan Wiederoder 
 wrote:

> I´m struggling with puppetserver 2.0.0 on RHEL7, how do I configure 
> puppetserver regarding the fileserver settings?
> 
> 
> 
> -- 
> 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/2d119b9e-7fe7-43b3-baef-ddedad426f55%40googlegroups.com.
> 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/FF9EEB05-706B-4BA8-9D8D-96D5DF0D4B79%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


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

2015-06-01 Thread Henrik Lindberg

On 2015-28-05 1:52, Miguel Di Ciurcio Filho wrote:

On Wed, May 27, 2015 at 7:46 PM, Danny Roberts
 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.

Have not looked at the details, but I have noticed that order is 
sometimes not given within quotes. This means that if future parser is 
used, a totally different result /order is constructed. This because 
values like 055 is an octal value - you must quote all such values.


Have no idea if that is relevant or not for the problem at hand though.

Regards
- henrik

--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

--
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/mkhr5d%24ki9%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] String substituion in puppet template

2015-06-01 Thread Björn
Okay, I got it now.

<% if @ip_xforward != '' %>
<% if ip_xforward.is_a? Array -%>
<% ip_xforward.map do |value| -%>
<%= "\t\tSetEnvIf 
X-Forwarded-For ^(" + value.gsub('.', '\.') + ".*) AllowIP\n"  -%>
<% end -%>
<% else %>
<%= "  SetEnvIF X-Forwarded-For 
 ^(#{ip_xforward}) AllowIP" -%>
<% end -%>
<% end -%>

So a array of ip address in the manifests results in 
SetEnvIf X-Forwarded-For ^(13\.74\.8\.23.*) AllowIP
SetEnvIf X-Forwarded-For ^(5\.63\.23\.53.*) AllowIP



Thanks!

Regards,
Björn


Am Freitag, 22. Mai 2015 14:21:26 UTC+2 schrieb Henrik Lindberg:
>
> On 2015-22-05 11:08, Gabriel Filion wrote: 
> > On 20/05/15 09:04 AM, Björn wrote: 
> >> I tried it with regsubst, but without success: 
> >> | 
> >> <%ip_xforward.each do|name|-%><%="\t\tSetEnvIF X-Forwarded-For 
> >> ^(regsubst(#{name}, '\.','\\.')) AllowIP\n"%><%end-%> 
> >> | 
> > 
> > maybe you need to call the function outside of the string. e.g.: 
> > 
> > <%= "\t\tSetEnvIf X-Forwarded-For ^(" + regsubst(name, '\.','\\.') + ") 
> > AllowIP\n"%> 
> > 
>
> Note that the each method returns the original LHS not the string. Also, 
> the substitution inside the string is not code that gets evaluation, you 
> need to interpolate it using #{} around the expression, or do a concat. 
>
> If you want to transform each, you should use the map function instead 
> of each - then the result is an array of each value returned from the 
> block. 
>
> Regards 
> - henrik 
>
> -- 
>
> Visit my Blog "Puppet on the Edge" 
> http://puppet-on-the-edge.blogspot.se/ 
>
>

-- 
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/b32aa9ae-79a6-4480-9033-2ddcb981df63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Error on Puppet master : Could not retrieve selinux_current_mode: undefined method `each_line' for nil:NilClass

2015-06-01 Thread Prateek Malik
I am getting the following errors on puppet master:
Could not retrieve selinux_current_mode: undefined method `each_line' for 
nil:NilClass
Could not retrieve selinux_config_policy: undefined method `each_line' for 
nil:NilClass
Could not retrieve selinux_config_policy: undefined method `each_line' for 
nil:NilClass
Could not retrieve selinux_config_mode: undefined method `each_line' for 
nil:NilClass
I am not using SELinux and have verified it by checking the enforce file. 
Still I am getting this error.

I checked online and narrowed my search that it is somewhat related to 
facter. Still I am unable to find the cause of this error.
Can anyone of you please help me with 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/5dda38e9-c5aa-417c-89a0-fb2dd697240e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Any advise on this hiera stuff

2015-06-01 Thread Twan
Hi,

I need to resolv the folowing but have no clue how to accomplish it, can 
any of you shine a light?

Hiera:
session_managers:
  sm001.guest.lan:
  - agent01.guest.lan
  - agent02.guest.lan
  sm02.guest.lan
  - agent03.guest.lan
  - agent04.guest.lan


I need to get the following:
On session managers a list (comman seperated) of the agents
On each agent, the sessionmanager on a line in a configfile.

Please some advise

-- 
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/337a10b4-380c-496b-9b4e-b145434d879a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Facter throwing MySQL errors

2015-06-01 Thread Jonathan Gazeley
I'm still not convinced this is a broken fact. I ran it in --trace with 
"memoryfree" which definitely doesn't build a MySQL connection, and this 
is the output:


[jg4461@radius-jg4461 ~]$ facter -p --debug --trace memoryfree
Found no suitable resolves of 1 for ec2_metadata
value for ec2_metadata is still nil
Error loading fact /var/lib/puppet/lib/facter/warranty.rb: no such file 
to load -- facter/util/warranty
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 
`gem_original_require'

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/var/lib/puppet/lib/facter/warranty.rb:3
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `kernel_load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:115:in `load_file'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:49:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:76:in `fact'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:129:in `value'
/usr/lib/ruby/site_ruby/1.8/facter.rb:117:in `value'
/var/lib/puppet/lib/facter/virtualenv_version.rb:5
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `kernel_load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:115:in `load_file'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:49:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:76:in `fact'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:129:in `value'
/usr/lib/ruby/site_ruby/1.8/facter.rb:117:in `value'
/var/lib/puppet/lib/facter/dell_express_service_code.rb:4
/usr/lib/ruby/site_ruby/1.8/facter/util/resolution.rb:81:in `instance_eval'
/usr/lib/ruby/site_ruby/1.8/facter/util/resolution.rb:81:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/facter/util/fact.rb:68:in `define_resolution'
/usr/lib/ruby/site_ruby/1.8/facter/util/fact.rb:50:in `add'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:50:in `add'
/usr/lib/ruby/site_ruby/1.8/facter.rb:161:in `add'
/var/lib/puppet/lib/facter/dell_express_service_code.rb:1
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `kernel_load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:115:in `load_file'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:49:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:76:in `fact'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:129:in `value'
/usr/lib/ruby/site_ruby/1.8/facter.rb:117:in `value'
/usr/lib/ruby/site_ruby/1.8/facter/application.rb:37:in `run'
/usr/lib/ruby/site_ruby/1.8/facter/application.rb:35:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/application.rb:35:in `run'
/usr/bin/facter:20
value for pe_version is still nil
value for pe_version is still nil
ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
'/var/lib/mysql/mysql.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket 
'/var/lib/mysql/mysql.sock' (2)
Error loading fact /var/lib/puppet/lib/facter/portage.rb: no such file 
to load -- facter/util/portage
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 
`gem_original_require'

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/var/lib/puppet/lib/facter/portage.rb:1
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `kernel_load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:115:in `load_file'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:49:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:76:in `fact'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:129:in `value'
/usr/lib/ruby/site_ruby/1.8/facter.rb:117:in `value'
/var/lib/puppet/lib/facter/virtualenv_version.rb:5
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `load'
/usr/lib/ruby/site_ruby/1.8/facter/util/lo

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

2015-06-01 Thread asheepen
Hi all,

first thanks to all of you. At least I found a solution taking a bit from 
all the hints. This is ( one possible ) solution:

irb(main):001:0> require 'facter'
=> true
irb(main):002:0> require 'puppet'
=> true
irb(main):003:0> a = Facter.value(:userblweb)
=> nil
irb(main):004:0> Puppet.initialize_settings
=> "notice"
irb(main):005:0> a = Facter.value(:userblweb)
=> "1000\n"

As you can see, after invoking initialize_settings my custom fact seems to 
be in place / known to facter. Now I'll have a look how it works outside 
irb in real puppet master/agent environment.

Regards
Andreas

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.):
>
> ...
> 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/bec34b70-04ad-4774-9c1a-416e7b8d0e3d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.