I thought I needed to double quote items that had interpolated variables but it turns out I don't need to which is good because I effectively can't due to .to_yaml not doing what I wanted it to do.
Added hunner/hiera to the Puppetfile and a manifest to use it instead of placing a hiera.yaml in the repo.