FAQ
You can also use the puppetlabs stdlib module which provides an easy
ad-hoc way of defining arbitrary facts on a system using text files in
/etc/facter/facts.d/

more info: https://puppetlabs.com/blog/module-of-the-week-puppetlabsstdlib-puppetlabs-standard-library-part-3

Many facts are best discovered pragmatically, but something are just
arbitrary which is where you want soemthing like this. For example we
have custom facts that pragmatically how the serial console of a
server should be setup based on what hardware and connections are
discovered, but use facts.d on workstatons we mange so users can self
select a la cart configurations suchas if they want NFS automounted
and certain other optional configuration packages.

-Jon

On Mon, Mar 11, 2013 at 9:43 AM, Stefan Goethals wrote:
Facts automatically get distributed to all nodes with pluginsync.
You need to write them in such a way that they will only create the fact on
the nodes that need it.

Stefan - Zipkid - Goethals

On Mon, Mar 11, 2013 at 1:31 PM, vioilly wrote:

I have written a custom puppet fact using a ruby script. It is very simple
- it just adds a string to a fact. However I have written a module but it
appears to me that the custom fact has been applied to all my machines
without me specifying any node definitions. When I run a puppet agent --test
--noop, I see the custom fact appear in /var/lib/puppet/lib/facter.

Info: Loading facts in /var/lib/puppet/lib/facter/addfacter.rb

I checked my nodes by running facter and it doesn't appear, unless I run
facter -p

I only want my custom fact to run on a specific node via a definition


My question is, do custom facts scripts run by default regardless of any
node definitions? If not, what am I doing wrong?


Many thanks - Oli


--
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+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 4 | next ›
Discussion Overview
grouppuppet-users @
categoriespuppet
postedMar 11, '13 at 12:32p
activeMar 11, '13 at 4:47p
posts4
users3
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase