Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
haproxy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Eric Zillmann
haproxy
Commits
f7824318
Commit
f7824318
authored
8 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Improve letsencrypt renewal
parent
b711831c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tasks/letsencrypt.yml
+14
-4
14 additions, 4 deletions
tasks/letsencrypt.yml
tasks/main.yml
+2
-3
2 additions, 3 deletions
tasks/main.yml
with
16 additions
and
7 deletions
tasks/letsencrypt.yml
+
14
−
4
View file @
f7824318
...
...
@@ -8,9 +8,19 @@
register
:
cert_available
failed_when
:
false
#- name: "Stop HAProxy"
# service: name=haproxy state=stopped
-
block
:
-
name
:
"
Stop
HAProxy"
service
:
name='haproxy'
state='stopped'
-
name
:
"
Install
New
Cert"
shell
:
/opt/letsencrypt/letsencrypt-auto certonly -d {{ item.domain }} -d www.{{ item.domain }} --standalone --text --email {{ apache_server_admin|default('admin@paragon-es.de') }} --agree-tos --redirect
-
name
:
"
Start
HAProxy"
service
:
name='haproxy'
state='started'
-
name
:
"
Install
New
Cert"
shell
:
/opt/letsencrypt/letsencrypt-auto certonly -d {{ item.domain }} -d www.{{ item.domain }} --standalone --text --email {{ apache_server_admin|default('admin@paragon-es.de') }} --agree-tos --redirect
when
:
cert_available is defined and cert_available.stdout != filename
This diff is collapsed.
Click to expand it.
tasks/main.yml
+
2
−
3
View file @
f7824318
...
...
@@ -6,14 +6,13 @@
include
:
letsencrypt.yml
with_items
:
'
{{
proxy_certificates_letsencrypt|default([])
}}'
# Renewing certificates is only possible generelly, not individually.
-
name
:
"
Renew
Existing
Cert"
shell
:
/opt/letsencrypt/letsencrypt-auto renew
ignore_errors
:
true
include
:
'
../../letsencrypt/tasks/renew.yml'
-
name
:
"
Create
PEM
file
for
HaProxy"
shell
:
cat /etc/letsencrypt/live/{{ item.domain }}/fullchain.pem /etc/letsencrypt/live/{{ item.domain }}/privkey.pem > /etc/haproxy/certs/{{ item.domain }}.pem
with_items
:
'
{{
proxy_certificates_letsencrypt|default([])
}}'
notify
:
"
Proxy
|
Restart
HAProxy"
when
:
'
"letsencrypt"
not
in
excluded_roles'
...
...
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