Doh! The /etc/facter/facts.d/pod_prefix.txt file goes on the nodes NOT the puppet master. And it works!
On Tue, Jul 21, 2015 at 1:10 PM, Russell Cecala <red.cricket.b...@gmail.com> wrote: > OK I tried looking into the facter-dot-d way of setting a custom fact, but > it does not seem suitable for what I am trying to do. > I want some nodes to report the fact pod_prefix as 'vii-osc4' and I will > want other nodes to report pod_prefix as 'ix-xyz' so that my hiera.yaml > hierachy of ... > > root@svl-osc4-ppt-001 ~]# cat /etc/puppetlabs/puppet/hiera.yaml > > --- > > :backends: > > - yaml > > :hierarchy: > > - "%{::pod_prefix}" > > - defaults > > - "%{clientcert}" > > - "%{environment}" > > - global > > > :yaml: > > # datadir is empty here, so hiera uses its defaults: > > # - /var/lib/hiera on *nix > > # - %CommonAppData%\PuppetLabs\hiera\var on Windows > > # When specifying a datadir, make sure the directory exists. > > :datadir: > Will allow nodes with pod_prefix of vii-osc4 to get their class parameters > from the /var/lib/hiera/vii-osc4.yaml file while node that have pod_prefix > set to 'ix-xyz' will get their class parameters from from > /var/lib/hiera/ix-xyz.yaml ... I do not see how putting this file ... > > # pwd > > /etc/facter/facts.d > > # cat pod_prefix.txt > > pod_prefix=vii-osc4 > ... on my puppet master will achieve this. > > On Tue, Jul 21, 2015 at 11:57 AM, Russell Cecala < > red.cricket.b...@gmail.com> wrote: > >> Gotcha! Thanks >> >> On Tue, Jul 21, 2015 at 11:33 AM, Thomas Müller <tho...@chaschperli.ch> >> wrote: >> >>> >>> >>> >>> Are you saying that my test is no good because it is using the >>>> environment from the shell? >>>> >>> yes systemd does not send provide /etc/profile.d environment to its >>> services. >>> >>> just don't use FACTER_ env variables. Use facter-dot-d or a custom fact >>> in a puppet module. >>> >>> >>> >>> - Thomas >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Puppet Users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to puppet-users+unsubscr...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/puppet-users/3a75666d-b91b-4853-893a-61eebfb14b7e%40googlegroups.com >>> <https://groups.google.com/d/msgid/puppet-users/3a75666d-b91b-4853-893a-61eebfb14b7e%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAHu%2B3OyAON_e4c4PGwngxuCV_FmoLqyBvb-7ktnGG%3DZWpF9K6A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.