Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
envsetup
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor 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
mediaserver
envsetup
Commits
2a27b91a
Commit
2a27b91a
authored
4 years ago
by
Nicolas KAROLAK
Browse files
Options
Downloads
Patches
Plain Diff
syntax update
parent
c112d9c8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
roles/letsencrypt/tasks/main.yml
+21
-20
21 additions, 20 deletions
roles/letsencrypt/tasks/main.yml
with
21 additions
and
20 deletions
roles/letsencrypt/tasks/main.yml
+
21
−
20
View file @
2a27b91a
...
...
@@ -5,17 +5,16 @@
force_apt_get
:
true
install_recommends
:
false
name
:
certbot
state
:
present
-
name
:
get all server_name values
when
:
letsencrypt_domains == []
changed_when
:
false
register
:
letsencryt_nginx_output
shell
:
|
set -o pipefail
nginx -T 2>&1 | grep -v localhost | grep -P '^\s+server_name\s+.*;$' | sed -r 's/\s+server_name\s+(.*);/\1/' | uniq
args
:
shell
:
executable
:
/bin/bash
changed_when
:
false
cmd
:
|
set -o pipefail
nginx -T 2>&1 | grep -v localhost | grep -P '^\s+server_name\s+.*;$' | sed -r 's/\s+server_name\s+(.*);/\1/' | uniq
-
name
:
save result as list
when
:
letsencrypt_domains == []
...
...
@@ -66,13 +65,14 @@
-
letsencrypt_save_list is changed
register
:
letsencrypt_dry_run
ignore_errors
:
true
command
:
|
certbot certonly \
--dry-run \
-n --agree-tos -m {{ letsencrypt_email }} \
--webroot -w {{ letsencrypt_webroot }} \
--expand \
-d {{ letsencrypt_domains | join(',') }}
command
:
cmd
:
|
certbot certonly \
--dry-run \
-n --agree-tos -m {{ letsencrypt_email }} \
--webroot -w {{ letsencrypt_webroot }} \
--expand \
-d {{ letsencrypt_domains | join(',') }}
-
name
:
remove domains list file in case of failure
when
:
letsencrypt_dry_run is failed
...
...
@@ -90,13 +90,14 @@
-
letsencrypt_domains != []
-
letsencrypt_save_list is changed
-
letsencrypt_dry_run is succeeded
command
:
|
certbot certonly \
{% if letsencrypt_testing %}--staging{% endif %} \
-n --agree-tos -m {{ letsencrypt_email }} \
--webroot -w {{ letsencrypt_webroot }} \
--expand \
-d {{ letsencrypt_domains | join(',') }}
command
:
cmd
:
|
certbot certonly \
{% if letsencrypt_testing %}--staging{% endif %} \
-n --agree-tos -m {{ letsencrypt_email }} \
--webroot -w {{ letsencrypt_webroot }} \
--expand \
-d {{ letsencrypt_domains | join(',') }}
-
name
:
update nginx certificate configuration
when
:
...
...
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