# Class: profiles::puppet::encapic # # Manages the configuration for the encapic ENC client. The package itself is # installed through profiles::packages (pinned in hiera); this class owns the # config so the encapi endpoint can change without repackaging. class profiles::puppet::encapic ( Stdlib::HTTPUrl $encapi_url, Stdlib::AbsolutePath $config_dir = '/etc/encapic', String $config_name = 'encapic.conf', String $owner = 'root', String $group = 'root', ) { # The RPM ships this file as %config(noreplace), so puppet must write it only # once the package is present or the install overwrites it. file { $config_dir: ensure => directory, mode => '0755', owner => $owner, group => $group, require => Package['encapic'], } file { "${config_dir}/${config_name}": ensure => file, mode => '0644', owner => $owner, group => $group, content => "ENCAPI_URL=${encapi_url}\n", require => File[$config_dir], } }