| Puppet Version:7.9.0-1 Puppet Server Version:7.2.1-1 OS Name/Version:RHEL7.9 hostgroup variable passed from foreman is resolved correctly in classes using $::hostgroup but not resolving in hiera.yaml (%{::hostgroup}) Puppet lookup complains with the below error - Warning: Undefined variable '::hostgroup'; (file & line not available) With --explain , you can see that variable is not resolving. Hierarchy entry "Host Group Data" Path "/etc/puppetlabs/code/environments/production/hieradata/.yaml" Original path: "%{::hostgroup}.yaml" Path not found Desired Behavior: Variable should resolve correctly. Actual Behavior: [root@master06 bin]# puppet lookup puppet_agent::package_version --node node22 --environment raot Warning: Undefined variable '::hostgroup'; (file & line not available) — 6.24.0-1.el8 [root@master06 bin]# |