Re: [Puppet Users] Re: custom facts

2018-04-26 Thread Michael Di Domenico
On Thu, Apr 26, 2018 at 8:58 AM, jcbollinger wrote: > On Wednesday, April 25, 2018 at 12:05:18 PM UTC-5, Michael Di Domenico > wrote: >> >> yes, that is true. i want both facter and puppet to be able to find >> my custom facts without having to specify an environment variable. > > But you're chas

Re: [Puppet Users] Re: custom facts

2018-04-26 Thread jcbollinger
On Wednesday, April 25, 2018 at 12:05:18 PM UTC-5, Michael Di Domenico wrote: > yes, that is true. i want both facter and puppet to be able to find > my custom facts without having to specify an environment variable. > But you're chasing the wrong objective. You should not be using facte

Re: [Puppet Users] Re: custom facts

2018-04-25 Thread Michael Di Domenico
so i finally figured out a method, though i'm not gonna lie it's pretty hacky based on this page https://puppet.com/docs/facter/3.7/custom_facts.html Using the Ruby load path Facter searches all directories in the Ruby $LOAD_PATH variable for subdirectories named facter, and loads all Ruby files

Re: [Puppet Users] Re: custom facts

2018-04-25 Thread R.I.Pienaar
On Wed, 25 Apr 2018, at 19:05, Michael Di Domenico wrote: > >> > > >> > Perhaps something like this then, though that answer is old, in theory > >> > it > >> > should probably work for new Puppet: > >> > > >> > https://ask.puppet.com/question/4645/puppet-apply-and-pluginsync/ > >> > > >> > >> In

Re: [Puppet Users] Re: custom facts

2018-04-25 Thread Michael Di Domenico
>> > >> > Perhaps something like this then, though that answer is old, in theory >> > it >> > should probably work for new Puppet: >> > >> > https://ask.puppet.com/question/4645/puppet-apply-and-pluginsync/ >> > >> >> In recent Puppet with puppet apply it automatically finds facts in your >> module

Re: [Puppet Users] Re: custom facts

2018-04-25 Thread Luke Bigum
On Wednesday, 25 April 2018 16:58:10 UTC+1, R.I. Pienaar wrote: > > > > On Wed, 25 Apr 2018, at 17:52, Luke Bigum wrote: > > On Wednesday, 25 April 2018 15:18:13 UTC+1, Michael Di Domenico wrote: > > > > > > On Wed, Apr 25, 2018 at 10:14 AM, Luke Bigum > > > wrote: > > > > On Wednesday, 25 Apr

Re: [Puppet Users] Re: custom facts

2018-04-25 Thread R.I.Pienaar
On Wed, 25 Apr 2018, at 17:52, Luke Bigum wrote: > On Wednesday, 25 April 2018 15:18:13 UTC+1, Michael Di Domenico wrote: > > > > On Wed, Apr 25, 2018 at 10:14 AM, Luke Bigum > > wrote: > > > On Wednesday, 25 April 2018 15:01:00 UTC+1, Michael Di Domenico wrote: > > >> > > >> in the past i'd

Re: [Puppet Users] Re: custom facts

2018-04-25 Thread Luke Bigum
On Wednesday, 25 April 2018 15:18:13 UTC+1, Michael Di Domenico wrote: > > On Wed, Apr 25, 2018 at 10:14 AM, Luke Bigum > wrote: > > On Wednesday, 25 April 2018 15:01:00 UTC+1, Michael Di Domenico wrote: > >> > >> in the past i'd copy my ruby facts into > >> /usr/share/ruby/vendor_ruby_facter

Re: [Puppet Users] Re: custom facts

2018-04-25 Thread Michael Di Domenico
On Wed, Apr 25, 2018 at 10:14 AM, Luke Bigum wrote: > On Wednesday, 25 April 2018 15:01:00 UTC+1, Michael Di Domenico wrote: >> >> in the past i'd copy my ruby facts into >> /usr/share/ruby/vendor_ruby_facter (which probably wasnt right) > > > No... That's definitely not right :-) Puppet has had

Re: [Puppet Users] Re: custom facts sensitive to spaces

2015-09-09 Thread Vince Skahan
On Wednesday, September 9, 2015 at 8:27:42 AM UTC-7, Christopher Wood wrote: > There's a big "should" question here, maybe the desired behaviour needs to > be nailed down before that's a bug? > > For instance, whitespace before/after the "=" could be, according to > functionality I've seen: >

