You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.1 KiB
55 lines
1.1 KiB
---
|
|
- name: Setup Environment for Kubernetes
|
|
strategy: free
|
|
hosts: all
|
|
vars:
|
|
ansible_user: ansible
|
|
ansible_ssh_private_key_file: "~/.ssh/ansible-private-key"
|
|
become: true
|
|
|
|
tasks:
|
|
- name: Enable TCP ports
|
|
ufw:
|
|
proto: tcp
|
|
rule: allow
|
|
port: '{{ item }}'
|
|
loop:
|
|
- 80
|
|
- 443
|
|
- 2379
|
|
- 2380
|
|
- 6443
|
|
- 9099
|
|
- 10250
|
|
- 10254
|
|
- 30000:32767
|
|
|
|
- name: Enable UDP ports
|
|
ufw:
|
|
proto: udp
|
|
rule: allow
|
|
port: '{{ item }}'
|
|
loop:
|
|
- 8472
|
|
- 4789
|
|
- 30000:32767
|
|
|
|
- name: Download Docker Install Script 20.10
|
|
get_url:
|
|
url: https://releases.rancher.com/install-docker/20.10.sh
|
|
dest: /root/install-docker.sh
|
|
mode: 0700
|
|
owner: root
|
|
group: root
|
|
|
|
- name: Install Docker 20.10
|
|
shell:
|
|
cmd: /root/install-docker.sh
|
|
creates: /usr/bin/docker
|
|
|
|
- name: Set sysctl setting
|
|
sysctl:
|
|
name: net.bridge.bridge-nf-call-iptables
|
|
value: '1'
|
|
state: present
|