Johan Finnved
2009-Oct-20 15:26 UTC
[Puppet Users] List of puppet builtin variables apart from those from facter
Is there a list of builtin variables that get addad to thos from facter. I have found $server and $servername and $environment in examples from the puppet documentation but I would like a comprehensive list and a way to dump all values. I know that I can add custom facts, but I prefer looking for builtins to avoid reinventing the wheel. /Johan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
James Turnbull
2009-Oct-20 21:54 UTC
[Puppet Users] Re: List of puppet builtin variables apart from those from facter
2009/10/21 Johan Finnved <Johan.Finnved@sterikkom.se>:> > Is there a list of builtin variables that get addad to thos from facter. > > I have found $server and $servername and $environment in examples from the puppet > documentation but I would like a comprehensive list and a way to dump all values. >Good idea - this should really be added to the FAQ too. Regards James Turnbull -- Author of: * Pro Linux Systems Administration (http://tinyurl.com/linuxadmin) * Pulling Strings with Puppet (http://tinyurl.com/pupbook) * Pro Nagios 2.0 (http://tinyurl.com/pronagios) * Hardening Linux (http://tinyurl.com/hardeninglinux) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
nothings_absolute
2009-Oct-20 21:54 UTC
[Puppet Users] Re: List of puppet builtin variables apart from those from facter
You can look in the yaml files on the puppet master to get a list and examples of each variable. I am not sure where these are on your system (depends on how it is installed), but you should have one for each host within /var/??? and probably inside a "yaml" subdirectory. Here is an example of one of my clients (Note: I have quite a few custom facts for interfaces, etc. so you probably won''t have those): more /var/opt/dhw/puppetmd/yaml/facts/fakeserver.domain.name --- !ruby/object:Puppet::Node::Facts expiration: 2009-10-08 17:32:00.575151 -06:00 name: fakeserver values: kernel: SunOS netmask: 255.255.255.0 ipaddress_vnet0_3: 10.10.1.53 network_vnet0_2: 10.10.1.0 operatingsystemrelease: "5.10" fqdn: fakeserver.domain.name network_vnet0_3: 10.10.1.0 netmask_lo0: 255.0.0.0 uniqueid: 84f9e03a ipaddress: 10.10.1.51 is_virtual: "false" virtual: physical netmask_lo0_1: 255.0.0.0 clientversion: 0.25.0 ps: ps -ef netmask_lo0_2: 255.0.0.0 ipaddress_vnet0: 10.10.1.51 hardwaremodel: sun4v rubysitedir: /opt/dhw/lib/ruby/site_ruby/1.8 kernelrelease: "5.10" network_vnet0: 10.10.1.0 domain: domain.name netmask_lo0_3: 255.0.0.0 ? !ruby/sym _timestamp : Thu Oct 08 17:02:00 -0600 2009 id: root timezone: MDT interfaces: lo0,lo0_1,lo0_2,lo0_3,vnet0,vnet0_1,vnet0_2,vnet0_3 macaddress_vnet0: 0:14:4f:fb:d9:cc ipaddress_lo0_1: 127.0.0.1 hardwareisa: sparc network_lo0: 127.0.0.0 kernelversion: Generic_141414-07 netmask_vnet0_1: 255.255.255.0 path: /usr/sbin:/usr/bin:/usr/ccs/bin:/opt/SUNWldm/bin:/opt/smuser/ webagent/bin:/sbin ipaddress_lo0_2: 127.0.0.1 network_lo0_1: 127.0.0.0 ipaddress_lo0: 127.0.0.1 ipaddress_lo0_3: 127.0.0.1 hostname: fakeserver network_lo0_2: 127.0.0.0 uptime: 2 day netmask_vnet0_2: 255.255.255.0 puppetversion: 0.25.0 environment: prod netmask_vnet0_3: 255.255.255.0 operatingsystem: Solaris sshrsakey: KEywillbehereofcourse network_lo0_3: 127.0.0.0 macaddress: 0:14:4f:fb:d9:cc On Oct 20, 9:26 am, Johan Finnved <Johan.Finn...@sterikkom.se> wrote:> Is there a list of builtin variables that get addad to thos from facter. > > I have found $server and $servername and $environment in examples from the puppet > documentation but I would like a comprehensive list and a way to dump all values. > > I know that I can add custom facts, but I prefer looking for builtins to avoid reinventing the wheel. > /Johan--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
James Turnbull
2009-Oct-20 22:01 UTC
[Puppet Users] Re: List of puppet builtin variables apart from those from facter
2009/10/21 nothings_absolute <soren.morton@gmail.com>:> > > You can look in the yaml files on the puppet master to get a list > and examples of each variable. I am not sure where these are on your > system (depends on how it is installed), but you should have one for > each host within /var/??? and probably inside a "yaml" subdirectory. > Here is an example of one of my clients (Note: I have quite a few > custom facts for interfaces, etc. so you probably won''t have those): > >That only lists Facter and custom facts - it doesn''t list the internal variables that Puppet can set. Regards James Turnbull -- Author of: * Pro Linux Systems Administration (http://tinyurl.com/linuxadmin) * Pulling Strings with Puppet (http://tinyurl.com/pupbook) * Pro Nagios 2.0 (http://tinyurl.com/pronagios) * Hardening Linux (http://tinyurl.com/hardeninglinux) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
nothings_absolute
2009-Oct-20 23:04 UTC
[Puppet Users] Re: List of puppet builtin variables apart from those from facter
I guess I never noticed that the other variables were missing from that file! I guess I can''t help out here. On Oct 20, 4:01 pm, James Turnbull <ja...@lovedthanlost.net> wrote:> 2009/10/21 nothings_absolute <soren.mor...@gmail.com>: > > > > > You can look in the yaml files on the puppet master to get a list > > and examples of each variable. I am not sure where these are on your > > system (depends on how it is installed), but you should have one for > > each host within /var/??? and probably inside a "yaml" subdirectory. > > Here is an example of one of my clients (Note: I have quite a few > > custom facts for interfaces, etc. so you probably won''t have those): > > That only lists Facter and custom facts - it doesn''t list the internal > variables that Puppet can set. > > Regards > > James Turnbull > > -- > Author of: > * Pro Linux Systems Administration (http://tinyurl.com/linuxadmin) > * Pulling Strings with Puppet (http://tinyurl.com/pupbook) > * Pro Nagios 2.0 (http://tinyurl.com/pronagios) > * Hardening Linux (http://tinyurl.com/hardeninglinux)--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Luke Kanies
2009-Oct-21 05:13 UTC
[Puppet Users] Re: List of puppet builtin variables apart from those from facter
On Oct 20, 2009, at 8:26 AM, Johan Finnved wrote:> > Is there a list of builtin variables that get addad to thos from > facter. > > I have found $server and $servername and $environment in examples > from the puppet > documentation but I would like a comprehensive list and a way to > dump all values. > > I know that I can add custom facts, but I prefer looking for > builtins to avoid reinventing the wheel.In looking at the code (lib/puppet/indirector/catalog/compiler.rb), I see servername, serverip, and serverversion. I''m pretty sure that''s it. Environment should be from the client, but not from Facter so I guess it''s not obvious. -- The world is round; it has no point. -- Adrienne E. Gusoff --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
James Turnbull
2009-Oct-21 10:21 UTC
[Puppet Users] Re: List of puppet builtin variables apart from those from facter
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Luke Kanies wrote:> On Oct 20, 2009, at 8:26 AM, Johan Finnved wrote: > >> Is there a list of builtin variables that get addad to thos from >> facter. >> >> I have found $server and $servername and $environment in examples >> from the puppet >> documentation but I would like a comprehensive list and a way to >> dump all values. >> >> I know that I can add custom facts, but I prefer looking for >> builtins to avoid reinventing the wheel. > > In looking at the code (lib/puppet/indirector/catalog/compiler.rb), I > see servername, serverip, and serverversion. I''m pretty sure that''s > it. Environment should be from the client, but not from Facter so I > guess it''s not obvious. >Added to: http://reductivelabs.com/trac/puppet/wiki/FrequentlyAskedQuestions#are-there-variables-available-other-than-those-provided-by-facter Regards James Turnbull - -- Author of: * Pro Linux Systems Administration (http://tinyurl.com/linuxadmin) * Pulling Strings with Puppet (http://tinyurl.com/pupbook) * Pro Nagios 2.0 (http://tinyurl.com/pronagios) * Hardening Linux (http://tinyurl.com/hardeninglinux) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEVAwUBSt7gwCFa/lDkFHAyAQJdkwgA3XMhs6lTzbZx5tG+wC9kBQqqNzQbfYdC HADbRAkOMz5IObIXtJ6tY85bwB1JhabkA9XfHpvDtZT1ByoPimAoKrc6BqzQhhHc qdF0bOEgordE/NwB5+6C6vOoptiuHFh6Kxs3lzzTiQaFg+KjVk359E5BTxgGAwCT NVotYOruUH7lJ5BK1gdSU+0IxnSqDm9KcgwkTNNv/I8Amss54C1mhAfYVbUXXQsq 9TBdrXlmIrDrL9F0358wElhAKTi8vb1HvwpR4o3DeYyA8QRT9B3778ZfgpvQnnxx 3V7dBISCHIfmMKYa52OcMIXrXKA+W54vlDj/sHCVBBKEJ0G0256HVA==kaBd -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---