blob: 7a081326412dd15081d7b464d1170a46342bfe9e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
- name: "create testuser account"
user:
name: testuser
password_lock: yes
- name: "allow deployer access to testuser via ssh"
authorized_key:
user: testuser
key: "{{ deployer_ssh_pub }}"
exclusive: yes
- 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
|