Sha256: a13c30a7f68cb391aefe702c961715432d8ad842b2df68e6ef1ca03ba27738e6

Contents?: true

Size: 905 Bytes

Versions: 5

Compression:

Stored size: 905 Bytes

Contents

- name: Install letsencrypt
  command: bash -lc "git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt"
  args:
    creates: /opt/letsencrypt
  when: letsencrypt.enabled == true

- name: Get letsencrypt cert
  command: bash -lc "/opt/letsencrypt/letsencrypt-auto certonly --standalone --rsa-key-size 4096 --force-renew --agree-tos --email {{ letsencrypt.email }} --text --non-interactive -d {{ letsencrypt.hostname }}"
  args:
    creates: "/etc/letsencrypt/live/{{ letsencrypt.hostname }}/privkey.pem"
  when: letsencrypt.enabled == true

- name: Set cert to renew every monday at 2:30 am
  cron:
    name: Certbot renew
    weekday: 1
    hour: 2
    minute: 30
    job: /opt/letsencrypt/letsencrypt-auto renew --rsa-key-size 4096 --pre-hook "/usr/bin/monit stop nginx" --post-hook "/usr/bin/monit start nginx" >> /var/log/le-renew.log
    user: root
  when: letsencrypt.enabled == true

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
taperole-2.1.1 roles/letsencrypt/tasks/main.yml
taperole-2.1.0 roles/letsencrypt/tasks/main.yml
taperole-2.0.7 roles/letsencrypt/tasks/main.yml
taperole-2.0.6 roles/letsencrypt/tasks/main.yml
taperole-2.0.5 roles/letsencrypt/tasks/main.yml