home-server/roles/acme_front/tasks/main.yml

32 lines
830 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
# The home-server project produces a multi-purpose setup using Ansible.
# Copyright © 20182023 Y. Gablin, under the GPL-3.0-or-later license.
# Full licensing information in the LICENSE file, or gnu.org/licences/gpl-3.0.txt if the file is missing.
- name: ensure /srv/acme exists
file:
path: /srv/acme
state: directory
mode: 01777
- name: let nginx serve ACME requests
copy:
content: |
location ^~ /.well-known/acme-challenge {
alias /srv/acme;
}
dest: /etc/nginx/inc.d/acme.http.inc
mode: 0440
owner: http
group: http
notify:
- restart openresty.service
### LOCAL COMMIT ⇒ ###
- name: commit local changes
include_role: name=etckeeper.inc allow_duplicates=true tasks_from=local.yml
vars:
msg: ACME
### ⇐ LOCAL COMMIT ###
- meta: flush_handlers