summaryrefslogtreecommitdiff
path: root/roles/apache2/tasks/main.yml
blob: 2757ee4459c816c558bcd06ba3aff3525bd96ece (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
- name: "create /srv/http"
  file:
    state: directory
    path: /srv/http

- name: "install apache2"
  apt:
    name: apache2

- name: "add virtual host for /srv/http"
  copy:
    src: testenv.conf
    dest: /etc/apache2/sites-available/testenv.conf

- name: "enable virtual host"
  shell: |
    a2ensite testenv

- name: "restart apache2"
  systemd:
    name: apache2
    state: restarted