k3s-io / k3s-ansible

Apache License 2.0
1.89k stars 780 forks source link

Installation fails when on Rpi when booting from network #312

Closed jlpedrosa closed 3 months ago

jlpedrosa commented 3 months ago

The step to enable cgroups still fails after https://github.com/k3s-io/k3s-ansible/pull/300/files in RPI when cmdline.txt is not present. The warning is displayed, but the step is not skipped.

TASK [raspberrypi : Enable cgroup via boot commandline if not already enabled] ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
[WARNING]: Unable to find '/boot/firmware' in expected paths (use -vvvvv to see paths)
fatal: [10.50.30.23]: FAILED! => {"changed": false, "msg": "Destination /boot/firmware/cmdline.txt does not exist !", "rc": 257}

maybe the condtion needs to me changed as:

when: lookup('fileglob', '/boot/firmware/cmdline.txt', errors='warn') | length == 0
to
when: lookup('fileglob', '/boot/firmware/cmdline.txt', errors='warn') | length > 0