Unverified Commit 057b3bfc authored by Assaf Sapir's avatar Assaf Sapir Committed by GitHub
Browse files

Add archlinux (aarch64) support (#146)



* Add archlinux (aarch64) support

Signed-off-by: default avatarAssaf Sapir <meijin007@gmail.com>
parent 83de4312
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ Build a Kubernetes cluster using Ansible with k3s. The goal is easily install a
- [X] Debian
- [X] Ubuntu
- [X] CentOS
- [X] ArchLinux

on processor architecture:

+3 −3
Original line number Diff line number Diff line
@@ -24,13 +24,13 @@
    content: "br_netfilter"
    dest: /etc/modules-load.d/br_netfilter.conf
    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
  community.general.modprobe:
    name: br_netfilter
    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)
  ansible.posix.sysctl:
@@ -38,7 +38,7 @@
    value: "1"
    state: present
    reload: true
  when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux','RedHat']
  when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux', 'RedHat', 'Archlinux']
  loop:
    - net.bridge.bridge-nf-call-iptables
    - net.bridge.bridge-nf-call-ip6tables
+8 −0
Original line number Diff line number Diff line
@@ -33,6 +33,14 @@
    ( ansible_facts.lsb.id|default("") == "Debian" or
      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
  ansible.builtin.set_fact:
    detected_distribution_major_version: "{{ ansible_facts.lsb.major_release }}"
+14 −0
Original line number Diff line number Diff line
---
- 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