Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
sofubi
ansible
Commits
030908b7
Commit
030908b7
authored
Nov 20, 2020
by
sofubi
⚓
Browse files
Changes nginx.yml taks to install certbot snap
Changes packages.yml task tin install snapd
parent
8b53f6a5
Pipeline
#12698
failed with stage
in 3 minutes and 59 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tasks/nginx.yml
View file @
030908b7
...
...
@@ -14,23 +14,34 @@
state
:
started
# from https://gist.github.com/mattiaslundberg/ba214a35060d3c8603e9b1ec8627d349
-
name
:
"
Download
certbot-auto
"
-
name
:
"
Prepare
snapd
for
certbot
installation
"
when
:
funkwhale_nginx_managed and funkwhale_letsencrypt_enabled
become
:
true
get_url
:
url
:
https://dl.eff.org/certbot-auto
dest
:
/usr/local/bin/certbot-auto
mode
:
0750
command
:
snap install core
-
name
:
"
Refresh
core
snap
before
installing
certbot"
when
:
funkwhwale_nginx_managed and funkwhale_letsencrypt_enabled
become
:
true
command
:
snap refresh core
-
name
:
"
Install
certbot
using
certbot-auto"
when
:
funkwhale_nginx_managed and funkwhale_letsencrypt_enabled
-
name
:
"
Install
certbot
snap"
when
:
funkwhwale_nginx_managed and funkwhale_letsencrypt_enabled
become
:
true
command
:
snap install --classic certbot
-
name
:
"
Link
certbot
snap
installation"
when
:
funkwhwale_nginx_managed and funkwhale_letsencrypt_enabled
become
:
true
command
:
ln -s /snap/bin/certbot /usr/bin/certbot
-
name
:
"
Link
certbot
snap
installation"
when
:
funkwhwale_nginx_managed and funkwhale_letsencrypt_enabled
become
:
true
command
:
certbot-auto --install-only -n -v
-
name
:
Create letsencrypt certificate
when
:
funkwhale_nginx_managed and funkwhale_letsencrypt_enabled and not funkwhale_letsencrypt_skip_cert
become
:
true
command
:
certbot
-auto
-v -n certonly --nginx -m {{ funkwhale_letsencrypt_email }} --agree-tos -d {{ funkwhale_hostname }} {{ funkwhale_letsencrypt_certbot_flags }}
command
:
certbot -v -n certonly --nginx -m {{ funkwhale_letsencrypt_email }} --agree-tos -d {{ funkwhale_hostname }} {{ funkwhale_letsencrypt_certbot_flags }}
args
:
creates
:
/etc/letsencrypt/live/{{ funkwhale_hostname }}
...
...
@@ -40,7 +51,7 @@
cron
:
name
:
funkwhale_letsencrypt_renewal
special_time
:
weekly
job
:
/usr/
local/
bin/certbot
-auto
-v -n certonly --nginx -m {{ funkwhale_letsencrypt_email }} --agree-tos -d {{ funkwhale_hostname }} {{ funkwhale_letsencrypt_certbot_flags }}
job
:
/usr/bin/certbot -v -n certonly --nginx -m {{ funkwhale_letsencrypt_email }} --agree-tos -d {{ funkwhale_hostname }} {{ funkwhale_letsencrypt_certbot_flags }}
-
name
:
"
Create
funkwhale
proxy
file"
when
:
funkwhale_nginx_managed
...
...
tasks/packages.yml
View file @
030908b7
...
...
@@ -25,3 +25,4 @@
-
"
curl"
-
"
dbus"
-
"
virtualenv"
-
"
snapd"
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment