2015-12-16 00:54:14 +01:00
|
|
|
{% if grains['os_family']=="Debian" %}
|
|
|
|
|
|
|
|
include:
|
|
|
|
- apache
|
|
|
|
|
|
|
|
a2enmod remoteip:
|
|
|
|
cmd.run:
|
|
|
|
- unless: ls /etc/apache2/mods-enabled/remoteip.load
|
|
|
|
- order: 255
|
|
|
|
- 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
|
2015-12-16 00:54:14 +01:00
|
|
|
|
2017-03-17 17:03:26 +01:00
|
|
|
a2enconf remoteip:
|
|
|
|
cmd.run:
|
2018-08-30 22:22:28 +02:00
|
|
|
- unless: ls /etc/apache2/conf-enabled/remoteip.conf
|
2017-03-17 17:03:26 +01:00
|
|
|
- order: 255
|
|
|
|
- require:
|
|
|
|
- pkg: apache
|
|
|
|
- watch_in:
|
|
|
|
- module: apache-reload
|
2018-11-09 00:25:52 +01:00
|
|
|
- require_in:
|
|
|
|
- module: apache-restart
|
|
|
|
- module: apache-reload
|
|
|
|
- service: apache
|
2017-03-17 17:03:26 +01:00
|
|
|
|
2015-12-16 00:54:14 +01:00
|
|
|
/etc/apache2/conf-available/remoteip.conf:
|
|
|
|
file.managed:
|
|
|
|
- template: jinja
|
|
|
|
- source:
|
|
|
|
- salt://apache/files/{{ salt['grains.get']('os_family') }}/conf-available/remoteip.conf.jinja
|
|
|
|
- require:
|
|
|
|
- pkg: apache
|
|
|
|
- watch_in:
|
2018-11-09 00:25:52 +01:00
|
|
|
- module: apache-restart
|
|
|
|
- require_in:
|
|
|
|
- module: apache-restart
|
|
|
|
- module: apache-reload
|
2015-12-16 00:54:14 +01:00
|
|
|
- service: apache
|
2020-01-22 13:09:03 +01:00
|
|
|
- cmd: a2enconf remoteip
|
2015-12-16 00:54:14 +01:00
|
|
|
{% endif %}
|
2017-03-09 12:44:32 +01:00
|
|
|
|
|
|
|
|
|
|
|
{% if grains['os_family']=="RedHat" %}
|
|
|
|
|
|
|
|
include:
|
|
|
|
- apache
|
|
|
|
|
|
|
|
/etc/httpd/conf.d/remoteip.conf:
|
|
|
|
file.managed:
|
|
|
|
- template: jinja
|
|
|
|
- source:
|
2019-04-20 09:32:44 +02:00
|
|
|
- salt://apache/files/{{ salt['grains.get']('os_family') }}/conf.modules.d/remoteip.conf.jinja
|
2017-03-09 12:44:32 +01:00
|
|
|
- require:
|
|
|
|
- pkg: apache
|
|
|
|
- watch_in:
|
2018-11-09 00:25:52 +01:00
|
|
|
- module: apache-restart
|
|
|
|
- require_in:
|
|
|
|
- module: apache-restart
|
|
|
|
- module: apache-reload
|
2017-03-09 12:44:32 +01:00
|
|
|
- service: apache
|
|
|
|
|
|
|
|
{% endif %}
|