Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [facter]

The tag has no usage guidance.

0
votes
1answer
14 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 ...
2
votes
1answer
178 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.*/ { $...
1
vote
1answer
644 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 ...
1
vote
1answer
210 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 ...
0
votes
2answers
274 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 ...
0
votes
0answers
84 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 ...
0
votes
2answers
537 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", "...
0
votes
0answers
447 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 ...
1
vote
1answer
232 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....
1
vote
1answer
504 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,...
1
vote
2answers
6k 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: &...
1
vote
1answer
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&...
1
vote
1answer
2k 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 ...
0
votes
1answer
230 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, ...
0
votes
1answer
213 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 ...
1
vote
1answer
296 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 ...
3
votes
3answers
720 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 ...
4
votes
2answers
1k 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 ...
4
votes
1answer
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/...
3
votes
1answer
409 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, ...
4
votes
3answers
8k 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"=&...
1
vote
1answer
1k 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 (...
2
votes
2answers
457 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 ...
2
votes
1answer
3k 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 ...
0
votes
2answers
200 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 ...
3
votes
2answers
239 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 ...
2
votes
1answer
93 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 ...
1
vote
2answers
5k 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/...
7
votes
1answer
6k 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] ...
3
votes
1answer
8k 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 ...
3
votes
1answer
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/...
5
votes
2answers
19k views

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

How would you use facter and puppet to determine if the OS is running Cent 6.x or Cent 5.x ? facter operatingsystemrelease 6.4 I only care about the major release (6) I've thought about using awk,...
3
votes
1answer
538 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| { ...
2
votes
2answers
2k 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. ...
5
votes
2answers
1k 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 ...
2
votes
0answers
268 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:...
0
votes
1answer
415 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 ...