- name: Install the needed packages
  package: name={{item}} state=present
  with_items:
  - httpd
  - certbot

- name: Create directory for ACME challenge
  file: dest=/srv/web/acme-challenge state=directory owner=root group=root mode=755

- name: Allow httpd to see ACME challenge directory
  copy: src=acme-challenge.conf dest=/etc/httpd/conf.d/acme-challenge.conf

- name: Certbot renewal cron
  cron: name=certbot-renew special_time=monthly job="certbot renew"
