---
- name: Install letsencrypt
  apt:
    name: "{{ item }}"
    dpkg_options: 'force-confdef,force-confnew'
    update_cache: yes
  with_items:
    - letsencrypt

- name: Install certificate
  shell: "letsencrypt certonly --standalone -d {{ mail_domain }} -n --agree-tos -m letsencrypt@{{ relay_domain }}"