[RHEL10] '/etc/kernel/cmdline'. file not found

Here are some helpful considerations when filing a bug:

  • What version of apnscp are you running? v3.2.48
  • Which version of RHEL or CentOS are you using? Rocky 10
  • Can you reproduce this bug reliably? Running the installer with default options.

I’m using this official image in my local setup: https://dl.rockylinux.org/pub/rocky/10/images/x86_64/Rocky-10-GenericCloud-Base.latest.x86_64.qcow2

TASK [system/kernel : Add usrquota,grpquota,prjquota to grub] ***************************************************************************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! =>
  msg: |-
    The conditional check 'not lookup("file", kernel_boot_cmdline) is regex(regex_preamble + ".*?(?:\\s|\\b)rootflags=", multiline=True)' failed. The error was: The 'file' lookup had an issue accessing the file '/etc/kernel/cmdline'. file not found, use -vvvvv to see paths searched

    The error appears to be in '/usr/local/apnscp/resources/playbooks/roles/system/kernel/tasks/set-kernel-opts.yml': line 7, column 5, but may
    be elsewhere in the file depending on the exact syntax problem.

    The offending line appears to be:

    - block:
      - name: "{{ (state | default('present') == 'absent') | ternary('Remove', 'Add') }} {{ rootflags | join(',') }} to grub"
        ^ here