refactor: replace docker stack with k3s/containerd

This commit is contained in:
2022-01-02 17:30:56 +01:00
parent 7dd4c118c8
commit 2fccdd0283
9 changed files with 87 additions and 3 deletions

View File

@ -0,0 +1,18 @@
- name: Add apt key
apt_key:
url: https://download.docker.com/linux/debian/gpg
- name: Add docker-ce repository
apt_repository:
repo: deb [arch={{ arch | default('armhf') }}] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable
state: present
filename: 'docker'
- meta: flush_handlers
- name: Install containerd.io
apt:
name:
- containerd.io
state: present

View File

@ -0,0 +1,20 @@
---
- name: Download k3s binary
get_url:
url: "{{ k3s_url}}"
dest: "/usr/local/bin/k3s"
mode: 0755
force: yes
- name: Copy systemd script
template:
src: k3s.service.j2
dest: /etc/systemd/system/k3s.service
notify: restart k3s
- name: Ensure k3s service is started
systemd:
name: k3s
enabled: yes
daemon_reload: yes
state: started

View File

@ -0,0 +1,3 @@
---
- include_tasks: containerd.yml
- include_tasks: k3s.yml