This repository was archived by the owner on Apr 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.yml
More file actions
73 lines (62 loc) · 1.61 KB
/
install.yml
File metadata and controls
73 lines (62 loc) · 1.61 KB
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
- name: Install
hosts: routers
tasks:
- name: Add debian sid repo
apt_repository:
repo: deb http://deb.debian.org/debian/ sid main
state: present
- name: Add natesales apt repo
apt_repository:
repo: deb [trusted=yes] https://repo.natesales.net/apt /
state: present
- name: Set default release
copy:
content: APT::Default-Release "stable";
dest: /etc/apt/apt.conf.d/default-release
- name: Install required system packages
apt:
update_cache: yes
pkg:
- rsync
- bind9
- curl
- dnsutils
- ufw
- bsdmainutils
- bcg
- name: Install BIRD2 from sid
apt:
name: bird2
default_release: sid
- name: Create bcg directory
file:
path: /etc/bcg/
state: directory
- name: Copy bcg config
copy:
content: "{{ bcg }}"
dest: /etc/bcg/config.json
register: bcg
- name: Reload bcg config
shell: bcg -c /etc/bcg/config.json
when: bcg.changed
- name: Add bcg crontab entry
cron:
name: "bcg update"
hour: "*/12"
minute: "0"
job: "/usr/local/bin/bcg -c /etc/bcg/config.json"
- name: Add BGP aliases
copy:
content: |
alias b="birdc"
alias bgps="birdc s p | column -t"
dest: /root/.bashrc
- name: Set sysctl tuning values
template:
src: sysctl.conf
dest: /etc/sysctl.conf
register: sysctl
- name: Reload sysctl values
shell: sysctl -p
when: sysctl.changed