letsencrypt-sh-formula/letsencrypt-sh/config.sls

41 lines
1.0 KiB
Plaintext
Raw Normal View History

2016-06-21 00:59:06 +02:00
# -*- coding: utf-8 -*-
# vim: ft=sls
{% from "letsencrypt-sh/map.jinja" import letsencrypt_sh with context %}
{% 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 }}
- source: salt://letsencrypt-sh/files/config
2016-06-21 00:59:06 +02:00
- mode: 644
- user: root
- group: root
- template: jinja
- 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