-
Notifications
You must be signed in to change notification settings - Fork 1
/
machine.yml
83 lines (73 loc) · 1.62 KB
/
machine.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
---
- name: prepare locale
become: true
shell: locale-gen en_US.UTF-8
- name: set locales
become: true
lineinfile:
dest: /etc/environment
regexp: '{{ item }}'
line: "{{ item }}"
state: present
with_items:
- LC_ALL="en_US.UTF-8"
- LANG="en_US.UTF-8"
- name: update ubuntu
become: true
apt:
name: "*"
state: latest
force_apt_get: yes
- name: install packages ubuntu
become: true
apt:
name: ['apt-transport-https',
'ca-certificates',
'coreutils',
'htop',
'iftop',
'iotop',
'iperf',
'iproute2',
'iputils-ping',
'nmon',
'ntpdate',
'psmisc',
'python-pip',
'software-properties-common',
'sysstat',
'netcat',
'tzdata',
'vim']
- name: update pip
become: true
shell: pip install --upgrade pip
- name: set timezone
become: true
timezone:
name: UTC
- name: disable irqbalance service
become: true
systemd:
name: irqbalance.service
state: stopped
enabled: false
daemon_reload: yes
- name: enable module
become: true
modprobe:
name: ip_conntrack
state: present
- name: set limits
become: true
copy:
src: machine/limits.conf
dest: /etc/security/limits.conf
- name: copy sysctl
become: true
copy:
src: machine/sysctl.conf
dest: /etc/sysctl.conf
- name: apply sysctl
become: true
shell: sysctl -p