Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Lets Encrypt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ansible
Roles
Lets Encrypt
Commits
00251859
Commit
00251859
authored
6 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Further improve letsencrypt to run without stopping apache server while it's running
parent
ff72eb34
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tasks/cert_generate.yml
+7
-1
7 additions, 1 deletion
tasks/cert_generate.yml
tasks/renew.yml
+9
-2
9 additions, 2 deletions
tasks/renew.yml
templates/letsencrypt.ini
+2
-0
2 additions, 0 deletions
templates/letsencrypt.ini
with
18 additions
and
3 deletions
tasks/cert_generate.yml
+
7
−
1
View file @
00251859
...
...
@@ -18,9 +18,15 @@
jump
:
'
ACCEPT'
state
:
'
present'
-
name
:
"
Install
New
Cert"
-
name
:
"
Install
New
Cert
via
webroot"
shell
:
certbot certonly --expand --non-interactive --config /etc/letsencrypt/{{ cert.domain }}.ini --cert-name {{ cert.domain }} --webroot-path /var/www/html --webroot
ignore_errors
:
true
when
:
groups.proxyserver is not defined or inventory_hostname not in groups.proxyserver
-
name
:
"
Install
New
Cert
via
HaProxy"
shell
:
certbot certonly --expand --non-interactive --config /etc/letsencrypt/{{ cert.domain }}.ini --http-01-port {{ port }} --preferred-challenges http-01 --cert-name {{ cert.domain }}
ignore_errors
:
true
when
:
groups.proxyserver is defined and inventory_hostname in groups.proxyserver
-
name
:
"
Close
Port"
iptables
:
...
...
This diff is collapsed.
Click to expand it.
tasks/renew.yml
+
9
−
2
View file @
00251859
...
...
@@ -18,12 +18,19 @@
jump
:
'
ACCEPT'
state
:
'
present'
-
name
:
"
Renew
Existing
Certs"
#shell: certbot renew --non-interactive --http-01-port {{ port }} --preferred-challenges http-01
-
name
:
"
Renew
Existing
Certs
via
webroot"
shell
:
certbot renew --non-interactive --webroot-path /var/www/html --webroot
ignore_errors
:
true
register
:
renew_result
changed_when
:
"
'No
renewals
were
attempted.'
not
in
renew_result.stdout"
when
:
groups.proxyserver is not defined or inventory_hostname not in groups.proxyserver
-
name
:
"
Renew
Existing
Certs
via
HaProxy"
shell
:
certbot renew --non-interactive --http-01-port {{ port }} --preferred-challenges http-01
ignore_errors
:
true
register
:
renew_result
changed_when
:
"
'No
renewals
were
attempted.'
not
in
renew_result.stdout"
when
:
groups.proxyserver is defined and inventory_hostname in groups.proxyserver
-
name
:
"
Close
Port"
iptables
:
...
...
This diff is collapsed.
Click to expand it.
templates/letsencrypt.ini
+
2
−
0
View file @
00251859
...
...
@@ -2,7 +2,9 @@ email = {{ apache_server_admin|default('admin@paragon-es.de') }}
domains
=
{{ cert.domain }}{% for alias in cert.aliases|default([]) %}, {{ alias }}{% endfor %}{% for trusted_domain in cert.trusted_domains|default([]) %}, {{ trusted_domain }}{% endfor %}
text
=
True
{%
if
groups.proxyserver
is
defined
and
inventory_hostname
in
groups.proxyserver
%}
authenticator
=
standalone
{%
endif
%}
# standalone-supported-challenges = tls-sni-01
agree-tos
=
True
expand
=
True
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment