Page MenuHomeDevCentral

No OneTemporary

diff --git a/roles/webserver-core/letsencrypt/certificates.sls b/roles/webserver-core/letsencrypt/certificates.sls
index 79328d5..c4c4a21 100644
--- a/roles/webserver-core/letsencrypt/certificates.sls
+++ b/roles/webserver-core/letsencrypt/certificates.sls
@@ -1,20 +1,20 @@
# -------------------------------------------------------------
# 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 salt['pillar.get']("certificates_letsencrypt:" + grains['id'], []) %}
certificate_{{ domain }}:
cmd.run:
- name: certbot certonly -d {{ domain }}
- creates: {{ dirs.etc }}/letsencrypt/live/{{ domain }}/fullchain.pem
{% endfor %}
diff --git a/roles/webserver-core/letsencrypt/service.sls b/roles/webserver-core/letsencrypt/service.sls
index 5157344..d1884d5 100644
--- a/roles/webserver-core/letsencrypt/service.sls
+++ b/roles/webserver-core/letsencrypt/service.sls
@@ -1,44 +1,44 @@
# -------------------------------------------------------------
# Salt — Let's encrypt certificates
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2017-04-27
# Description: Provide a renewal service
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
{% from "map.jinja" import services with context %}
# -------------------------------------------------------------
# Renew script
-# -------------------------------------------------------------
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/usr/local/sbin/letsencrypt-renewal:
file.managed:
- source: salt://roles/webserver-core/letsencrypt/files/letsencrypt-renewal.sh
- mode: 0755
# -------------------------------------------------------------
# Unit configuration
-# -------------------------------------------------------------
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{% if services['manager'] == 'systemd' %}
letsencrypt_renew_unit:
file.managed:
- name: /etc/systemd/system/letsencrypt-renew.service
- source: salt://roles/webserver-core/letsencrypt/files/letsencrypt-renew.service
- mode: 0644
module.run:
- service.force_reload:
- name: letsencrypt-renew
- onchanges:
- file: letsencrypt_renew_unit
letsencrypt_renew_enable:
service.enabled:
- name: letsencrypt-renew
- watch:
- module: letsencrypt_renew_unit
{% endif %}
diff --git a/roles/webserver-core/letsencrypt/software.sls b/roles/webserver-core/letsencrypt/software.sls
index ec0ae7d..6358109 100644
--- a/roles/webserver-core/letsencrypt/software.sls
+++ b/roles/webserver-core/letsencrypt/software.sls
@@ -1,34 +1,34 @@
# -------------------------------------------------------------
# Salt — Let's encrypt certificates
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2017-04-27
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
{% from "map.jinja" import dirs, packages with context %}
# -------------------------------------------------------------
# Software
-# -------------------------------------------------------------
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
letsencrypt_software:
pkg.installed:
- name: {{ packages.certbot }}
# -------------------------------------------------------------
# Working directory
-# -------------------------------------------------------------
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/var/letsencrypt-auto:
file.directory:
- user: root
- dir_mode: 711
# -------------------------------------------------------------
# Configuration file
-# -------------------------------------------------------------
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{ dirs.etc }}/letsencrypt/cli.ini:
file.managed:
- source: salt://roles/webserver-core/letsencrypt/files/cli.ini

File Metadata

Mime Type
text/x-diff
Expires
Sun, Nov 24, 19:43 (5 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2258822
Default Alt Text
(4 KB)

Event Timeline