[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': } > > p

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: https://github.com/stdmod/puppet-modules

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

2013-10-13 Thread Martin Alfke
Hi, On 13.10.2013, at 10:57, Sans 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 agent? Thanks in > adva

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 = "/home/ad

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 (am_run

[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 > > > wrote: > >> >> Thanks to everyone who kicked the tires on the experimental da

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" st

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 = line.split(',

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 wrote: > Hi Wolf, > > yes, the custom fact itself is working just fine, so that's not a prob at > all. It's some

[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 any

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

[Puppet Users] Re: Warning: appears to have a negative number of dependencies

2013-10-13 Thread Rahul Khengare
Hi Yan, Can you provide details about your manifests. May be manifests helps us to find the solution to problem. Thanks and Regards, Rahul Khengare NTT DATA OSS Center, Pune, India. On Saturday, October 12, 2013 6:22:00 AM UTC+5:30, Yan Xiaofei wrote: > > Hello > > After add some packagelis

[Puppet Users] Managing /etc/hosts without using exported resources

2013-10-13 Thread Gonzalo Servat
Hi All, I am using Puppet 3.2.4 and I'd like Puppet to manage /etc/hosts for me and add "neighbouring hosts" only to /etc/hosts. These hosts are determined to be neighbours based on where they are (city/country). For example ($::city and $::country are custom facts): @@host { $::fqdn: ip

Re: [Puppet Users] LAMP stack with strange dependencies

2013-10-13 Thread Harm De Weirdt
Indeed, I should have paid more attention t the actual error. Thanks for the info. Harm On Sunday, October 13, 2013 9:18:37 PM UTC+2, Ramin K wrote: > > On 10/13/2013 1:47 AM, Harm De Weirdt wrote: > > Hello everyone. > > > > I've been toying around with puppet and something happened that se