Page MenuHomeDevCentral

roles/core/certificates/letsencrypt-certificates.sls

Authored By
dereckson
Dec 16 2023, 00:48
Size
1 KB
Referenced Files
None
Subscribers
None

roles/core/certificates/letsencrypt-certificates.sls

# -------------------------------------------------------------
# Salt — Let's encrypt certificates
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2017-04-27
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
{% from "map.jinja" import dirs with context %}
# -------------------------------------------------------------
# Certificates
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{% for domain in pillar.get("certificates_letsencrypt", []) %}
certificate_{{ domain }}:
cmd.run:
- name: certbot certonly -d {{ domain }}
- creates: {{ dirs.etc }}/letsencrypt/live/{{ domain }}/fullchain.pem
{% endfor %}
{% for key, domains in pillar.get("certificates_letsencrypt_multiple", {}).items() %}
certificate_{{ key }}:
cmd.run:
- name: certbot certonly{% for domain domains %} -d {{ domain }}{% endfor %}
- creates: {{ dirs.etc }}/letsencrypt/live/{{ domains[0] }}/fullchain.pem
{% endfor %}

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1559394
Default Alt Text
roles/core/certificates/letsencrypt-certificates.sls (1 KB)

Event Timeline