diff options
Diffstat (limited to 'roles/nginx/tasks/certbot.yaml')
| -rw-r--r-- | roles/nginx/tasks/certbot.yaml | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/roles/nginx/tasks/certbot.yaml b/roles/nginx/tasks/certbot.yaml new file mode 100644 index 0000000..b7fbe8d --- /dev/null +++ b/roles/nginx/tasks/certbot.yaml @@ -0,0 +1,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 |
