Loading README.md +1 −0 Original line number Diff line number Diff line Loading @@ -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: Loading roles/prereq/tasks/main.yml +3 −3 Original line number Diff line number Diff line Loading @@ -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: Loading @@ -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 Loading roles/raspberrypi/tasks/main.yml +8 −0 Original line number Diff line number Diff line Loading @@ -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 }}" Loading roles/raspberrypi/tasks/prereq/Archlinux.yml 0 → 100644 +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 Loading
README.md +1 −0 Original line number Diff line number Diff line Loading @@ -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: Loading
roles/prereq/tasks/main.yml +3 −3 Original line number Diff line number Diff line Loading @@ -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: Loading @@ -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 Loading
roles/raspberrypi/tasks/main.yml +8 −0 Original line number Diff line number Diff line Loading @@ -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 }}" Loading
roles/raspberrypi/tasks/prereq/Archlinux.yml 0 → 100644 +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