Questions tagged [facter]

39 questions
2
votes
1 answer

Facter - custom fact, returns empty data set when invoked by Puppet agent

According to this puppet labs article, I can create custom facts from shell scripts. I have created a bash script that returns a single fact, it is packaged in a modules facts.d directory. The module is included on the target system via an ENC…
user3684494
  • 23
  • 1
  • 3
2
votes
1 answer

Exclude ifaces from network related facters

I am looking for a way to exclude ifaces from the macaddress and the interfaces facter in order to make puppet run faster on certain hosts. These facts are built-in as far as I understand and I would like to make this happen without patching the…
Kostis
  • 21
  • 1
2
votes
2 answers

Puppet facts: should we use lsbdistid or operatingsystem?

With current versions of Puppet and Facter I get the same information in the lsbdistid and operatingsystem facts - I don't look at osfamily because on Gentoo Linux it reports a generic "Linux" string. When using that piece of information in Puppet…
Luke404
  • 5,826
  • 4
  • 47
  • 58
2
votes
0 answers

Clean up old Domain Name for Nodes in Puppet Dashboard

I changed the domain name for some servers, i.e. web1.foo.com to web1.baz.com. In my Puppet Dashboard, I see two entries now for the same server. I can destroy a node with something like rake node:fast_del name=web1.foo.com which seems to work (the…
Kyle Brandt
  • 83,619
  • 74
  • 305
  • 448
1
vote
1 answer

puppet: fact in manifest with dot

I'm using puppet 4.10.9 with facter 3.6.8. I have a question(s) regarding the use of facts in a manifest that I'll ask in a simple form, and a more complex form. First, the simple question. On an agent I can see the following addresses: facter…
me2017
  • 31
  • 1
  • 4
1
vote
1 answer

Modify puppet nodes.pp with regex based on network (facter) subnet coverage - needs peer review

For the puppet experts out there, I am trying to modify my node.pp based on the facter network. Example, I would like to have subnets 10.10.10.0 through 10.10.10.255 and 192.168.2.0 network to get the following puppet modules. In my nodes.pp does…
Ryan
  • 11
  • 1
1
vote
1 answer

Blank value in custom puppet fact

I know that the following custom fact matches the string I want, as if I add a 'puts' or 'print' ahead of the $1 it prints the correct string. But as show the fact returns nothing. A blank. Facter.add(:myhost) do confine :kernel => "Linux" …
spoovy
  • 354
  • 4
  • 15
1
vote
1 answer

Facter (2.4.4) sets ipaddress to docker0 and not the ethernet interface (CentOS7)

Is there a way to fix this? Can I change the interfaces order? I have a lot of puppet modules that use $::ipaddress, works fine on CentOS 6 with docker but no on 7 interfaces => docker0,eno16780032,lo ipaddress => 172.17.42.1 ipaddress_docker0 =>…
user2363318
  • 361
  • 1
  • 3
  • 11
1
vote
1 answer

Facter: Custom-fact-script "was parsed but returned an empty data set"

For facter/puppet, I installed a one-line shell script. Several, actually. On subsequent runs, and with facter -p, I see the following output: Fact file /etc/facter/facts.d/system_facts_.sh was parsed but returned an empty data set If I…
Otheus
  • 439
  • 3
  • 12
1
vote
1 answer

Facter does not show custom Puppet facts

facter does not show the custom facts while Puppetboard does. According to this source the paramater -p is required to show all facts including the custom once. I have tried it but the outcome seems to be identical to the outcome of facter. I tried…
030
  • 5,901
  • 13
  • 68
  • 110
1
vote
1 answer

Can't install Facter 1.7.0 on Amazon Linux using PuppetLabs Yum repositories

I've installed Puppet using the setup guide but it seems I'm only able to install Puppet packages from the amzn-* repos, even though I have installed the PuppetLabs EL6 Yum repository using the instructions provided by…
JoeNyland
  • 225
  • 1
  • 4
  • 12
1
vote
1 answer

external fact not available at very first puppet run

Introduction: We are using puppet to configure the nodes via a custom fact which is then referenced in hiera. The fact can either reside in the golden image in /etc/facter/fact.d/ or via pluginsync (makes no difference, tested both) Versions: dpkg…
tommics
  • 111
  • 1
  • 11
1
vote
2 answers

Null / blank values on puppet facts

How can I quickly and easily state that a null / blank value is OK on a fact within puppet? When assembling a custom fact I'm doing something like the following: /puppet/production/modules/hosts/lib/facter Facter.add(:hostslocal) do setcode do …
Tim Brigham
  • 15,545
  • 10
  • 75
  • 115
0
votes
2 answers

How to use custom facts with rspec Puppet

Is there a way I can use a custom fact while using rspec? My module works fine and the custom fact exists and works as intended when I do a puppet run on my agent, but when I try to use the same fact in rspec I get the following…
AndreasKralj
  • 331
  • 1
  • 6
  • 16
0
votes
2 answers

Use Puppetdb for ENC variable?

I'm reading through the Puppet Documentation on adding a custom fact. Most of the information seems related to making module that runs on the agent. In my case I just want a simple environment variable that I could set from the master for each…
Philip Kirkbride
  • 279
  • 2
  • 10
  • 30