aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roles/letsencrypt/tasks/certbot.yml
blob: f0a1ad6107c76880f65822cc45b55445d52ed060 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Instructions are from
#     https://certbot.eff.org/instructions?ws=nginx&os=snap&tab=wildcard

- name: Install Certbot
  become: true
  block:
    - name: Install snapd
      ansible.builtin.package:
        name: snapd
        state: present

    - name: Install Certbot
      community.general.snap:
        name: certbot
        state: present
        classic: true

    - name: Confirm plugin containment level
      ansible.builtin.command: snap set certbot trust-plugin-with-root=ok

    - name: Install Certbot DigitalOcean plugin
      community.general.snap:
        name: certbot-dns-digitalocean
        state: present

    - name: Create Certbot symlink in /usr/bin
      ansible.builtin.file:
        src: /snap/bin/certbot
        dest: /usr/bin/certbot
        state: link