src.nth.io/

summaryrefslogtreecommitdiff
path: root/roles/nginx/tasks/certbot.yaml
blob: b7fbe8db644a9bbce1c0fc77faa47f8d46d35fce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
---

# 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