Questions tagged [facter]

Facter is an independent, cross-platform Ruby library bundled with Puppet, designed to gather basic node information about the hardware and operating system

Developed by Puppet Labs to help with automated system configuration management. A puppet manifest declares the required state of the machine. Facter retrieves the current state, so that Puppet can work out what changes need to be made, and how.

The Facter gem can be used by any Ruby system, without the rest of Puppet.

117 questions
0
votes
1 answer

Puppet: all custom facts gets all results

I´m trying to work out a way in Puppet to get the current zpool capacity numbers for my FreeBSD storage servers, storing them in custom facts and to generate alert if capacity reaches a "too high" level. Closest match to my problem that I´ve found…
0
votes
1 answer

how to puppet and diff without fqdn?

I have one problem, that how to manage the agent-nodes with puppet? I'm using the openstack to auto generating the vms, and then puppet with several puppet-code in special pattern. eg. The system provision several vms, each vm has two attrs: fqdn:…
TtAQsDCurB
  • 61
  • 1
  • 3
0
votes
0 answers

How to add custom facters in Ruby

I have file text structured as follows key1,value1 I want to add these key values as facters in my host. I have splitted those key (configs[0]) , values (configs[1]). How to add those to facters using ruby. I have tried following code but not…
Malintha
  • 4,512
  • 9
  • 48
  • 82
0
votes
1 answer

Puppet : External facter json array iteration inside puppet template

I am sending data from puppet agent to master node. Here I use json array in my facters/facts.d/myData.json file. In master side I have a template. There I want to iterate this external fact json array. { "employees" : [ …
Malintha
  • 4,512
  • 9
  • 48
  • 82
0
votes
0 answers

Puppet : Use external facts inside templates

I have defined some key value pairs in /etc/facter/facts.d/value.txt file. I could use those keys inside my init.pp script and successfully for the values using: ${key1} I want to get those values inside my template file. I have used: <%= @key1…
Malintha
  • 4,512
  • 9
  • 48
  • 82
0
votes
1 answer

How can I write spec tests for puppet facts?

I have the following rb script which generate puppet facts according to the packages installed and which seems to be working ok in my puppet environment: begin pack = Facter::Core::Execution.execute('rpm -qa | grep ^ts') packages =…
dan
  • 101
  • 1
  • 4
  • 12
0
votes
1 answer

Using a Facter Fact within a fact for command execution

I am trying to write a custom facter module that incorporates a fact within a fact for the command via concatenation of the command string plus a facter fact variable: Facter.add("customfact") do setcode do $string_to_parse =…
amanda fouts
  • 347
  • 2
  • 10
0
votes
2 answers

mcollective mco facts command blank result output

I have install mcollective with activemq but when i run following command it ran successfully but result is blank, i want to see report output. [root@vsoslp01 tmp]# mco find vsopspss01 vsopsmgs01 [root@vsoslp01 tmp]# mco facts architecture Report…
Satish
  • 16,544
  • 29
  • 93
  • 149
0
votes
3 answers

puppet merge two variable in define

We have multiple sub-interface and multiple app running on own sub-interface IP so I am trying to use facter variables to iterate my loop using $name here are my interface in facter command output ipaddress_eth0_0 => 10.3.68.98 ipaddress_eth0_1 =>…
Satish
  • 16,544
  • 29
  • 93
  • 149
0
votes
3 answers

Puppet agent daemon not reading a facter fact (EC2, cloud-init)

I am using puppet to read a fact from facter, and based on that I apply a different configuration to my modules. Problem: the puppet agent isn't seeing this fact. Running puppet agent --test interactively works as expected. Even running it…
TL-Eugene
  • 304
  • 1
  • 2
  • 13
-1
votes
1 answer

Puppet Facter MAC to determine model

I'm trying to set up a Puppet module with an if statement and Facter. Something like: if $something-factor = macpro do THIS elsif $something factor = macair do THIS I just can't seem to find the Facter variable to do this.
Gabriel
  • 575
  • 2
  • 8
  • 20
-2
votes
2 answers

custom facter which can identify CentOS and Amazon Linux instances

Is there any facter variable available or I can create a custom facter variable to identify the CentOS and Amazon Instances? I want to install some utils on CentOS and Amazon Linux instances but not able to find a way to do that using puppet.
ramesh.mimit
  • 9,445
  • 4
  • 21
  • 23
1 2 3 4 5 6 7
8