-
Notifications
You must be signed in to change notification settings - Fork 0
/
packages.yml
101 lines (100 loc) · 2.25 KB
/
packages.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
---
- name: Install Packages to all
hosts: all
become: yes
become_user: root
become_method: sudo
vars:
ntp_server: [mx.pool.ntp.org, pool.ntp.org]
tasks:
- name: upgrade distribution
apt:
upgrade: dist
update_cache: yes
autoremove: yes
become: yes
- name: install vim
apt:
name: vim
become: yes
- name: uninstall htop
apt:
name: htop
state: absent
become: yes
- name: install git
apt:
name: git
become: yes
- name: uninstall nginx
apt:
name: nginx
state: absent
become: yes
- name: install avahi-daemon
apt:
name: avahi-daemon
become: yes
- name: install cowsay
apt:
name: cowsay
become: yes
- name: install fortune
apt:
name: fortune
become: yes
- name: Configure cowsay
lineinfile:
path: /etc/bash.bashrc
line: "fortune | cowsay"
- name: Install NFS Common
apt:
name: nfs-common
become: yes
- name: Install Axel
apt:
name: axel
become: yes
- name: install NTP
apt:
name: ntp
- name: configure NTP
template: src=files/ntp.conf.j2 dest=/etc/ntp.conf
notify:
- restart ntp
- name: copy node_exporter for x86
copy:
src: files/node_exporter_x86
dest: /sbin/node_exporter
owner: root
group: root
mode: '0755'
when: ansible_architecture == "x86_64"
notify:
- restart node-exporter
- name: copy node-exporter.service for x86
copy:
src: files/node-exporter.service
dest: /etc/systemd/system/node-exporter.service
owner: root
group: root
mode: '0644'
when: ansible_architecture == "x86_64"
notify:
- restart node-exporter
handlers:
- name: restart ntp
service:
name: ntp
state: restarted
- name: restart node-exporter
systemd:
name: node-exporter
daemon_reload: yes
state: restarted
- name: Upgrade Pi-Hole on DNS Servers
hosts: dns_servers
become: no
tasks:
- name: Upgrade Pi-Hole on DNS Servers
command: /usr/local/bin/pihole -up