2016-06-21 00:59:06 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# vim: ft=sls
|
|
|
|
|
|
|
|
{% from "letsencrypt-sh/map.jinja" import letsencrypt_sh with context %}
|
|
|
|
|
2016-12-12 20:47:14 +01:00
|
|
|
{% set install_hook = False %}
|
|
|
|
{% if letsencrypt_sh.hook_script_src != 'salt://letsencrypt-sh/files/hook' or letsencrypt_sh.hook_service_to_reload %}
|
|
|
|
{% set install_hook = True %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
letsencrypt-sh-config:
|
2016-06-21 00:59:06 +02:00
|
|
|
file.managed:
|
|
|
|
- name: {{ letsencrypt_sh.config_file }}
|
2016-12-12 16:07:16 +01:00
|
|
|
- source: salt://letsencrypt-sh/files/config
|
2016-06-21 00:59:06 +02:00
|
|
|
- mode: 644
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- template: jinja
|
2016-12-12 20:47:14 +01:00
|
|
|
- context:
|
|
|
|
use_default_hook: {{ install_hook }}
|
|
|
|
|
|
|
|
{% if install_hook %}
|
|
|
|
letsencrypt-sh-hook:
|
|
|
|
file.managed:
|
|
|
|
- name: {{ letsencrypt_sh.hook_script }}
|
|
|
|
- source: {{ letsencrypt_sh.hook_script_src }}
|
|
|
|
- mode: 755
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- template: jinja
|
|
|
|
{% endif %}
|
2016-06-21 00:59:06 +02:00
|
|
|
|
|
|
|
letsencrypt-sh-domains:
|
|
|
|
file.managed:
|
|
|
|
- name: {{ letsencrypt_sh.domains_txt }}
|
|
|
|
- source: salt://letsencrypt-sh/files/domains.txt
|
|
|
|
- mode: 644
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- template: jinja
|