Setting env_hash in hiera
Closed this issue · 1 comments
felipe1982 commented
profiles::security::sudo::keep_os_defaults: false
profiles::security::sudo::defaults_hash:
always_set_home: true
env_reset: false
requiretty: false
visiblepw: false
env_keeps:
- COLORS
- DISPLAY
[...]
and
class profiles::security::sudo (
$defaults_hash = hiera(profiles::security::sudo::defaults_hash),
$keep_os_defaults = hiera(profiles::security::sudo::keep_os_defaults),
$confs_hash = hiera(profiles::security::sudo::confs_hash),
){
class { '::sudo':
keep_os_defaults => $keep_os_defaults,
defaults_hash => $defaults_hash,
confs_hash => $confs_hash
}
gives
Defaults always_set_home
Defaults env_keeps = "COLORSDISPLAYHOSTNAMEHISTSIZEINPUTRCKDEDIRLS_COLORSMAILPS1PS2QTDIRUSERNAMELANGLC_ADDRESSLC_CTYPELC_COLLATELC_IDENTIFICATIONLC_MEASUREMENTLC_MESSAGESLC_MONETARYLC_NAMELC_NUMERICLC_PAPERLC_TELEPHONELC_TIMELC_ALLLANGUAGELINGUAS_XKB_CHARSETXAUTHORITY"
Defaults !env_reset
Defaults !requiretty
Defaults !visiblepw
how do I fix this no-spacing using hiera?
codylane commented
@felipe1982 - If I'm understanding your problem does this help?
https://github.com/justinclayton/puppet-module-sudo/blob/master/manifests/params.pp#L63