mirror of
https://github.com/geerlingguy/ansible-role-certbot.git
synced 2025-04-19 17:01:37 +02:00
Add epel repository for snap install method
Remove the old cerbot package
This commit is contained in:
parent
00927c9aff
commit
a6a9b7cf95
@ -45,4 +45,3 @@ certbot_dir: /opt/certbot
|
||||
# no-self-upgrade
|
||||
# pre-hook = systemctl stop httpd
|
||||
# post-hook = systemctl stop httpd
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
- name: Add renew options to cli.ini file
|
||||
copy:
|
||||
path: /etc/letsencrypt/cli.ini
|
||||
content: {{ certbot_cli_options }}
|
||||
content: "{{ certbot_cli_options }}"
|
||||
when: certbot_cli_options is defined
|
||||
|
||||
- name: Generate new certificate if one doesn't exist.
|
||||
|
@ -1,4 +1,10 @@
|
||||
---
|
||||
- name: Ensure EPEL repository.
|
||||
package:
|
||||
name: epel-release
|
||||
state: present
|
||||
when: ansible_os_family == "RedHat"
|
||||
|
||||
- name: Ensure snapd is installed.
|
||||
package:
|
||||
name: snapd
|
||||
@ -7,7 +13,7 @@
|
||||
|
||||
- name: Ensure snapd is enabled.
|
||||
systemd:
|
||||
name: snapd.socket
|
||||
name: snapd
|
||||
enabled: true
|
||||
|
||||
- name: Enable classic snap support.
|
||||
@ -22,6 +28,11 @@
|
||||
failed_when: false
|
||||
when: snapd_install is changed
|
||||
|
||||
- name: Remove old certbot packages.
|
||||
package:
|
||||
name: "{{ certbot_package }}"
|
||||
state: absent
|
||||
|
||||
- name: Install certbot via snap.
|
||||
snap:
|
||||
name: certbot
|
||||
|
@ -6,3 +6,4 @@
|
||||
minute: "{{ certbot_auto_renew_minute }}"
|
||||
hour: "{{ certbot_auto_renew_hour }}"
|
||||
user: "{{ certbot_auto_renew_user }}"
|
||||
when: certbot_install_method == 'package' or certbot_install_method == 'source'
|
||||
|
Loading…
x
Reference in New Issue
Block a user