rodjek / rspec-puppet

RSpec tests for your Puppet manifests
http://rspec-puppet.com
MIT License
364 stars 203 forks source link

Hiera can't interpolate facts #777

Open russellshackleford opened 4 years ago

russellshackleford commented 4 years ago

This is a duplicate of #427 which was closed 2 years ago. There are valid use cases for interpolating facter values in hiera to keep a separation of code and data while using the real hiera data as that can test not just code, but data.

My particular use is:

# This assumes the DHCP server is also the PXE server
dhcpd::pxeserver: "%{::networking.ip}"

The fact that right now it is just an assumption is exactly why it is in hiera as opposed to just doing a fact lookup in the manifest.