Christian Boltz 466eca
apache2:
Christian Boltz 466eca
  pkg.installed:
Christian Boltz 466eca
    - pkgs:
Christian Boltz 466eca
      - apache2-mod_apparmor
Christian Boltz 466eca
      - apache2-prefork
Christian Boltz 466eca
  service.running:
Christian Boltz 466eca
    - enable: True
Christian Boltz 466eca
Christian Boltz 466eca
/etc/apache2/vhosts.d/countdown.opensuse.org.conf:
Christian Boltz 466eca
  file.managed:
Christian Boltz 466eca
    - listen_in:
Christian Boltz 466eca
      - service: apache2
Christian Boltz 466eca
    - source: salt://profile/countdown/files/apache-vhost.conf
Christian Boltz 466eca
    - template: jinja
Christian Boltz 466eca
Christian Boltz 466eca
sysconfig_apache2_countdown:
Christian Boltz 466eca
  file.replace:
Christian Boltz 466eca
    - name: /etc/sysconfig/apache2
Christian Boltz 466eca
    - pattern: ^APACHE_MODULES=.*$
Christian Boltz 466eca
    # original line:       "actions alias          auth_basic authn_file authz_host authz_groupfile authz_core authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl socache_shmcb userdir reqtimeout authn_core php7 rewrite"
Christian Boltz 466eca
    - repl: APACHE_MODULES="        alias apparmor auth_basic authn_file authz_host authz_groupfile authz_core authz_user autoindex     dir env expires include log_config mime negotiation setenvif     socache_shmcb         reqtimeout authn_core      rewrite remoteip status"
Christian Boltz 466eca
    - listen_in:
Christian Boltz 466eca
      - service: apache2
Christian Boltz 466eca
430cbc
430cbc
430cbc
# This is handled in /etc/logrotate.d/apache2 since Leap 15.x (same/duplicate entry there)
430cbc
# removing the file on newer Leap versions to avoid  errors in logrotate (duplicate entry...)
Christian Boltz 466eca
/etc/logrotate.d/apache2-vhosts:
430cbc
{% if salt['grains.get']('osfullname') == "Leap" and salt['grains.get']('osmajorrelease')|int >= 15 %}
430cbc
  file.absent
430cbc
{% else %}
Christian Boltz 466eca
  file.managed:
Christian Boltz 466eca
    - source: salt://profile/wiki/files/apache2-wiki.logrotate
430cbc
{% endif %}