mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-26 22:31:20 +00:00
Fix ansible for Ubuntu 20.04 Focal (#856)
* Fix ansible for Ubuntu 20.04 Focal * Use proper version comparison * Changes based on feedback
This commit is contained in:
parent
3f87b55a52
commit
0350f4bbeb
1 changed files with 12 additions and 0 deletions
12
ansible/lemmy.yml
vendored
12
ansible/lemmy.yml
vendored
|
@ -11,6 +11,7 @@
|
|||
when: lemmy_base_dir is not defined
|
||||
|
||||
- name: install python for Ansible
|
||||
# python2-minimal instead of python-minimal for ubuntu 20.04 and up
|
||||
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal python-setuptools)
|
||||
args:
|
||||
executable: /bin/bash
|
||||
|
@ -27,7 +28,18 @@
|
|||
- 'docker-compose'
|
||||
- 'docker.io'
|
||||
- 'certbot'
|
||||
|
||||
- name: install certbot-nginx on ubuntu < 20
|
||||
apt:
|
||||
pkg:
|
||||
- 'python-certbot-nginx'
|
||||
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version|version_compare('20.04', '<')
|
||||
|
||||
- name: install certbot-nginx on ubuntu > 20
|
||||
apt:
|
||||
pkg:
|
||||
- 'python3-certbot-nginx'
|
||||
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version|version_compare('20.04', '>=')
|
||||
|
||||
- name: request initial letsencrypt certificate
|
||||
command: certbot certonly --nginx --agree-tos -d '{{ domain }}' -m '{{ letsencrypt_contact_email }}'
|
||||
|
|
Loading…
Reference in a new issue