2017-01-08 12:30:33 +01:00
|
|
|
{% from "apache/map.jinja" import apache with context %}
|
|
|
|
|
|
|
|
include:
|
|
|
|
- apache
|
|
|
|
|
|
|
|
mod-perl2:
|
|
|
|
pkg.installed:
|
|
|
|
- name: {{ apache.mod_perl2 }}
|
|
|
|
- order: 180
|
|
|
|
- require:
|
|
|
|
- pkg: apache
|
2018-11-09 00:25:52 +01:00
|
|
|
- watch_in:
|
|
|
|
- module: apache-restart
|
|
|
|
- require_in:
|
|
|
|
- module: apache-restart
|
|
|
|
- module: apache-reload
|
|
|
|
- service: apache
|
2017-01-08 12:30:33 +01:00
|
|
|
|
|
|
|
{% if grains['os_family']=="Debian" %}
|
2019-11-04 17:23:25 +01:00
|
|
|
a2enmod perl:
|
2017-01-08 12:30:33 +01:00
|
|
|
cmd.run:
|
2019-11-04 17:23:25 +01:00
|
|
|
- unless: ls /etc/apache2/mods-enabled/perl.load
|
2017-01-08 12:30:33 +01:00
|
|
|
- order: 225
|
|
|
|
- require:
|
|
|
|
- pkg: mod-perl2
|
|
|
|
- watch_in:
|
|
|
|
- module: apache-restart
|
2018-11-09 00:25:52 +01:00
|
|
|
- require_in:
|
|
|
|
- module: apache-restart
|
|
|
|
- module: apache-reload
|
|
|
|
- service: apache
|
2017-01-08 12:30:33 +01:00
|
|
|
|
|
|
|
{% elif grains['os_family']=="FreeBSD" %}
|
|
|
|
|
|
|
|
{{ apache.modulesdir }}/260_mod_perl.conf:
|
|
|
|
file.managed:
|
|
|
|
- source: salt://apache/files/{{ salt['grains.get']('os_family') }}/mod_perl.conf.jinja
|
|
|
|
- mode: 644
|
|
|
|
- template: jinja
|
|
|
|
- require:
|
|
|
|
- pkg: apache
|
|
|
|
- watch_in:
|
|
|
|
- module: apache-restart
|
2018-11-09 00:25:52 +01:00
|
|
|
- require_in:
|
|
|
|
- module: apache-restart
|
|
|
|
- module: apache-reload
|
|
|
|
- service: apache
|
2017-01-08 12:30:33 +01:00
|
|
|
|
|
|
|
{% endif %}
|