--- - 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