Commit b4081bee authored by Daniel Dehennin's avatar Daniel Dehennin
Browse files

feat(service): rebuild the application on configuration changes

parent c79ad59c
# -*- coding: utf-8 -*-
# vim: ft=sls
{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split('/')[0] %}
{%- from tplroot | path_join("map.jinja") import discourse with context %}
discourse-service-clean-cmd-run:
cmd.run:
- name: {{ discourse | traverse('launcher:destroy_cmd') }}
- cwd: {{ discourse.directory }}
# -*- coding: utf-8 -*-
# vim: ft=sls
include:
- .rebuild
- .running
# -*- coding: utf-8 -*-
# vim: ft=sls
{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split('/')[0] %}
{%- set sls_discourse_netcat_package_install = tplroot ~ '.netcat.install' %}
{%- set sls_discourse_net_tools_package_install = tplroot ~ '.net-tools.install' %}
{%- set sls_discourse_config_file = tplroot ~ '.config.file' %}
{%- from tplroot | path_join("map.jinja") import discourse with context %}
include:
- {{ sls_discourse_netcat_package_install }}
- {{ sls_discourse_net_tools_package_install }}
- {{ sls_discourse_config_file }}
discourse-service-rebuild-cmd-run:
cmd.run:
- name: {{ discourse | traverse('launcher:rebuild_cmd') }}
- cwd: {{ discourse.directory }}
- require:
- sls: {{ sls_discourse_netcat_package_install }}
- sls: {{ sls_discourse_net_tools_package_install }}
- onchanges:
- sls: {{ sls_discourse_config_file }}
# -*- coding: utf-8 -*-
# vim: ft=sls
{#- Get the `tplroot` from `tpldir` #}
{%- set tplroot = tpldir.split('/')[0] %}
{%- set sls_service_rebuild = tplroot ~ '.service.rebuild' %}
{%- from tplroot | path_join("map.jinja") import discourse with context %}
include:
- {{ sls_service_rebuild }}
discourse-service-running-cmd-run:
cmd.run:
- name: {{ discourse | traverse('launcher:start_cmd') }}
- cwd: {{ discourse.directory }}
- require:
- sls: {{ sls_service_rebuild }}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment