Commit 594673df authored by Daniel Dehennin's avatar Daniel Dehennin
Browse files

feat(launcher): easily execute launcher command from salt

parent b4081bee
# -*- 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-launcher-bootstrap-cmd-run:
cmd.run:
- name: {{ discourse | traverse('launcher:bootstrap_cmd') }}
- cwd: {{ discourse.directory }}
- require:
- sls: {{ sls_discourse_netcat_package_install }}
- sls: {{ sls_discourse_net_tools_package_install }}
- sls: {{ sls_discourse_config_file }}
# -*- 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-launcher-cleanup-cmd-run:
cmd.run:
- name: {{ discourse | traverse('launcher:cleanup_cmd') }}
- cwd: {{ discourse.directory }}
# -*- 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-launcher-destroy-cmd-run:
cmd.run:
- name: {{ discourse | traverse('launcher:destroy_cmd') }}
- cwd: {{ discourse.directory }}
# -*- 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-launcher-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 }}
- sls: {{ sls_discourse_config_file }}
# -*- 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-launcher-restart-cmd-run:
cmd.run:
- name: {{ discourse | traverse('launcher:restart_cmd') }}
- cwd: {{ discourse.directory }}
# -*- 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-launcher-start-cmd-run:
cmd.run:
- name: {{ discourse | traverse('launcher:start_cmd') }}
- cwd: {{ discourse.directory }}
- require:
- sls: {{ sls_service_rebuild }}
# -*- 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-launcher-stop-cmd-run:
cmd.run:
- name: {{ discourse | traverse('launcher:stop_cmd') }}
- cwd: {{ discourse.directory }}
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