Skip to content
Snippets Groups Projects
main.yml 3.75 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/envars.j2
    dest: /etc/apache2/envvars
    mode: 0755
    owner: root
    group: root

- 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-enabled/mpm_prefork.conf
      tags:
        - apache

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

- 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 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
  tags:
    - apache

- 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