-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add certbot-dns-ovh plugin support #195
base: master
Are you sure you want to change the base?
Changes from 1 commit
5fa826a
accaa4b
1175fcc
6858d7b
ebafaaf
584f525
837a6c9
dec410b
4f72803
a496736
780ebec
de788f5
c81c410
7b809d3
ab69094
4a687e2
d974790
faf8f9a
4a7ff77
c3a43cb
7b295cf
07e1d55
2a3fe69
d57a798
d48ccbb
c3f53e2
8fd5300
c8f9f60
dcb0a12
1b09d8e
70e097f
6488357
9705a11
6f0faca
ef86ad2
d7392da
3e4f86e
d4ed5a8
4b2842d
a51b3b1
53b8ae3
5976b4e
b996e6c
da899e0
55c4ab4
d9d7e94
56b636f
e6ba89b
ec0d0f5
cbf92e3
ba8fff9
7519fc6
1ba9341
eccdbe3
eaa8050
a29bb84
77fba52
9ce7c89
4834332
aeffa57
e4edf1d
76b300a
3d3d62b
c16fe95
c18cac1
eba8147
f9e346e
fe14295
e12fb11
6cde54f
13fe0b7
5a6cb1a
ecffac4
e7ff0ed
201022d
d1afcca
f36088e
02d6a82
1d204a0
cc40ee9
42d82ec
67ae204
110473c
6f3ecf5
805f91d
2138e4f
80466a5
d23b242
4bc934b
eea9eb5
62327f0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -0,0 +1,59 @@ | ||||
# == Class: letsencrypt::plugin::dns_ovh | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you format this using puppet-strings style? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it's done here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's fine here. A separate PR to convert the rest of the module would be appreciated though :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, next week I will probably have some time to do it ! |
||||
# | ||||
# This class installs and configures the Let's Encrypt dns-ovh plugin. | ||||
# https://certbot-dns-ovh.readthedocs.io | ||||
# | ||||
# === Parameters: | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is no longer needed with puppet-strings.
Suggested change
|
||||
# | ||||
# [*endpoint*] | ||||
# Target OVH DNS endpoint. | ||||
# [*application_key*] | ||||
# OVH application key. | ||||
# [*application_secret*] | ||||
# DNS OVH application secret. | ||||
# [*consumer_key*] | ||||
# DNS OVH consumer key. | ||||
# [*manage_package*] | ||||
# Manage the plugin package. | ||||
# [*package_name*] | ||||
# The name of the package to install when $manage_package is true. | ||||
# [*config_dir*] | ||||
# The path to the configuration directory. | ||||
# | ||||
class letsencrypt::plugin::dns_ovh ( | ||||
Enum['ovh-eu', 'ovh-ca'] $endpoint, | ||||
String[1] $application_key, | ||||
String[1] $application_secret, | ||||
String[1] $consumer_key, | ||||
Integer $propagation_seconds = $letsencrypt::dns_ovh_propagation_seconds, | ||||
Stdlib::Absolutepath $config_dir = $letsencrypt::config_dir, | ||||
Boolean $manage_package = $letsencrypt::dns_ovh_manage_package, | ||||
String $package_name = $letsencrypt::dns_ovh_package_name, | ||||
) { | ||||
|
||||
if $manage_package { | ||||
package { $package_name: | ||||
ensure => installed, | ||||
} | ||||
} | ||||
|
||||
$ini_vars = { | ||||
dns_ovh_endpoint => $endpoint, | ||||
dns_ovh_application_key => $application_key, | ||||
dns_ovh_application_secret => $application_secret, | ||||
dns_ovh_consumer_key => $consumer_key, | ||||
dns_ovh_propagation_seconds => $propagation_seconds, | ||||
} | ||||
|
||||
file { "${config_dir}/dns-ovh.ini": | ||||
ensure => file, | ||||
owner => 'root', | ||||
group => 'root', | ||||
mode => '0400', | ||||
content => epp('letsencrypt/ini.epp', { | ||||
vars => { '' => $ini_vars }, | ||||
}), | ||||
require => Class['letsencrypt'], | ||||
} | ||||
|
||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
type Letsencrypt::Plugin = Enum['apache', 'standalone', 'webroot', 'nginx', 'dns-route53', 'dns-google', 'dns-cloudflare', 'dns-rfc2136'] | ||
type Letsencrypt::Plugin = Enum['apache', 'standalone', 'webroot', 'nginx', 'dns-route53', 'dns-google', 'dns-cloudflare', 'dns-rfc2136', 'dns-ovh'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the plugin declare a
$config_file
variable? Can be inside the body of the class. That way you don't rely on these two matching but can statically check it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know exactly what you mean. Can you give me more details ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant something like (very shortened):
Then you can use it here:
"--dns-ovh-credentials ${letsencrypt::plugin::dns_ovh::config_file}",
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I changed $config_dir by $config_file in this PR