Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F11722358
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/roles/core/certificates/files/letsencrypt-renew.service b/roles/core/certificates/files/letsencrypt-renew.service
deleted file mode 100644
index 6c8814b..0000000
--- a/roles/core/certificates/files/letsencrypt-renew.service
+++ /dev/null
@@ -1,25 +0,0 @@
-# -------------------------------------------------------------
-# Let's encrypt
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-# Project: Nasqueron
-# License: Trivial work, not eligible to copyright
-# Source file: roles/core/certificates/files/letsencrypt-renew.service
-# -------------------------------------------------------------
-#
-# <auto-generated>
-# This file is managed by our rOPS SaltStack repository.
-#
-# Changes to this file may cause incorrect behavior
-# and will be lost if the state is redeployed.
-# </auto-generated>
-
-[Unit]
-Description=Renew Let's encrypt certificates.
-Wants=letsencrypt-renew.timer
-
-[Service]
-Type=oneshot
-ExecStart=/usr/local/sbin/letsencrypt-renewal
-
-[Install]
-WantedBy=multi-user.target
diff --git a/roles/core/certificates/files/letsencrypt-renew.timer b/roles/core/certificates/files/letsencrypt-renew.timer
deleted file mode 100644
index 7fa3910..0000000
--- a/roles/core/certificates/files/letsencrypt-renew.timer
+++ /dev/null
@@ -1,24 +0,0 @@
-# -------------------------------------------------------------
-# Let's encrypt
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-# Project: Nasqueron
-# License: Trivial work, not eligible to copyright
-# Source file: roles/core/certificates/files/letsencrypt-renew.timer
-# -------------------------------------------------------------
-#
-# <auto-generated>
-# This file is managed by our rOPS SaltStack repository.
-#
-# Changes to this file may cause incorrect behavior
-# and will be lost if the state is redeployed.
-# </auto-generated>
-
-[Unit]
-Description=Check and renew Let's Encrypt certificates
-
-[Timer]
-OnCalendar=*-*-* 12:15:00
-Persistent=yes
-
-[Install]
-WantedBy=timers.target
diff --git a/roles/core/certificates/letsencrypt.sls b/roles/core/certificates/letsencrypt.sls
index 74f08c3..3fb3cf8 100644
--- a/roles/core/certificates/letsencrypt.sls
+++ b/roles/core/certificates/letsencrypt.sls
@@ -1,97 +1,78 @@
# -------------------------------------------------------------
# Salt - Deploy certificates
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
{% from "map.jinja" import dirs, packages with context %}
{% set has_nginx = salt['node']['has_nginx']() %}
# -------------------------------------------------------------
# Software
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
letsencrypt_software:
pkg.installed:
- name: {{ packages.certbot }}
# -------------------------------------------------------------
# Working directory and configuration
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/var/letsencrypt-auto:
file.directory:
- user: root
- dir_mode: 711
{{ dirs.etc }}/letsencrypt/cli.ini:
file.managed:
- source: salt://roles/core/certificates/files/cli.ini
- makedirs: True
# -------------------------------------------------------------
# Extra utilities
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{ dirs.bin }}/check-letsencrypt-certificates:
file.managed:
- source: salt://roles/core/certificates/files/check-letsencrypt-certificates.py
- mode: 755
{{ dirs.etc }}/letsencrypt/acme-dns-auth:
file.managed:
- source: salt://roles/core/certificates/files/acme-dns-auth.py
- mode: 755
- makedirs: True
{{ dirs.bin }}/edit-acme-dns-accounts:
file.managed:
- source: salt://roles/core/certificates/files/edit-acme-dns-accounts.py
- mode: 755
# -------------------------------------------------------------
# Check and renew certificates daily
#
# FreeBSD ... periodic
# Linux ..... systemd timer
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{% if has_nginx %}
{% set renewal_script = "letsencrypt-renewal.sh" %}
{% else %}
{% set renewal_script = "letsencrypt-renewal-without-nginx.sh" %}
{% endif %}
/usr/local/sbin/letsencrypt-renewal:
file.managed:
- source: salt://roles/core/certificates/files/{{ renewal_script }}
- mode: 755
{% if grains["os_family"] == "FreeBSD" %}
/usr/local/etc/periodic/daily/730.letsencrypt:
file.managed:
- source: salt://roles/core/certificates/files/730.letsencrypt
-{% elif services["manager"] == "systemd" %}
-
-/etc/systemd/system/letsencrypt-renew.timer:
- file.managed:
- - source: salt://roles/core/certificates/files/letsencrypt-renew.timer
-
-/etc/systemd/system/letsencrypt-renew.service:
- file.managed:
- - source: salt://roles/core/certificates/files/letsencrypt-renew.service
-
-letsencrypt_renew_enable:
- service.enabled:
- - name: letsencrypt-renew
-
-letsencrypt_renew_timer_start:
- service.running:
- - name: letsencrypt-renew.timer
- - enable: True
-
{% endif %}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Sep 18, 02:08 (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2984662
Default Alt Text
(5 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment