Sha256: 139d4c37fbce354148a008958dfbbf932b5d9a750e9b9127d512698583c41505

Contents?: true

Size: 898 Bytes

Versions: 15

Compression:

Stored size: 898 Bytes

Contents

---
  - name: Install ca-certificates
    become: true
    apt:
      pkg: "{{item}}"
      state: present
    with_items:
      - ca-certificates
    
  - name: Install certbot-nginx
    become: true
    when: "'nginx' in role_names"
    apt:
      pkg: python3-certbot-nginx
      state: present

  - name: "Set certbot binary"
    set_fact:
      certbot_bin: "certbot"

  - name: "Check for certbot-auto"
    stat:
      path: /opt/certbot/certbot-auto
    register: certbot_auto_exists

  - name: "Remove certbot-auto"
    file:
      path: /opt/certbot/certbot-auto
      state: absent
    when: certbot_auto_exists.stat.exists

  - name: "Remove certbot-auto cron task"
    cron:
      name: Auto-renew SSL
      job: "{{certbot_bin}} renew --no-self-upgrade --nginx >> /var/log/cron.log 2>&1"
      hour: "0"
      minute: "33"
      state: absent
    when: certbot_auto_exists.stat.exists

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
subspace-3.0.12 ansible/roles/letsencrypt/tasks/modern.yml
subspace-3.0.11 ansible/roles/letsencrypt/tasks/modern.yml
subspace-3.0.10 ansible/roles/letsencrypt/tasks/modern.yml
subspace-3.0.9 ansible/roles/letsencrypt/tasks/modern.yml
subspace-3.0.6 ansible/roles/letsencrypt/tasks/modern.yml
subspace-3.0.5 ansible/roles/letsencrypt/tasks/modern.yml
subspace-3.0.4 ansible/roles/letsencrypt/tasks/modern.yml
subspace-3.0.3 ansible/roles/letsencrypt/tasks/modern.yml
subspace-3.0.2 ansible/roles/letsencrypt/tasks/modern.yml
subspace-3.0.0 ansible/roles/letsencrypt/tasks/modern.yml
subspace-2.5.10 ansible/roles/letsencrypt/tasks/modern.yml
subspace-3.0.0.rc1 ansible/roles/letsencrypt/tasks/modern.yml
subspace-2.5.9 ansible/roles/letsencrypt/tasks/modern.yml
subspace-2.5.8 ansible/roles/letsencrypt/tasks/modern.yml
subspace-2.5.7 ansible/roles/letsencrypt/tasks/modern.yml