diff --git a/roles/kubernetes/tasks/main.yml b/roles/kubernetes/tasks/main.yml index 19d1499..9fb9590 100644 --- a/roles/kubernetes/tasks/main.yml +++ b/roles/kubernetes/tasks/main.yml @@ -4,60 +4,60 @@ state: stopped enabled: false - - name: Disable SWAP - shell: | - swapoff -a +- name: Disable SWAP + shell: | + swapoff -a - - name: Disable SWAP in fstab - lineinfile: - path: /etc/fstab - regexp: '^.*swap.*$' - line: '#\0' - backrefs: yes +- name: Disable SWAP in fstab + lineinfile: + path: /etc/fstab + regexp: '^.*swap.*$' + line: '#\0' + backrefs: yes - - name: ensure net.bridge.bridge-nf-call-ip6tables is set to 1 - sysctl: - name: net.bridge.bridge-nf-call-iptables - value: '1' - state: present - reload: yes +- name: ensure net.bridge.bridge-nf-call-ip6tables is set to 1 + sysctl: + name: net.bridge.bridge-nf-call-iptables + value: '1' + state: present + reload: yes - - name: Installation of apt-utils - apt: - name: apt-transport-https - state: present - update_cache: yes +- name: Installation of apt-utils + apt: + name: apt-transport-https + state: present + update_cache: yes - - name: Adding Docker GPG key - ansible.builtin.apt_key: - url: https://download.docker.com/linux/ubuntu/gpg - state: present +- name: Adding Docker GPG key + ansible.builtin.apt_key: + url: https://download.docker.com/linux/ubuntu/gpg + state: present - - name: Adding Docker Repository - apt_repository: - repo: deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable - state: present +- name: Adding Docker Repository + apt_repository: + repo: deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable + state: present - - name: Installation of Docker - apt: - name: "{{ item }}" - state: present - loop: - - docker-ce - - docker-ce-cli - - containerd.io - - docker-compose +- name: Installation of Docker + apt: + name: "{{ item }}" + state: present + loop: + - docker-ce + - docker-ce-cli + - containerd.io + - docker-compose - - name: Setting value of SystemdCgroup - shell: | - containerd config default | sudo tee /etc/containerd/config.toml | grep SystemdCgroup - sed -i 's/SystemdCgroup = false/SystemdCgroup = true/g' /etc/containerd/config.toml +- name: Setting value of SystemdCgroup + shell: | + containerd config default | sudo tee /etc/containerd/config.toml | grep SystemdCgroup + sed -i 's/SystemdCgroup = false/SystemdCgroup = true/g' /etc/containerd/config.toml - - name : Starting Service of Docker - service: - name: docker - state: started - enabled: yes +- name : Starting Service of Docker + service: + name: docker + state: started + enabled: yes - name: Adicionar chave GPG do Kubernetes