Skip to content
Snippets Groups Projects
Chris Croome's avatar
Chris Croome authored
00819a6b
History

Ansible Apache Role

Currently this repository contains an Ansible role for installing Apache on Debian Stretch.

To use this role you need to use Ansible Galaxy to install it into another repository by adding a requirements.yml file in that repo that contains:

---
- name: apache
  src: https://git.coop/webarch/apache.git
  version: master
  scm: git

To pull this repo in run:

ansible-galaxy install -r requirements.yml --force -p roles 

The other repo should also contain a .yml file that contains something like this:

---
- name: Install Apache
  become: yes

  hosts: apache_servers

  vars:
    apache_mods_enabled:
      - dir
      - env
      - headers
      - http2
      - include
      - mime
      - rewrite
      - ssl
      - suexec
    apache_conf_disabled:
      - serve-cgi-bin

  roles:
    - apache

And a hosts.yml file that contains a apache_servers list as follows:

---
all:
  children:
    apache_servers:
      hosts:
        host1.example.org:
        host2.example.org:

Then it can be run as follows:

ansible-playbook matomo.yml -i hosts.yml