mirror of
https://github.com/geerlingguy/ansible-role-certbot.git
synced 2026-08-25 01:05:36 +02:00
Issue #134: Snap install method.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
---
|
||||
- name: Ensure snapd is installed.
|
||||
package:
|
||||
name: snapd
|
||||
state: present
|
||||
|
||||
- name: Ensure snapd is enabled.
|
||||
systemd:
|
||||
name: snapd.socket
|
||||
enabled: true
|
||||
|
||||
- name: Enable classic snap support.
|
||||
file:
|
||||
source: /var/lib/snapd/snap
|
||||
dest: /snap
|
||||
state: link
|
||||
|
||||
- name: Install certbot via snap.
|
||||
snap:
|
||||
name: certbot
|
||||
classic: true
|
||||
|
||||
- name: Symlink certbot into place.
|
||||
file:
|
||||
source: /snap/bin/certbot
|
||||
dest: /usr/bin/certbot
|
||||
state: link
|
||||
+5
-2
@@ -5,10 +5,13 @@
|
||||
when: ansible_os_family == 'RedHat'
|
||||
|
||||
- import_tasks: install-with-package.yml
|
||||
when: not certbot_install_from_source
|
||||
when: certbot_install_method == 'package'
|
||||
|
||||
- import_tasks: install-with-snap.yml
|
||||
when: certbot_install_method == 'snap'
|
||||
|
||||
- import_tasks: install-from-source.yml
|
||||
when: certbot_install_from_source
|
||||
when: certbot_install_method == 'source'
|
||||
|
||||
- include_tasks: create-cert-standalone.yml
|
||||
with_items: "{{ certbot_certs }}"
|
||||
|
||||
Reference in New Issue
Block a user