Skip to content
Snippets Groups Projects
Commit 8bee77c0 authored by Peter Toth's avatar Peter Toth
Browse files

Upload New File

parent 078f83b3
No related branches found
No related tags found
No related merge requests found
- hosts: worker_nodes
become: true
become_user: root
tasks:
- name: Stop service containerd
ansible.builtin.systemd:
name: containerd
state: stopped
- name: Stop service kubelet
ansible.builtin.systemd:
name: kubelet
state: stopped
- name: Check for /etc/containerd/config.toml
register: toml_file
stat: path=/etc/containerd/config.toml
- name: Move toml file
command: mv /etc/containerd/config.toml /etc/containerd/config.toml.dist
when: toml_file.stat.exists
- name: Create toml file
shell: |
containerd config default | tee /etc/containerd/config.toml
- name: Change SystemdCgroup to true
shell: |
sed -i 's/SystemdCgroup = false/SystemdCgroup = true/' /etc/containerd/config.toml
- name: Start service containerd
ansible.builtin.systemd:
name: containerd
state: started
- name: Start service kubelet
ansible.builtin.systemd:
name: kubelet
state: started
- name: Copy the join command to server location
ansible.builtin.copy:
src: tmp/master-node/tmp/join-command
dest: /tmp/join-command.sh
mode: 0777
- name: Setup kubeconfig for vagrant user
command: "{{ item }}"
with_items:
- sh /tmp/join-command.sh
- rm /tmp/join-command.sh
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment