[root@vii-osc4-mgmt-001 ~]# cat /etc/profile.d/POD_prefix.sh
export FACTER_pod_prefix=vii-osc4
[root@vii-osc4-mgmt-001 ~]# env | grep FACTER_pod_prefix
FACTER_pod_prefix=vii-osc4
[root@vii-osc4-mgmt-001 ~]# facter pod_prefix
vii-osc4
# 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:
# ls -l /var/lib/hiera/svl-osc4.yaml
-rw-r--r--. 1 root root 49317 Jul 20 15:44 /var/lib/hiera/svl-osc4.yaml
And then I restarted pe-httpd like so ...
# systemctl restart pe-httpd
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/402bde62-1703-4e31-9f9b-35a0edbe34a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[root@vii-osc4-mgmt-001 ~]# facter pod_prefix
vii-osc4
Systemd services do not have access the normal environment variables that are present in yor shell.
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/56c96a63-c2fc-4470-8a18-7cc53f275ec9%40googlegroups.com.
Are you saying that my test is no good because it is using the environment from the shell?
--
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...@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.
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:
# pwd
/etc/facter/facts.d
# cat pod_prefix.txt
pod_prefix=vii-osc4