lexa-uw.letsencrypt
Ansible Role LetsEncrypt
This role helps you install SSL certificates using Let's Encrypt.
Requirements
You need Ansible version 2.5 or higher to use this role.
Role Variables
Package options:
lets_encrypt_hostname
This is the host for which you want to install a new certificate.
lets_encrypt_agreement
This is a link to the terms of service document you agree to when using the ACME v1 service at lets_encrypt_endpoint
.
lets_encrypt_endpoint
This is the URL to access the Certificate Authority (CA) server's API. (default: https://acme-v01.api.letsencrypt.org/directory)
lets_encrypt_directories_certs
This is the folder where the certificates will be stored. (default: /tmp)
lets_encrypt_directories_data
This is the folder used for challenge data. (default: /tmp/data)
Note! This folder must be available on your server (nginx, Apache, etc.).
Add Role to Project:
Add the role to your project requirements (like requirements.yml):
- src: https://github.com/lexa-uw/ansible-role-letsencrypt
version: v2.0.0
name: letsencrypt
Install the Role:
Run ansible-galaxy install -r ./requirements.yml --roles-path ./roles/
Playbook Example:
- hosts: all
vars_files:
- vars/main.yml
roles:
- { role: letsencrypt }
Inside vars/main.yml
lets_encrypt_hostname: host.name
lets_encrypt_directories_certs: "/etc/nginx/ssl"
lets_encrypt_directories_data: "/var/www/data"
ansible-galaxy install lexa-uw.letsencrypt