2020-09-13 06:07:20 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# vim: ft=sls
|
|
|
|
|
|
|
|
{%- set tplroot = tpldir.split('/')[0] %}
|
|
|
|
{%- from tplroot ~ "/map.jinja" import apache with context %}
|
|
|
|
|
2023-04-29 23:34:12 +02:00
|
|
|
{#- consider moving this to an optional state or enabling it with a pillar option
|
2020-09-13 06:07:20 +02:00
|
|
|
{%- if 'deps' in apache.pkg and apache.pkg.deps and apache.pkg.deps is iterable and apache.pkg.deps is not string %}
|
|
|
|
apache-package-install-deps-pkg-installed:
|
|
|
|
pkg.installed:
|
|
|
|
- names: {{ apache.pkg.deps|json }}
|
|
|
|
- require:
|
|
|
|
- apache-package-install-pkg-installed
|
|
|
|
{%- endif %}
|
2023-04-29 23:34:12 +02:00
|
|
|
#}
|
2020-09-13 06:07:20 +02:00
|
|
|
|
|
|
|
apache-package-install-pkg-installed:
|
|
|
|
{%- if grains.os_family == 'Windows' %}
|
|
|
|
service.dead:
|
|
|
|
- name: {{ apache.service.name }} # port 8080
|
|
|
|
chocolatey.installed:
|
|
|
|
- name: {{ apache.pkg.name }}
|
|
|
|
- force: True
|
|
|
|
|
|
|
|
{%- else %}
|
|
|
|
|
|
|
|
pkg.installed:
|
|
|
|
- name: {{ apache.pkg.name }}
|
|
|
|
group.present:
|
|
|
|
- name: {{ apache.group }}
|
|
|
|
- system: True
|
|
|
|
user.present:
|
|
|
|
- name: {{ apache.user }}
|
|
|
|
- gid: {{ apache.group }}
|
|
|
|
- system: True
|
|
|
|
|
|
|
|
{%- endif %}
|