puppet-sudo
puppet-sudo copied to clipboard
Convert ERB templates to EPP
Pls assign me to this :)
Well.. it's harder than expected (as usual).. Main problem is epp() 2nd argument (parameters Hash).
We have 2 sets of templates here:
/etc/sudoerstemplates with slightly different parameter sets ($wheel_config is not present in Debian templates). This is more-or-less easy.- sudo::conf $template templates.. it's user-controlled, so I'm not sure how to deal with it. I'd personally not even introduce this parameter from the beginning, because it's Pandora box :) But as we have it open already, I guess, we need another
$template_epp(or$epp_template) parameter.. and immediate next question is how user can pass the parameters there?
Also sudo::defaults() function behaves differently when called from ERB vs EPP. When called from EPP it receives the Hash as it is instead of Array of Tuples. So, I guess, I'll rewrite it in Puppet DSL instead.