-
Notifications
You must be signed in to change notification settings - Fork 2
/
client.yml
68 lines (66 loc) · 1.54 KB
/
client.yml
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
- hosts: all
become: yes
gather_facts: yes
name: Prepare client
tasks:
- name: Install prerequisites
apt:
name: "{{ packages }}"
vars:
packages:
- curl
- netcat
- name: Replace /etc/hosts
template:
src: files/hosts.j2
dest: /etc/hosts
owner: root
group: root
mode: '0644'
- name: Set timezone
command: timedatectl set-timezone 'Europe/Berlin'
- name: Configure NTP
copy:
src: files/timesyncd.conf
dest: /etc/systemd/timesyncd.conf
owner: root
group: root
mode: '0644'
- name: Enable NTP
command: timedatectl set-ntp 1
- name: Add rsyslog configuration
copy:
src: files/graylog.conf
dest: /etc/rsyslog.d/rsyslog.conf
owner: root
group: root
mode: '0644'
- name: Restart rsyslog
service:
name: rsyslog
state: restarted
enabled: yes
- name: Install apache2
apt:
name: apache2
update_cache: yes
- name: Configure apache
copy:
src: files/000-default.conf
dest: /etc/apache2/sites-available/000-default.conf
owner: root
group: root
mode: '0644'
- name: Start and enable apache2
service:
name: apache2
state: started
enabled: yes
- name: Add dummy website
copy:
src: files/index.html
dest: /var/www/html/index.html
owner: root
group: root
mode: '0644'