[Puppet Users] exporting custom facts to puppet agents

2013-10-13 Thread Sans
Dear all, I have a custom fact, that reads a file and then generate the values dynamically based on the file content. It's something like this: inFile = /home/admin/OSs.txt gos = {} if File.exist?(inFile) open(inFile, 'r').each do |line| next if line =~ /^\s*(#|$)/

[Puppet Users] exporting custom facts to the puppet agents

2013-10-13 Thread Sans
Dear all, I have a custom fact, that reads a file and then generate the values dynamically based on the file content. It's something like this: inFile = /home/admin/OSs.txt gos = {} if File.exist?(inFile) open(inFile, 'r').each do |line| next if line =~ /^\s*(#|$)/

[Puppet Users] LAMP stack with strange dependencies

2013-10-13 Thread Harm De Weirdt
Hello everyone. I've been toying around with puppet and something happened that seems strange to me. In site.pp I have the following: node default { # This is where you can declare classes for all nodes. # Example: # class { 'my_class': } # class { 'lamp': } package

Re: [Puppet Users] The handy Grail of Modules Standards

2013-10-13 Thread Alessandro Franceschi
An update on the stdmod works, which are going on slowly, but still moving. We are getting near to define a basic set of names for modules parameters. In particular there's a pull request where various discussions are ongoing on some basic naming patterns:

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-13 Thread Martin Alfke
Hi, On 13.10.2013, at 10:57, Sans r.santanu@gmail.com wrote: [...] The file is on the PuppetMaster. Hence the custom fact 'am_running_oss' is not available or empty when it runs on the agent. What are the options I have to make the custom facts(s) available on every single puppet

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-13 Thread Sans
Hi Martin, That doesn't actually work: I thought exactly the same in the beginning and already have the pluginsync enabled. I think, the reason being, the fact (am_running_oss.rb) file itself reads a text file and the file should be local. When it runs on the agent, the file (inFile =

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-13 Thread Sans
.well, unless I'm missing something here. -Santanu On Sunday, October 13, 2013 11:37:19 AM UTC+1, Sans wrote: Hi Martin, That doesn't actually work: I thought exactly the same in the beginning and already have the pluginsync enabled. I think, the reason being, the fact

[Puppet Users] Re: [Puppet-dev] Status of Data in modules

2013-10-13 Thread Alessandro Franceschi
Thanks for the update Eric, very useful to understand the ongoing works on data in modules. On Friday, October 11, 2013 9:01:19 PM UTC+2, Dan Bode wrote: On Fri, Oct 11, 2013 at 11:09 AM, Eric Sorenson eric.s...@puppetlabs.comjavascript: wrote: Thanks to everyone who kicked the tires

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-13 Thread Sans
To solve my copying file issue, I can certainly have a file{} type like this: file { 'running_oss': name= '/home/admin/OSs.txt', mode= '0644', content = file('/home/admin/OSs.txt'); } to copy the file from the Master to the agent, but as Retrieving plugin stuff

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-13 Thread Wolf Noble
Hi Santanu, custom facts should always do their work inside a setcode block. http://docs.puppetlabs.com/guides/custom_facts.html That has nothing to do with the issue at hand, however. If you need the file to exist before puppet's first run, have your provisioning system lay it down. Otherwise,

Re: [Puppet Users] LAMP stack with strange dependencies

2013-10-13 Thread Ramin K
On 10/13/2013 1:47 AM, Harm De Weirdt wrote: Hello everyone. I've been toying around with puppet and something happened that seems strange to me. In site.pp I have the following: node default { # This is where you can declare classes for all nodes. # Example:

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-13 Thread Sans
Hi Wolf, yes, the custom fact itself is working just fine, so that's not a prob at all. It's something like this: inFile = /home/admin/OSs.txt gos = {} if File.exist?(inFile) open(inFile, 'r').each do |line| next if line =~ /^\s*(#|$)/ parts =

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-13 Thread Cristian Falcas
Why not make your fact a function? This way it will only run on the master and you will use a return value in your manifests instead of facts. On Sun, Oct 13, 2013 at 10:42 PM, Sans r.santanu@gmail.com wrote: Hi Wolf, yes, the custom fact itself is working just fine, so that's not a

[Puppet Users] request for /proc/cpuinfo examples from aix, hpux, kfreebsd, non-x86 linux

2013-10-13 Thread Joshua Hoblitt
Hi Folks, I'm looking at tidying up the way /proc/cpuinfo is parsed in facter and the in tree fixture examples for any kernel other than linux i386/amd64 are pretty sparse. This is makes refactoring hairy as there are regexps and other assumptions baked into the code for these formats without

Re: [Puppet Users] exporting custom facts to puppet agents

2013-10-13 Thread Sans
Hi Cristian, That sounds a workable solution. Do you have any example handy; I've never used that before. -San On Sunday, October 13, 2013 9:04:09 PM UTC+1, Cristian Falcas wrote: Why not make your fact a function? This way it will only run on the master and you will use a return