added loopia method
This commit is contained in:
@ -1,11 +1,10 @@
|
||||
# install and configure certbot
|
||||
class certbot(
|
||||
String[1] $package,
|
||||
) {
|
||||
class certbot inherits certbot::params {
|
||||
|
||||
package {
|
||||
$package:
|
||||
ensure => present;
|
||||
'certbot':
|
||||
ensure => present,
|
||||
name => $certbot::params::package;
|
||||
}
|
||||
|
||||
}
|
||||
|
25
manifests/loopia.pp
Normal file
25
manifests/loopia.pp
Normal file
@ -0,0 +1,25 @@
|
||||
# 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":
|
||||
content => inline_epp("[default]\n<% \$params.each |key,val| { %><%= \$key %> = <%= \$val %>\n<% } %>\n", {
|
||||
'params' => {
|
||||
'url' => $api_url,
|
||||
'username' => $user,
|
||||
'passowrd' => unwrap($password),
|
||||
} }),
|
||||
show_diff => false,
|
||||
mode => '0400';
|
||||
}
|
||||
}
|
8
manifests/params.pp
Normal file
8
manifests/params.pp
Normal file
@ -0,0 +1,8 @@
|
||||
# parameters for certbot
|
||||
class certbot::params(
|
||||
String[1] $package,
|
||||
String[1] $bin_dir,
|
||||
String[1] $etc_dir,
|
||||
String[1] $certbot_bin,
|
||||
) {
|
||||
}
|
Reference in New Issue
Block a user