Commit ae2d7d8e authored by Charlie Root's avatar Charlie Root
Browse files

sync

parent e933e6b8
......@@ -2,7 +2,6 @@
geoserver:
version: 2.16.2
port: 8080
user: geoserver
group: geoserver
jdk: openjdk8
......
......@@ -14,6 +14,8 @@ include:
{% if module_config.enabled %}
# Copy .jar to lib/
{{ instance }}_jetty_module_{{ module }}:
file.managed:
- name: {{ module_config.name }}
......@@ -27,6 +29,8 @@ include:
{% else %}
# Delete .jar from lib/
{{ instance }}_jetty_module_{{ module }}:
file.absent:
- name: {{ module_config.name }}
......@@ -42,6 +46,33 @@ include:
{% if module_config.enabled %}
# Management of .mod files
{{ instance }}_jetty_module_{{ module }}_config:
file.managed:
- name: {{ config.GEOSERVER_HOME | path_join('modules', module ~ '.mod') }}
- contents: {{ module_config.config|yaml }}
- user: {{ config.user }}
- group: {{ config.group }}
- mode: 644
- require_in:
- cmd: {{ instance }}_jetty_module_{{ module }}_ini
{% else %}
{{ instance }}_jetty_module_{{ module }}_config:
file.absent:
- name: {{ config.GEOSERVER_HOME | path_join('modules', module ~ '.mod') }}
{% endif %} # module_config.enabled
{% endif %} # module_config.config
#########
# FILES #
#########
# Managed configuration files (if any)
{% if module_config.files is defined %}
......@@ -87,32 +118,10 @@ include:
{% endif %} # module_file_op
{% endfor %}
{% endfor %} # module_config.files.items()
{% endif %} # module_config.files
# Management of .mod files
{{ instance }}_jetty_module_{{ module }}_config:
file.managed:
- name: {{ config.GEOSERVER_HOME | path_join('modules', module ~ '.mod') }}
- contents: {{ module_config.config|yaml }}
- user: {{ config.user }}
- group: {{ config.group }}
- mode: 644
- require_in:
- cmd: {{ instance }}_jetty_module_{{ module }}_ini
{% else %}
{{ instance }}_jetty_module_{{ module }}_config:
file.absent:
- name: {{ config.GEOSERVER_HOME | path_join('modules', module ~ '.mod') }}
{% endif %}
{% endif %}
#############
# start.ini #
#############
......@@ -120,6 +129,9 @@ include:
# XXX: https://github.com/saltstack/salt/issues/57223
{% if module_config.enabled %}
# --add-to-start
{{ instance }}_jetty_module_{{ module }}_ini:
cmd.run:
- name: {{ config.jdk_conf.JAVA_HOME | path_join('bin', 'java') }} -jar start.jar --add-to-start={{ module }}
......@@ -150,18 +162,18 @@ include:
- cmd: {{ instance }}_jetty_module_{{ module }}_ini
{% endfor %}
{% endif %}
{% endif %} # module_config.ini
{% else %}
{{ instance }}_jetty_module_{{ module }}_ini:
file.replace:
- name: {{ config.GEOSERVER_HOME | path_join('start.ini') }}
- pattern: ^--module={{ module }}$
- repl: '#--module={{ module }}'
- backup: False
{% endif %}
{% endif %} # module_config.enabled
{% endfor %}
{% endfor %}
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