I looked for this for days now, and I'm quite depressed. We want to use Foreman as a monitoring and provisionnig tool. We would like to deactivate Foreman's ENC and use only Hiera. How could I manage that?
As to the why:
- my boss wants it like that.
- Foreman is not able to resolve a parameter coming from Hiera
Example:
define repo_file_manager ( $repository_url = "http://${yum_client::lib::repository_server}/repos/${name}/", $ensure = 'present', $gpgcheck = '0', $enable = '1') { $repoconfdir = '/etc/yum.repos.d' file { "${repoconfdir}/${name}.repo": ensure => $ensure, group => 'root', mode => '0644', owner => 'root', require => File['/etc/yum.repos.d'], content => template("yum_client/repofile.erb"), } }
${yum_client::lib::repository_server}
returns nil, but when I do hiera(yum_client::lib::repository_server)
, I get the correct result.