Skip to main content

Questions tagged [facter]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
138 views

Puppetserver unable to retrieve facts from nodes

When I perform puppet lookup fqdn --node <AGENT-CERT-NAME> --explain, I get the following error: Error: Could not run: No facts available for target node: agent.foo.lan My puppet agent already ...
cd4user's user avatar
0 votes
1 answer
1k views

Getting error AnsibleUndefinedVariable: 'facter_ipaddress_eth1' when running ansible playbook

Getting one big error stacktrace of ansible variable not found exception ansible.errors.AnsibleUndefinedVariable: 'facter_ipaddress_eth1' while I am runing ansible play book. the value that gets set ...
Ciasto piekarz's user avatar
0 votes
2 answers
2k views

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 ...
AndreasKralj's user avatar
2 votes
1 answer
2k views

how i do use puppet variable in facter custom facts

how i can inherit variable from puppet manifest in facter custom fact? in this case $job_name varible. I want use same custom fact with different envs. if $facts['hostname'] =~ /.*name.*/ { $...
antimion's user avatar
1 vote
2 answers
2k views

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 ...
me2017's user avatar
  • 31
1 vote
1 answer
467 views

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 ...
Ryan's user avatar
  • 11
0 votes
2 answers
546 views

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 ...
Philip Kirkbride's user avatar
0 votes
0 answers
159 views

What is a good way of retrieving/caching external facts using facter?

All of our servers have attributes that we store in a database and I'd like to make these attributes available locally on each server for use by Puppet. I don't want facter to query the database each ...
wsaxton's user avatar
  • 195
0 votes
2 answers
1k views

How to access facter GCE metadata

Facter contains GCE (Google Compute Engine) metadata details: $ facter | grep gce gce => {"instance"=>{"attributes"=>{}, "description"=>"", "disks"=>[{"deviceName"=>"srvpup01", "...
user1737246's user avatar
0 votes
0 answers
817 views

Notify value of variable that holds a nested fact - Puppet4

I am trying to understand what the difference is between the following: $major_release = $::facts['os']['release']['major'] $selinux_is_enabled = $::facts['os']['selinux']['enabled'] If I put in my ...
moley's user avatar
  • 1
1 vote
1 answer
544 views

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....
spoovy's user avatar
  • 356
1 vote
1 answer
680 views

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,...
user2363318's user avatar
2 votes
2 answers
9k views

Extract nested hash facts from puppet's facter command-line tool. How?

This might be obvious. However, after searching through facter's help, puppetlab's website, and Google I am still unable to figure out how to retrieve a nested facter fact . For example, I can do: &...
Swartz's user avatar
  • 304
1 vote
1 answer
2k views

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_<factname&...
Otheus's user avatar
  • 483
1 vote
1 answer
4k views

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 ...
030's user avatar
  • 6,045
0 votes
1 answer
281 views

Puppet: Pass facter value to class (sensu puppet module)

Trying to set a custom subscription to get remediator.rb working in the sensu module in puppet. class sensuJenkinsMasterClient { class { 'sensu': purge_config => true, ...
user2363318's user avatar
0 votes
1 answer
450 views

ec2_metadata fact not updating

I have added a "role" value to my instance metadata (I'm running on Openstack). I see it in curl http://169.254.169.254/openstack/latest/meta_data.json, but it is not appearing in the ec2_metadata ...
chriscowley's user avatar
1 vote
1 answer
501 views

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 ...
JoeNyland's user avatar
  • 229
3 votes
3 answers
903 views

"Unsupported osfamily: Linux" when trying to install Apache using Puppet

I'm trying to setup a simple Puppet setup on AWS EC2 using the latest Amazon Linux AMI. I've followed through the install guide for RHEL and have a puppetmasterd daemon running. When apply the ...
JoeNyland's user avatar
  • 229
4 votes
2 answers
2k views

Why aren't my puppet variables getting assigned by Vagrant's puppet.facter options?

Given that the following is config'd in my Vagrantfile: puppet.facter = { 'variableOne' => 'one', 'variableTwo' => 'two' } ... and the following is in the manifest: notify{ "Got here with ...
Eric Smalling's user avatar
4 votes
1 answer
3k views

Trouble using hiera in masterless setup and getting values set for classes

I am running a masterless puppet setup that applies the puppet changes in the following manner. puppet apply /tmp/puppet/manifests/site.pp --modulepath=/tmp/puppet/modules --hiera_config=/tmp/puppet/...
Wilshire's user avatar
  • 538
3 votes
1 answer
657 views

Puppet directory environments and the $environment variable

Like many (I hope), I am preparing for Puppet 4 by separating out my manifests into environments. I intend on having 3 separate environments: qa, staging, prod. In setting up the manifests initially, ...
Cesar's user avatar
  • 173
4 votes
3 answers
9k views

Access arrays/hashes in facter 2 facts

In facter 2 you can now have arrays/hashes as facts. For example: os => { "name"=>"CentOS", "family"=>"RedHat", "release"=>{ "major"=>"7", "minor"=>"0", "full"=&...
chriscowley's user avatar
1 vote
1 answer
2k views

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 (...
tommics's user avatar
  • 111
2 votes
2 answers
655 views

Puppet - determine if another host is reachable?

Is there any ready way / custom fact / etc to be able to have Puppet respond differently if a given host and port isn't available from the managed system? For example I have some products that use ...
Tim Brigham's user avatar
  • 15.6k
2 votes
1 answer
4k views

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 ...
user3684494's user avatar
0 votes
2 answers
247 views

Hiera datatypes wont load in Puppet

I have spent a couple of days on this, followed the instructions on http://downloads.puppetlabs.com/docs/puppetmanual.pdf and even the Puppet Training Advanced Puppet manual. When I run a test ...
Cole Shores's user avatar
3 votes
2 answers
684 views

Filter puppet pluginsync

Is there a method to filter which plugins are being syncd? I have a few new modules downloaded from the forge (puppetboard,puppetdb,python). These modules include plugins, they are also only needed ...
Zoredache's user avatar
  • 133k
2 votes
1 answer
188 views

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 ...
Kostis's user avatar
  • 21
1 vote
2 answers
8k views

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/...
Tim Brigham's user avatar
  • 15.6k
8 votes
1 answer
9k views

Determine / set Puppet environment

I'm trying to determine what Puppet thinks the environment is on my agent nodes. Per the documentation I've configured the agent's environment in /etc/puppet/puppet.conf as such [agent] ...
quickshiftin's user avatar
  • 2,215
3 votes
1 answer
9k views

How to set the fqdn on a CentOS server? [duplicate]

I set my hostname in the /etc/sysconfig/network file to host.example.com HOSTNAME=host.example.com Fyi, I then issued a reboot on the machine. I have a problem with Puppet: when I run Facter on this ...
mimipc's user avatar
  • 2,189
3 votes
1 answer
3k views

Most appropriate place for custom Puppet facts - RHEL

I'm not much of a Ruby guy, but found how to list the Ruby load path. Here's what it looks like for me $ ruby -e 'puts $:' /usr/lib/ruby/site_ruby/1.8 /usr/lib64/ruby/site_ruby/1.8 /usr/lib64/ruby/...
quickshiftin's user avatar
  • 2,215
5 votes
3 answers
28k views

Puppet & Facter - how to determine if running CentOS 6 or CentOS 5

How would you use facter and puppet to determine if the OS is running CentOS 6.x or CentOS 5.x ? facter operatingsystemrelease 6.4 I only care about the major release (6) I've thought about using ...
spuder's user avatar
  • 1,745
3 votes
1 answer
884 views

Puppet: Enumerating all users within a group

Is there any way to enumerate an array of all users within a group within Puppet, either as a fact or something so I can do something like this? $users = enumusers('wheel') each($users) |$user| { ...
Kyo's user avatar
  • 33
2 votes
2 answers
3k views

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. ...
Luke404's user avatar
  • 6,008
5 votes
2 answers
2k views

Puppet sometimes can't find standard facts like osfamily

Quick brief - for testing purpose, I installed puppet agent on 5 nodes (Debian Squeeze + puppet 2.7.20-1puppetlabs1), and puppet master on 1 server (same version). On puppetmaster side in every ...
Tomasz Olszewski's user avatar
2 votes
0 answers
298 views

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:...
Kyle Brandt's user avatar
  • 85.1k
0 votes
1 answer
435 views

puppet on amazon ec2: could not change hostname

I'm running ec2 debian instance and trying to get puppet working on it. I'd like my hostnames to be something more readable, so I've changed /etc/hostname, run /etc/init.d/hostname.sh start and I can ...
rvs's user avatar
  • 4,205