Issue #134: Snap install method.

This commit is contained in:
Jeff Geerling
2021-01-19 10:54:42 -06:00
parent b96acd79ec
commit 0ba7078e8c
7 changed files with 77 additions and 10 deletions
+27
View File
@@ -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
View File
@@ -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 }}"