Commit Graph

6 Commits (dbcb932ceda354280d0ab0e6e9ce13e405d90940)

Author SHA1 Message Date
Dustin 2914bdb73c roles/certbot: Ensure certbot is configured first
The `Alias` configuration for Certbot needs to be configured before any
other locations, to ensure the `/.well-known` path is always served from
the local filesystem.  If another drop-in configuration file (e.g.
`bitwarden.conf`) is ordered before it, it may override this
configuration and prevent Let's Encrypt from working.
2019-09-19 19:50:35 -05:00
Dustin d1a72de6b0 roles/certbot: Run periodically as certbot user
The default systemd unit configuration for *certbot-renew.service* runs
the `certbot renew …` command as root. This can cause permissions
issues, since this Ansible role expects the *certbot* user to be able to
access all configuration, data, and log files. As such, this commit adds
a systemd unit extension for *certbot-renew.service* to run the command
as *certbot*.
2019-01-04 20:52:23 -06:00
Dustin 4a5d319a17 roles/certbot: Reload Apache before cert requests
The Apache service needs to be reloaded after the *certbot* role
configures it to serve the `/.well-known/acme-challenge` path, so that
the changes can take effect before the `certbot` command is run to
request the certificate(s).
2018-07-29 09:28:12 -05:00
Dustin c95a4b7379 roles/certbot: Support using existing account data
The *certbot* role now supports copying the data for an existing Let's
Encrypt account to the managed node using an archive. If an archive
named for the inventory hostname (typically the FQDN) of the managed
node is found in the `accounts` directory under the `files` directory of
the *certbot* role, it will be copied to the managed node and extracted
at `/var/lib/letsencrypt/accounts`. This takes the place of running
`certbot register` to sign up for a new account.
2018-06-23 13:44:34 -05:00
Dustin 52436acb48 roles/certbot: Add some task tags
The *install* tag is applied to any task that installs a package.

The *user* tag is applied to any task that creates an OS user or group.

The *group* tag is applied to any task that creates an OS user group.
2018-06-23 13:43:14 -05:00
Dustin c6a50313dc roles/certbot: Set up Let's Encrypt certificates
The *certbot* role installs and configures the `certbot` ACME client. It
adjusts the default configuration to allow the tool to run as an
unprivileged user, and then configures Apache to work with the *webroot*
plugin. It registers for an account and requests a certificate for the
domains specified by the `certbot_domains` Ansible variable. Finally, it
enables the *certbot-renew.timer* systemd unit to schedule automatic
renewal of all Let's Encrypt certificates.
2018-06-13 22:23:21 -05:00