-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathB4.yml
78 lines (65 loc) · 1.57 KB
/
B4.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
---
- hosts: localhost
any_errors_fatal: true
gather_facts: no
tasks:
- name: Update the machine
tags: upd
yum:
update_only: yes
- name: Install General Essential packages
tags: essentials
yum:
name:
- nano
- net-tools
- tcpdump
- nmap
- wireshark
- git
- wget
- iproute
- psmisc
- yum-utils
- chrony
- telnet
- iptables-services
state: present
- name: install several packages in cae of deleting iptables
tags: iptables
yum:
name:
- iptables
- iproute
- dhclient
- plymouth
- initscripts
- kbd
- kexec-tools
- dracut
- firewalld
- iptables-services
- mlocate
state: present
- name: Set the Timezone.
tags: NTP
shell: |
timedatectl set-ntp true
timedatectl set-timezone Europe/Berlin
- name: Edit "/etc/sysctl.conf" file
tags: sysctl
lineinfile:
path: /etc/sysctl.conf
line: " net.ipv4.ip_forward = 1 \n net.ipv6.conf.all.forwarding = 1 \n net.ipv4.conf.all.accept_redirects = 0 \n net.ipv4.conf.all.send_redirects = 0 "
- name: Create iproute file
tags: routing
ansible.builtin.template:
src: /root/DS-Lite_Test_Bed/files/B4-networking.txt
dest: /root/networking.sh
owner: root
mode: '755'
- name: Run networking.sh
tags: routing
shell: |
cd
./networking.sh