This repository has been archived by the owner on Apr 29, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathprep.yml
executable file
·65 lines (58 loc) · 1.76 KB
/
prep.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
#!/usr/local/bin/ansible-playbook
# Purpose:
# - build k3s on target host
############################################################################
# Localhost Prep Tasks
- name: 'CCIO | Kargo | Prep | prepare host for Kargo'
hosts: kargo
become: true
vars:
module: "prep"
ansible_name_module: "Konductor | CCIO | {{ ansible_os_family }} | {{ module }}"
vars_files:
- 'vars/global.yml'
- 'vars/{{ ansible_os_family }}.yml'
tasks:
# - name: '{{ ansible_name_module }} | command | disable selinux'
# command:
# cmd: 'setenforce 0'
# ignore_errors: true
# changed_when: false
- name: Enable IPv4 forwarding
sysctl:
name: net.ipv4.ip_forward
value: "1"
state: present
reload: yes
- name: Enable IPv6 forwarding
sysctl:
name: net.ipv6.conf.all.forwarding
value: "1"
state: present
reload: yes
- name: Add br_netfilter to /etc/modules-load.d/
copy:
content: "br_netfilter"
dest: /etc/modules-load.d/br_netfilter.conf
mode: "u=rw,g=,o="
- name: Load br_netfilter
modprobe:
name: br_netfilter
state: present
- name: Set bridge-nf-call-iptables (just to be sure)
sysctl:
name: "{{ item }}"
value: "1"
state: present
reload: yes
loop:
- net.bridge.bridge-nf-call-iptables
- net.bridge.bridge-nf-call-ip6tables
- name: Add /usr/local/bin to sudo secure_path
lineinfile:
line: 'Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin'
regexp: "Defaults(\\s)*secure_path(\\s)*="
state: present
insertafter: EOF
path: /etc/sudoers
validate: 'visudo -cf %s'