mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2025-12-25 00:12:37 +01:00
Merge pull request #38 from fnord123/ubuntu2004
Add support for Ubuntu 20.04
This commit is contained in:
@@ -7,7 +7,7 @@ Author: <https://github.com/itwars>
|
|||||||
Build a Kubernetes cluster using Ansible with k3s. The goal is easily install a Kubernetes cluster on machines running:
|
Build a Kubernetes cluster using Ansible with k3s. The goal is easily install a Kubernetes cluster on machines running:
|
||||||
|
|
||||||
- [X] Debian
|
- [X] Debian
|
||||||
- [ ] Ubuntu
|
- [X] Ubuntu
|
||||||
- [X] CentOS
|
- [X] CentOS
|
||||||
|
|
||||||
on processor architecture:
|
on processor architecture:
|
||||||
|
|||||||
14
roles/ubuntu/tasks/main.yml
Normal file
14
roles/ubuntu/tasks/main.yml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
- name: Enable cgroup via boot commandline if not already enabled
|
||||||
|
lineinfile:
|
||||||
|
path: /boot/firmware/cmdline.txt
|
||||||
|
backrefs: yes
|
||||||
|
regexp: '^((?!.*\bcgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\b).*)$'
|
||||||
|
line: '\1 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory'
|
||||||
|
when:
|
||||||
|
- ansible_distribution == 'Ubuntu'
|
||||||
|
|
||||||
|
- name: Reboot to enable cgroups
|
||||||
|
reboot:
|
||||||
|
when:
|
||||||
|
- ansible_distribution == 'Ubuntu'
|
||||||
Reference in New Issue
Block a user