ansible-roles/evoacme
Mathieu Trossevin 7c632352a0
Replace the include module with include_tasks or import_tasks
The behaviour of the `include` module is badly defined (it try to choose
between statically importing the tasks and dynamically including them)
and can cause problems depending on any number of constraints (mostly if
it choose the wrong behaviour).

Replace it with the `import_tasks` (always statically import tasks) unless
the `include` is in a loop in which case we replace it with
`include_tasks` (always dynamically include tasks).
2023-01-03 14:43:42 +01:00
..
defaults evoacme: variable to disable Debian version check (default: False) 2020-11-21 09:59:10 +01:00
files evoacme: exclude renewal-hooks directory from cron 2021-10-05 08:28:47 +02:00
handlers Revert "Add “when: not ansible_check_mode” to allow more --check" 2022-12-14 07:41:18 +01:00
meta Update Galaxy metadata (company, platforms and galaxy_tags) 2021-06-28 15:26:28 +02:00
tasks Replace the include module with include_tasks or import_tasks 2023-01-03 14:43:42 +01:00
templates Proper jinja spacing 2022-12-28 09:03:37 +01:00
tests Add some kitchen tests for many roles 2017-05-18 15:16:30 +02:00
.kitchen.yml Kitchen: Change base image to evolix/ansible 2017-06-02 08:38:08 -04:00
README.md evoacme: upstream version 19.11 2019-11-05 14:08:02 +01:00

Evoacme 2.0

The upstream repository of EvoAcme is at https://gitea.evolix.org/evolix/evoacme

Shell scripts are copied from the upstream repository after each release. No changes must be applied directly here ; patch upstream, release then copy here.

Install

1 - Create a playbook with evoacme role

---
- hosts: hostname
  become: yes
  roles:
    - evoacme

2 - Install evoacme prerequisite with ansible

# ansible-playbook playbook.yml -K --limit hostname

3 - Include letsencrypt.conf in your webserver

For Apache, you just need to ensure that you don't overwrite "/.well-known/acme-challenge" Alias with a Redirect or Rewrite directive.

For Nginx, you must include /etc/nginx/snippets/letsencrypt.conf in all wanted vhosts :

server {
    […]
    include /etc/nginx/snippets/letsencrypt.conf;
    […]
}

then reload the Nginx configuration :

# nginx -t
# service nginx reload

4 - Create a CSR for a vhost with make-csr

# make-csr vhostname domain...

5 - Generate the certificate with evoacme

# evoacme look for /etc/ssl/requests/vhostname
# vhostname was the same used by make-csr
evoacme vhostname

6 - Include ssl configuration

Sll configuration has generated, you must include it in your vhost.

For Apache :

Include /etc/apache2/ssl/vhost.conf

For Nginx :

include /etc/nginx/ssl/vhost.conf;