mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-ansible-private.git
synced 2025-10-27 08:43:05 +00:00
Update roles/kubernetes/tasks/main.yml
This commit is contained in:
@ -4,60 +4,60 @@
|
|||||||
state: stopped
|
state: stopped
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
- name: Disable SWAP
|
- name: Disable SWAP
|
||||||
shell: |
|
shell: |
|
||||||
swapoff -a
|
swapoff -a
|
||||||
|
|
||||||
- name: Disable SWAP in fstab
|
- name: Disable SWAP in fstab
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/fstab
|
path: /etc/fstab
|
||||||
regexp: '^.*swap.*$'
|
regexp: '^.*swap.*$'
|
||||||
line: '#\0'
|
line: '#\0'
|
||||||
backrefs: yes
|
backrefs: yes
|
||||||
|
|
||||||
- name: ensure net.bridge.bridge-nf-call-ip6tables is set to 1
|
- name: ensure net.bridge.bridge-nf-call-ip6tables is set to 1
|
||||||
sysctl:
|
sysctl:
|
||||||
name: net.bridge.bridge-nf-call-iptables
|
name: net.bridge.bridge-nf-call-iptables
|
||||||
value: '1'
|
value: '1'
|
||||||
state: present
|
state: present
|
||||||
reload: yes
|
reload: yes
|
||||||
|
|
||||||
- name: Installation of apt-utils
|
- name: Installation of apt-utils
|
||||||
apt:
|
apt:
|
||||||
name: apt-transport-https
|
name: apt-transport-https
|
||||||
state: present
|
state: present
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
|
||||||
- name: Adding Docker GPG key
|
- name: Adding Docker GPG key
|
||||||
ansible.builtin.apt_key:
|
ansible.builtin.apt_key:
|
||||||
url: https://download.docker.com/linux/ubuntu/gpg
|
url: https://download.docker.com/linux/ubuntu/gpg
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Adding Docker Repository
|
- name: Adding Docker Repository
|
||||||
apt_repository:
|
apt_repository:
|
||||||
repo: deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable
|
repo: deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Installation of Docker
|
- name: Installation of Docker
|
||||||
apt:
|
apt:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: present
|
state: present
|
||||||
loop:
|
loop:
|
||||||
- docker-ce
|
- docker-ce
|
||||||
- docker-ce-cli
|
- docker-ce-cli
|
||||||
- containerd.io
|
- containerd.io
|
||||||
- docker-compose
|
- docker-compose
|
||||||
|
|
||||||
- name: Setting value of SystemdCgroup
|
- name: Setting value of SystemdCgroup
|
||||||
shell: |
|
shell: |
|
||||||
containerd config default | sudo tee /etc/containerd/config.toml | grep SystemdCgroup
|
containerd config default | sudo tee /etc/containerd/config.toml | grep SystemdCgroup
|
||||||
sed -i 's/SystemdCgroup = false/SystemdCgroup = true/g' /etc/containerd/config.toml
|
sed -i 's/SystemdCgroup = false/SystemdCgroup = true/g' /etc/containerd/config.toml
|
||||||
|
|
||||||
- name : Starting Service of Docker
|
- name : Starting Service of Docker
|
||||||
service:
|
service:
|
||||||
name: docker
|
name: docker
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: yes
|
||||||
|
|
||||||
|
|
||||||
- name: Adicionar chave GPG do Kubernetes
|
- name: Adicionar chave GPG do Kubernetes
|
||||||
|
|||||||
Reference in New Issue
Block a user