1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_acmetool.git synced 2024-08-16 12:29:49 +02:00
Ansible role to manage letsencrypt certs with acme tool
Find a file
L3D 9ea537d4fd
Merge pull request #10 from roles-ansible/hook
improve acmetool hook configuration
2021-08-11 23:38:08 +02:00
.github Bump actions/checkout from 2 to 2.3.4 2021-05-12 06:09:08 +00:00
defaults Improve services restart hook 2021-08-11 23:17:29 +02:00
files Improve services restart hook 2021-08-11 23:17:29 +02:00
meta Improve services restart hook 2021-08-11 23:17:29 +02:00
tasks update acmetool hook 2021-08-11 23:33:53 +02:00
templates Improve services restart hook 2021-08-11 23:17:29 +02:00
vars Improve services restart hook 2021-08-11 23:17:29 +02:00
.gitignore repair linting 2021-03-20 18:28:29 +01:00
.yamllint repair linting 2021-03-20 18:28:29 +01:00
LICENCE Add myself to License 2021-03-20 18:55:33 +01:00
README.md Improve services restart hook 2021-08-11 23:17:29 +02:00

Ansible Galaxy MIT License

Acmetool LE client

Install and configure the acmetool LE client.

Currently this role is designed to work with the do1jlr.nginx ansible role. Maybe there will be a standalone version of this role someday...

Variables

  • acme_notification_email: (Default: root@example.org): LE account email. The default needs to be changed!

  • acme_reload_services: (Default: []): Services that need a reload by certificat change (There are some services pre-defined in the files/reload file)

  • acme_restart_services: (Default: []): Services that need a restart by certificat change

  • submodules_versioncheck: (Default: false): Enable basic versionscheck. (true is recomended)

Files

  • We search the response-file.yml.j2 using the first_found_loopup with the following config:
  files:
    - "response-file.{{ inventory_hostname }}.yml.j2"
    - 'response-file.yml.j2'
  paths:
    - 'templates/acmetool'
    - "templates/{{ inventory_hostname }}"
    - 'files/acmetool'
    - "files/{{ inventory_hostname }}"
    - 'templates'

This file is configuring the acmetool behaviour like certificate type, challange methode, acme notification email and so on. Change the values by providing your own response-file.yml.j2.

  • We search the reload and restart hook using the first_found_loopup with the config defined in vars/main.yml.

  • We deploy the acme-reload and acme-restart configuration based on the acme_reload_services: and acme_restart_services: variables

References

Good to know

If you are using debian buster, you are probably interested in a more up to date version of acmetool. Have a look at the do1jlri.acmetool_fix role, that will install a specific version of acmetool on debian based systems.

Testing

We are using the following github actions for testing and releasing to ansible galaxy.

Action Status Marketplace
Ansible Lint check ansible-lint
Galaxy release publish-ansible-role-to-galaxy
Yamllint GitHub Actions yamllint-github-action