mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2025-12-26 00:22:36 +01:00
Add archlinux (aarch64) support (#146)
* Add archlinux (aarch64) support Signed-off-by: Assaf Sapir <meijin007@gmail.com>
This commit is contained in:
@@ -9,6 +9,7 @@ Build a Kubernetes cluster using Ansible with k3s. The goal is easily install a
|
|||||||
- [X] Debian
|
- [X] Debian
|
||||||
- [X] Ubuntu
|
- [X] Ubuntu
|
||||||
- [X] CentOS
|
- [X] CentOS
|
||||||
|
- [X] ArchLinux
|
||||||
|
|
||||||
on processor architecture:
|
on processor architecture:
|
||||||
|
|
||||||
|
|||||||
@@ -24,13 +24,13 @@
|
|||||||
content: "br_netfilter"
|
content: "br_netfilter"
|
||||||
dest: /etc/modules-load.d/br_netfilter.conf
|
dest: /etc/modules-load.d/br_netfilter.conf
|
||||||
mode: "u=rw,g=,o="
|
mode: "u=rw,g=,o="
|
||||||
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux','RedHat']
|
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux', 'RedHat', 'Archlinux']
|
||||||
|
|
||||||
- name: Load br_netfilter
|
- name: Load br_netfilter
|
||||||
community.general.modprobe:
|
community.general.modprobe:
|
||||||
name: br_netfilter
|
name: br_netfilter
|
||||||
state: present
|
state: present
|
||||||
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux','RedHat']
|
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux', 'RedHat', 'Archlinux']
|
||||||
|
|
||||||
- name: Set bridge-nf-call-iptables (just to be sure)
|
- name: Set bridge-nf-call-iptables (just to be sure)
|
||||||
ansible.posix.sysctl:
|
ansible.posix.sysctl:
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
value: "1"
|
value: "1"
|
||||||
state: present
|
state: present
|
||||||
reload: true
|
reload: true
|
||||||
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux','RedHat']
|
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux', 'RedHat', 'Archlinux']
|
||||||
loop:
|
loop:
|
||||||
- net.bridge.bridge-nf-call-iptables
|
- net.bridge.bridge-nf-call-iptables
|
||||||
- net.bridge.bridge-nf-call-ip6tables
|
- net.bridge.bridge-nf-call-ip6tables
|
||||||
|
|||||||
@@ -33,6 +33,14 @@
|
|||||||
( ansible_facts.lsb.id|default("") == "Debian" or
|
( ansible_facts.lsb.id|default("") == "Debian" or
|
||||||
ansible_facts.lsb.description|default("") is match("Debian") )
|
ansible_facts.lsb.description|default("") is match("Debian") )
|
||||||
|
|
||||||
|
- name: Set detected_distribution to ArchLinux (ARM64)
|
||||||
|
set_fact:
|
||||||
|
detected_distribution: Archlinux
|
||||||
|
when:
|
||||||
|
- ansible_facts.architecture is search("aarch64")
|
||||||
|
- raspberry_pi|default(false)
|
||||||
|
- ansible_facts.os_family is match("Archlinux")
|
||||||
|
|
||||||
- name: Set detected_distribution_major_version
|
- name: Set detected_distribution_major_version
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
detected_distribution_major_version: "{{ ansible_facts.lsb.major_release }}"
|
detected_distribution_major_version: "{{ ansible_facts.lsb.major_release }}"
|
||||||
|
|||||||
14
roles/raspberrypi/tasks/prereq/Archlinux.yml
Normal file
14
roles/raspberrypi/tasks/prereq/Archlinux.yml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
- name: Enable cgroup via boot commandline if not already enabled for Archlinux
|
||||||
|
lineinfile:
|
||||||
|
path: /boot/boot.txt
|
||||||
|
search_string: setenv bootargs console=ttyS1,115200 console=tty0 root=PARTUUID=${uuid} rw rootwait smsc95xx.macaddr="${usbethaddr}"
|
||||||
|
line: setenv bootargs console=ttyS1,115200 console=tty0 root=PARTUUID=${uuid} rw rootwait smsc95xx.macaddr="${usbethaddr}" cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory
|
||||||
|
register: kernel_cmdline_cgroup
|
||||||
|
|
||||||
|
- name: Create
|
||||||
|
shell: ./mkscr
|
||||||
|
args:
|
||||||
|
chdir: /boot
|
||||||
|
notify: reboot
|
||||||
|
when: kernel_cmdline_cgroup.changed
|
||||||
Reference in New Issue
Block a user