Playbooks to a new Lilik
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
636 B

  1. - name: install certbot
  2. apt:
  3. name: "{{ item }}"
  4. state: present
  5. update_cache: yes
  6. cache_valid_time: 3600
  7. with_items:
  8. - certbot
  9. - sendmail-bin
  10. - cron
  11. - name: request certificate
  12. command: certbot certonly -a standalone --agree-tos --email roots@lists.lilik.it --preferred-challenges http -d {{ server_fqdn }} -d www.{{ server_fqdn }} -n
  13. args:
  14. creates: /etc/letsencrypt/live/{{ server_fqdn }}/cert.pem
  15. # - name: add certbot cron
  16. # cron:
  17. # name: "certbot cron"
  18. # minute: "30"
  19. # hour: "2"
  20. # job: '/usr/bin/certbot renew -n --renew-hook "/bin/systemctl reload {{ webserver_name }}"'