-
Notifications
You must be signed in to change notification settings - Fork 2
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 profile::core::letsencrypt #195
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
ae6a75b
add puppet/letsencrypt mod
jhoblitt 59e616c
add profile::core::letsencrypt
jhoblitt 9cc6e43
install python2-futures.noach
jhoblitt 3c316ef
set letsencrypt::email
jhoblitt 127f859
use letsencrypt staging server in dev site
jhoblitt 80675b7
include letsencrypt::plugin::dns_route53
jhoblitt e6663f8
inject letsncrypt::certonly dep on /root/.aws/credentials
jhoblitt 69b6329
add profile::core::letsencrypt usage example
jhoblitt 10422a8
add profile::core::letsencrypt::aws_credentials param
jhoblitt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# @summary Support for dns auth letsencrypt certs | ||
# | ||
# @example | ||
# class profile::core::perfsonar { | ||
# include profile::core::letsencrypt | ||
# include augeas # needed by perfsonar | ||
# | ||
# $fqdn = $facts['fqdn'] | ||
# $le_root = "/etc/letsencrypt/live/${fqdn}" | ||
# | ||
# letsencrypt::certonly { $fqdn: | ||
# plugin => 'dns-route53', | ||
# manage_cron => true, | ||
# } -> | ||
# class { '::perfsonar': | ||
# manage_apache => true, | ||
# remove_root_prompt => true, | ||
# ssl_cert => "${le_root}/cert.pem", | ||
# ssl_chain_file => "${le_root}/fullchain.pem", | ||
# ssl_key => "${le_root}/privkey.pem", | ||
# } | ||
# } | ||
# | ||
# @param certonly | ||
# Hash of `letsencrypt::certonly` defined types to create. | ||
# See: https://github.com/voxpupuli/puppet-letsencrypt/blob/master/manifests/certonly.pp | ||
# | ||
# @param aws_credentials | ||
# `.aws/credentials` format string for aws route53 credentials | ||
class profile::core::letsencrypt( | ||
Optional[Hash[String, Hash]] $certonly = undef, | ||
Optional[String] $aws_credentials = undef, | ||
) { | ||
include ::letsencrypt | ||
include ::letsencrypt::plugin::dns_route53 | ||
|
||
# XXX https://github.com/voxpupuli/puppet-letsencrypt/issues/230 | ||
ensure_packages(['python2-futures.noarch']) | ||
|
||
if ($certonly) { | ||
ensure_resources('letsencrypt::certonly', $certonly) | ||
} | ||
|
||
if ($aws_credentials) { | ||
file { | ||
'/root/.aws': | ||
ensure => directory, | ||
mode => '0700', | ||
backup => false, | ||
; | ||
'/root/.aws/credentials': | ||
ensure => file, | ||
mode => '0600', | ||
backup => false, | ||
content => $aws_credentials, | ||
; | ||
} | ||
|
||
# aws credentials required by dns_route53 plugin. | ||
File['/root/.aws/credentials'] -> Letsencrypt::Certonly<| |> | ||
hreinking marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 know is a better practice, but you plan to merge the "staging" server? Also, I thought the server was https://acme-v02.api.letsencrypt.org/directory
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.
Yes, this only applies to the dev site.