mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2026-03-12 15:52:12 +01:00
Flip logic on its head and check for existence only rather than content per contributor suggestion
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Test for cmdline path
|
- name: Test for cmdline path
|
||||||
command: grep -E "console=|rootfstype" /boot/cmdline.txt
|
stat:
|
||||||
|
path: /boot/firmware/cmdline.txt
|
||||||
register: boot_cmdline_path
|
register: boot_cmdline_path
|
||||||
failed_when: false
|
failed_when: false
|
||||||
changed_when: false
|
changed_when: false
|
||||||
@@ -10,11 +11,11 @@
|
|||||||
cmdline_path: >-
|
cmdline_path: >-
|
||||||
{{
|
{{
|
||||||
(
|
(
|
||||||
boot_cmdline_path.rc == 0 and
|
boot_cmdline_path.stat.exists and
|
||||||
ansible_facts.lsb.description | default('') is match('Debian.*(?!(bookworm|sid))')
|
ansible_facts.lsb.description | default('') is match('Debian.*(?!(bookworm|sid))')
|
||||||
) | ternary(
|
) | ternary(
|
||||||
'/boot/cmdline.txt',
|
'/boot/firmware/cmdline.txt',
|
||||||
'/boot/firmware/cmdline.txt'
|
'/boot/cmdline.txt'
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user