roles/nginx/tasks/certbot.yaml
author Luke Hoersten <luke@hoersten.org>
Wed, 05 Sep 2018 16:42:56 -0500
changeset 62 63586cf10d46
parent 61 2dd82d9e2103
permissions -rw-r--r--
Added more config variables to pleroma.

---

# https://certbot.eff.org/lets-encrypt/ubuntuxenial-nginx

- name: add certbot (letsencrypt) repo
  become: yes
  apt_repository: repo="ppa:certbot/certbot"

- name: install nginx packages
  become: yes
  apt: name="python-certbot-nginx"
  notify: restart nginx

- name: install certbot in nginx
  become: yes
  command: "certbot certonly --nginx -n --agree-tos -d {{nginx_server_name}} -m {{nginx_admin_email}}"
  notify: restart nginx