Compare commits

...

8 Commits

Author SHA1 Message Date
Daniel SP
a7a932320d Merge d325eae726 into 3b74985767 2024-02-27 04:39:14 +00:00
Daniel San Pedro
d325eae726 Add LSB release checks. This is untested atm. 2024-02-26 23:39:07 -05:00
Techno Tim
25d696c762 Merge branch 'master' into raspbian-cgroups-fix 2024-02-26 22:10:04 -06:00
dependabot[bot]
3b74985767 chore(deps): bump ansible-core from 2.16.3 to 2.16.4 (#459)
Bumps [ansible-core](https://github.com/ansible/ansible) from 2.16.3 to 2.16.4.
- [Release notes](https://github.com/ansible/ansible/releases)
- [Commits](https://github.com/ansible/ansible/compare/v2.16.3...v2.16.4)

---
updated-dependencies:
- dependency-name: ansible-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-27 04:05:58 +00:00
Techno Tim
c057a436a1 Merge branch 'master' into raspbian-cgroups-fix 2024-02-26 21:38:29 -06:00
Daniel SP
0919571744 Merge branch 'master' into raspbian-cgroups-fix 2024-02-24 21:26:40 -05:00
Daniel San Pedro
7db9f5bd9b Add check and variable so that we write to the correct file 2024-02-24 21:25:55 -05:00
Daniel San Pedro
842bfd8de9 Fix cgroups cmdline path 2024-02-24 16:53:51 -05:00
2 changed files with 12 additions and 2 deletions

View File

@@ -6,7 +6,7 @@
# #
ansible-compat==4.1.11 ansible-compat==4.1.11
# via molecule # via molecule
ansible-core==2.16.3 ansible-core==2.16.4
# via # via
# -r requirements.in # -r requirements.in
# ansible-compat # ansible-compat

View File

@@ -1,7 +1,17 @@
--- ---
- name: Test for cmdline path
command: grep -E "console=|rootfstype" /boot/cmdline.txt
register: boot_cmdline_path
failed_when: false
changed_when: false
- name: Set cmdline path based on Debian version and boot_cmdline_path result
set_fact:
cmdline_path: "{{ (boot_cmdline_path.rc == 0 and ansible_facts['distribution'] == 'Debian' and ansible_facts['distribution_version'] is version('bookworm', '<')) | ternary('/boot/cmdline.txt', '/boot/firmware/cmdline.txt') }}"
- name: Activating cgroup support - name: Activating cgroup support
lineinfile: lineinfile:
path: /boot/cmdline.txt path: "{{ cmdline_path }}"
regexp: '^((?!.*\bcgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\b).*)$' regexp: '^((?!.*\bcgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory\b).*)$'
line: '\1 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory' line: '\1 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory'
backrefs: true backrefs: true