Skip to content

Commit

Permalink
Break test into multiple lines so that we can pass lint checks
Browse files Browse the repository at this point in the history
  • Loading branch information
yebo29 committed Feb 27, 2024
1 parent d325eae commit cd38ba5
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions roles/raspberrypi/tasks/setup/Raspbian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,18 @@
failed_when: false
changed_when: false

- name: Set cmdline path based on Debian version and boot_cmdline_path result
- name: Set cmdline path based on Debian version and command 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') }}"
cmdline_path: >-
{{
(
boot_cmdline_path.rc == 0 and
ansible_facts.lsb.description | default('') is match('Debian.*(?!(bookworm|sid))')
) | ternary(
'/boot/cmdline.txt',
'/boot/firmware/cmdline.txt'
)
}}
- name: Activating cgroup support
lineinfile:
Expand Down

0 comments on commit cd38ba5

Please sign in to comment.