Issue #134: Snap install method.
parent
b96acd79ec
commit
0ba7078e8c
@ -0,0 +1,26 @@ |
|||||||
|
--- |
||||||
|
- name: Converge |
||||||
|
hosts: all |
||||||
|
become: true |
||||||
|
|
||||||
|
vars: |
||||||
|
certbot_install_method: 'snap' |
||||||
|
certbot_auto_renew_user: root |
||||||
|
|
||||||
|
pre_tasks: |
||||||
|
- name: Update apt cache. |
||||||
|
apt: update_cache=yes cache_valid_time=600 |
||||||
|
when: ansible_os_family == 'Debian' |
||||||
|
changed_when: false |
||||||
|
|
||||||
|
- name: Install cron (RedHat). |
||||||
|
yum: name=cronie state=present |
||||||
|
when: ansible_os_family == 'RedHat' |
||||||
|
|
||||||
|
- name: Install cron (Debian). |
||||||
|
apt: name=cron state=present |
||||||
|
when: ansible_os_family == 'Debian' |
||||||
|
|
||||||
|
roles: |
||||||
|
- geerlingguy.git |
||||||
|
- geerlingguy.certbot |
@ -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 |
Loading…
Reference in new issue