aboutsummaryrefslogblamecommitdiffstatshomepage
path: root/roles/letsencrypt/tasks/certbot.yml
blob: 2eeeda5b60ecb41e23d804750184db5d3e6beb7c (plain) (tree)
1
2
3
4
5
6
7
8
9







                                                                        
                   

                                 


                             
                     

                      






                                                                         
                      





                                              
# 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.apt:
        name: snapd
        state: present
        install_recommends: false

    - 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