You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
742 B
38 lines
742 B
---
|
|
- name: Ensure snapd is installed.
|
|
package:
|
|
name: snapd
|
|
state: present
|
|
register: snapd_install
|
|
|
|
- name: Ensure snapd is enabled.
|
|
systemd:
|
|
name: snapd.socket
|
|
enabled: true
|
|
|
|
- name: Enable classic snap support.
|
|
file:
|
|
src: /var/lib/snapd/snap
|
|
dest: /snap
|
|
state: link
|
|
|
|
- name: Update snap after install.
|
|
shell: snap install core; snap refresh core
|
|
changed_when: true
|
|
failed_when: false
|
|
when: snapd_install is changed
|
|
|
|
- name: Install certbot via snap.
|
|
snap:
|
|
name: certbot
|
|
classic: true
|
|
|
|
- name: Symlink certbot into place.
|
|
file:
|
|
src: /snap/bin/certbot
|
|
dest: /usr/bin/certbot
|
|
state: link
|
|
|
|
- name: Set Certbot script variable.
|
|
set_fact:
|
|
certbot_script: /usr/bin/certbot
|
|
|