Skip to content

Commit

Permalink
Merge pull request #9 from jamestait/cgroups-for-rk1
Browse files Browse the repository at this point in the history
Switch boot options location based on distro.
  • Loading branch information
geerlingguy authored Feb 15, 2024
2 parents 24d7951 + f12ace6 commit 29062a8
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Set up cluster-wide configuration.
hosts: cluster
gather_facts: false
gather_facts: true
become: true

handlers:
Expand All @@ -26,6 +26,18 @@
- "cgroup_memory=1"
- "cgroup_enable=memory"
notify: reboot-pi
when: ansible_distribution == 'Debian'

- name: Ensure cgroups are configured correctly in ubuntuEnv.txt.
ansible.builtin.replace:
path: /boot/firmware/ubuntuEnv.txt
regexp: '^(bootargs=[\w](?!.*\b{{ item }}\b).*)$'
replace: '\1 {{ item }}'
with_items:
- "cgroup_memory=1"
- "cgroup_enable=memory"
notify: reboot-pi
when: ansible_distribution == 'Ubuntu'

- name: Download K3s install script.
ansible.builtin.get_url:
Expand Down

0 comments on commit 29062a8

Please sign in to comment.