Re: [Puppet Users] Re: custom facts sensitive to spaces

2015-09-09 Thread Christopher Wood
On Wed, Sep 09, 2015 at 12:01:54AM -0700, Josh Cooper wrote: (SNIP) >I think you're running into >https://tickets.puppetlabs.com/browse/FACT-1050 >Josh  There's a big "should" question here, maybe the desired behaviour needs to be nailed down before that's a bug? For instance, whit

Re: [Puppet Users] Re: Custom facts and environments

2014-09-24 Thread Garrett Honeycutt
On 9/24/14 9:34 AM, jcbollinger wrote: > > > On Tuesday, September 23, 2014 7:30:40 AM UTC-5, JonY wrote: > > I'm attempting to make the jump to directory-based environments and > am curious about what to do with custom facts. > > In my current config I've tried putting custom facts

Re: [Puppet Users] Re: Custom facts and hyphens

2012-06-21 Thread jcbollinger
On Wednesday, June 20, 2012 8:02:26 PM UTC-5, Steph wrote: > > I've not given it too much thought but I do have sympathy for argument > that divergence of (some of) Puppet's logical representations and their > labels from what's extant on the system reduces clarity and could > introduce error.

Re: [Puppet Users] Re: Custom facts and hyphens

2012-06-20 Thread Steph Gosling
Hi, On Wed, 20 Jun 2012 15:02:43 -0700 (PDT) Nick Fagerlund wrote: > What R.I. said. Hyphens in variable names and class names are a no-no, > although they kinda work in some versions of Puppet. Use underscores > instead. > > (Why are hyphens a problem? Well, partly because you can subtract

Re: [Puppet Users] Re: Custom facts question on windows 2008 R2

2012-05-14 Thread Marco Parra D.
Hi Nan: On 10-05-2012 20:22, Nan Liu wrote: On Thu, May 10, 2012 at 1:08 PM, mparrad wrote: Hi guys, I realized that If I make the file udp_status.rb and I put on D:\Program Files (x86)\Puppet Labs\Puppet\facter\lib\facter, that's where I installed puppet from the MSI file, and I use the Power

Re: [Puppet Users] Re: Custom facts question on windows 2008 R2

2012-05-11 Thread Marco Parra D.
Hi Jeff, On 11-05-2012 0:08, Jeff McCune wrote: On Thu, May 10, 2012 at 1:08 PM, mparrad > wrote: Hi guys, I realized that If I make the file udp_status.rb and I put on D:\Program Files (x86)\Puppet Labs\Puppet\facter\lib\facter, that's where I install

Re: [Puppet Users] Re: Custom facts question on windows 2008 R2

2012-05-10 Thread Jeff McCune
On Thu, May 10, 2012 at 1:08 PM, mparrad wrote: > Hi guys, I realized that If I make the file udp_status.rb and I put on > D:\Program Files (x86)\Puppet Labs\Puppet\facter\lib\facter, that's where I > installed puppet from the MSI file, and I use the Powershell script that I > made, I got the val

Re: [Puppet Users] Re: Custom facts question on windows 2008 R2

2012-05-10 Thread Nan Liu
On Thu, May 10, 2012 at 1:08 PM, mparrad wrote: > Hi guys, I realized that If I make the file udp_status.rb and I put on > D:\Program Files (x86)\Puppet Labs\Puppet\facter\lib\facter, that's where I > installed puppet from the MSI file, and I use the Powershell script that I > made, I got the valu

Re: [Puppet Users] Re: Custom Facts

2011-09-03 Thread R.I.Pienaar
- Original Message - > Btw, Rip or anyone, any suggestion on how to sort alphabetically the > scope variables so that the generated yaml doesn't change at (almost) > every puppet run? > > content => inline_template("<%= scope.to_hash.reject { |k,v| k.to_s > =~ /(uptime_seconds|timestamp

Re: [Puppet Users] Re: Custom facts for a puppetmasterless environment

2010-04-09 Thread Thomas A. McGonagle
I also like to embed facts with bash logic using bash startup files in /etc/profile.d/puppet.sh The puppet labs FAQ has a write up on it. Can I access environmental variables with Facter? Not directly no but Facter has a special types of facts that can be set from environment variables. Any envir