Questions tagged [facter]

38 questions
8
votes
1 answer

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] environment = development In order to view the environment…
quickshiftin
  • 2,025
  • 5
  • 27
  • 41
5
votes
3 answers

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, but there must be a better way that is more…
spuder
  • 1,695
  • 2
  • 25
  • 42
5
votes
2 answers

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 manifest I check if $::osfamily == 'Debian'. Sometimes…
Tomasz Olszewski
  • 868
  • 9
  • 20
4
votes
2 answers

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 ${variableOne} and ${variableTwo}":} When I run vagrant…
Eric Smalling
  • 183
  • 1
  • 8
4
votes
1 answer

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/hiera.yaml I have been trying to work in hiera to…
Wilshire
  • 538
  • 6
  • 19
4
votes
3 answers

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"=>"7.0.1406" } } What is the format to access os=>release=>major from…
chriscowley
  • 523
  • 4
  • 17
3
votes
3 answers

"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 following manifest in…
JoeNyland
  • 225
  • 1
  • 4
  • 12
3
votes
1 answer

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, I had setup a custom fact for environment to…
Cesar
  • 173
  • 6
3
votes
2 answers

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 on the puppet master, the plugins are not needed…
Zoredache
  • 128,755
  • 40
  • 271
  • 413
3
votes
1 answer

How to set the fqdn on a CentOS server?

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 machine, it returns the following information…
mimipc
  • 1,767
  • 2
  • 17
  • 27
3
votes
1 answer

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…
quickshiftin
  • 2,025
  • 5
  • 27
  • 41
3
votes
1 answer

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| { dostuff{"stuff:$user": user=>$user …
Kyo
  • 33
  • 3
2
votes
1 answer

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.*/ { $job_name = 'test' file { "/opt/$job_name": …
antimion
  • 61
  • 5
2
votes
2 answers

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: >facter os {"release"=>{"major"=>"6", "minor"=>"7",…
Swartz
  • 294
  • 5
  • 14
2
votes
2 answers

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 multiple directories for reading user information.…
Tim Brigham
  • 15,465
  • 7
  • 72
  • 113
1
2 3