Skip to content
Snippets Groups Projects
main.yml 4.28 KiB
---
- name: Apache packages present
  apt:
    pkg:
      - apache2
      - apache2-utils
      - lynx
    state: present
    update_cache: true
  tags:
    - apache

- name: Apache envars in place
  template:
    src: templates/envvars.j2
    dest: /etc/apache2/envvars
    mode: 0755
    owner: root
    group: root
  tags:
    - apache

- name: Apache ITK MPM package absent
  apt:
    pkg:
      - libapache2-mpm-itk
    state: absent
    update_cache: false
  when: ( apache_mods_enabled is defined ) and ( "mpm-itk" in apache_mods_disabled )
  tags:
    - apache

- name: Apache ITK MPM configuration
  block:

    - name: Apache ITK MPM package present
      apt:
        pkg:
          - libapache2-mpm-itk
        state: present
        update_cache: false
      tags:
        - apache

    - name: Apache mpm_prefork.conf in place
      template:
        src: templates/mpm_prefork.conf.j2
        dest: /etc/apache2/mods-available/mpm_prefork.conf
      tags:
        - apache

  when: ( apache_mods_enabled is defined ) and ( "mpm-itk" in apache_mods_enabled )

- name: Apache suEXEC package absent
  apt:
    pkg:
      - apache2-suexec-pristine
    state: absent
    update_cache: false
  when: ( apache_mods_enabled is defined ) and ( "suexec" in apache_mods_disabled )
  tags:
    - apache

- name: Apache Suexec package present
  apt:
    pkg:
      - apache2-suexec-pristine
    state: present
    update_cache: false
  when: ( apache_mods_enabled is defined ) and ( "suexec" in apache_mods_enabled )