diff --git a/local.yml b/local.yml index 262a13f..5117fd6 100644 --- a/local.yml +++ b/local.yml @@ -16,3 +16,13 @@ - lxchost vars: dominio: agofer.net + +- hosts: nginx + gather_facts: yes + roles: + - nginxproxy + vars: + dominio: agofer.net + ansible_python_interpreter: python3 + ansible_connection: lxd + ansible_host: local:nginx diff --git a/roles/nginxproxy/tasks/main.yml b/roles/nginxproxy/tasks/main.yml index 5dd77b9..669cfd4 100644 --- a/roles/nginxproxy/tasks/main.yml +++ b/roles/nginxproxy/tasks/main.yml @@ -22,9 +22,9 @@ name: nginx state: restarted -#-name: Request Let's Encrypt certificate -# command: -# cmd: 'certbot --redirect --agree-tos -m {{ email }} --hsts --nginx -n -d {{ container }}.{{ dominio }}' +- name: Request Let's Encrypt certificate + command: + cmd: 'certbot --redirect --agree-tos -m {{ email }} --hsts --nginx -n -d {{ container }}.{{ dominio }}' # Certbot doesn't add proxy_protocol. # (https://github.com/certbot/certbot/issues/8057)