puppet-certbot/manifests/loopia.pp

26 lines
866 B
ObjectPascal
Raw Permalink Normal View History

2020-12-02 13:54:33 +01:00
# use loopiaapi for dns challange using certbot
class certbot::loopia (
String[1] $api_url,
String[1] $user,
Sensitive[String[1]] $password,
) inherits certbot::params {
file {
"${certbot::params::bin_dir}/acme-auth-loopia.py":
source => "puppet:///modules/${module_name}/acme-auth-loopia.py",
mode => '0750';
"${certbot::params::bin_dir}/acme-cleanup-loopia.py":
source => "puppet:///modules/${module_name}/acme-cleanup-loopia.py",
mode => '0750';
"${certbot::params::etc_dir}/loopiaapi.ini":
2020-12-02 14:02:35 +01:00
content => inline_epp("[default]\n<% \$params.each |\$key,\$val| { %><%= \$key %> = <%= \$val %>\n<% } %>\n", {
2020-12-02 13:54:33 +01:00
'params' => {
'url' => $api_url,
'username' => $user,
2020-12-02 14:07:12 +01:00
'password' => unwrap($password),
2020-12-02 13:54:33 +01:00
} }),
show_diff => false,
mode => '0400';
}
}