inofix.acme-tiny-cron
Acme-Tiny Cron
This is an ansible role for creating cron jobs for the recreation of your cerificates for a certain domain.
The role is meant to be run for a system accessible from the web. It will make the request with "Let's Encrypt" from an existing csr (see inofix.acme-tiny-setup), solve the challenge on the server's well-known webfolder and then put the resulting certificates in the openssl configuration directory.
It takes over the work of inofix.acme-tiny-sign which must be run at least once as it is base on the preparations of that role and only repeats the recreation of the certificate once a month (so no ansible "master" etc. has to be involved later).
Status
preSTABLE (Feature-Freezy/RC)
Promise
Sure, this role may change in the future, but we will only expand features to not break backwards compatibility.
If radical changes should become necessary, a new role will be created, probably with an 'ng' or version suffix...
Installation
# ansible-galaxy install inofix.acme-tiny-cron
Requirements
- Ansible >2.0
- On target host
- Generic UNIX with FHS
- Python2/3
- Cron
- Running webserver with ^/.well-known/acme-challenge/ directory accessible (hardcoded in acme-tiny script..)
- The webserver must serve HTTP, even for consequent certificates (not just HTTPS; requirement of acme-tiny/let's-encrypt)
- Resolve all names in the cert to localhost or the local-IP
Role Variables
- app__acme__tiny__user - optional, default='acme'
- app__acme__tiny__config_dir - optional, default='/etc/ssl/acme-tiny'
- app__acme__tiny__account_key - optional, auto
- app__acme__tiny__challenge_dir - optional, default='/var/www/acme-challenge'
- app__acme__scripts_dir - optional, default='/etc/ssl/acme/scripts'
- app__acme__log_dir - optional, default='/var/log/acme'
- app__acme__domain - optional, default=[ {domain='example.com'} ]
- app__acme__cron_minute - optional, default='02,22,42'
- app__acme__cron_hour - optional, default='03,04'
- app__acme__cron_day - optional, default='*'
- app__acme__cron_month - optional, default='*'
- app__acme__cron_year - optional, default='*'
- app__acme__letsencrypt_certs - optional, default=[ {url='https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem', file='intermediate.crt'}, {url='https://letsencrypt.org/certs/isrgrootx1.pem', file='ca.crt'} ]
- fqdn - optional, default={{ ansible_fqdn | d(inventory_hostname ) }}
Dependencies
- 'inofix.acme-tiny-sign' - as a weak dependency, as the role must be run once at least, but the role can also be used later to fix the cronjobs.
Example Playbook
- hosts: servers
roles:
- inofix.acme-tiny-cron
(See inofix.acme-setup)
License
GPLv3
Author Information
- Michael Lustenberger at inofix.ch
Install cronjob to sign certs with the famous acme-tiny python script
ansible-galaxy install inofix.acme-tiny-cron