roles/nginx/tasks/certbot.yaml
changeset 61 2dd82d9e2103
equal deleted inserted replaced
60:48a3a65119d5 61:2dd82d9e2103
       
     1 ---
       
     2 
       
     3 # https://certbot.eff.org/lets-encrypt/ubuntuxenial-nginx
       
     4 
       
     5 - name: add certbot (letsencrypt) repo
       
     6   become: yes
       
     7   apt_repository: repo="ppa:certbot/certbot"
       
     8 
       
     9 - name: install nginx packages
       
    10   become: yes
       
    11   apt: name="python-certbot-nginx"
       
    12   notify: restart nginx
       
    13 
       
    14 - name: install certbot in nginx
       
    15   become: yes
       
    16   command: "certbot certonly --nginx -n --agree-tos -d {{nginx_server_name}} -m {{nginx_admin_email}}"
       
    17   notify: restart nginx