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.
This commit is contained in:
2019-09-19 19:16:27 -05:00
parent fb352cc920
commit 2914bdb73c

View File

@@ -55,9 +55,14 @@
- name: ensure apache is configured for certbot
copy:
src=certbot.httpd.conf
dest=/etc/httpd/conf.d/certbot.conf
dest=/etc/httpd/conf.d/01_certbot.conf
mode=0644
notify: reload httpd
- name: ensure old certbot apache config file is removed
file:
path=/etc/httpd/conf.d/certbot.conf
state=absent
notify: reload httpd
- meta: flush_handlers
- name: ensure letsencrypt account data are installed