Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update GRUB command line only if parameters change
The grubcmdline role can be invoked like in the following example: - name: Set iommu=pt include_role: name: stackhpc.linux.grubcmdline vars: kernel_cmdline: - iommu=pt kernel_cmdline_remove: - ^iommu= When the role is called multiple times with parameters kernel_cmdline and kernel_cmdline_remove, each execution moves its kernel parameters at the end of the command line. This means each full execution would always update GRUB, even when the end result would be the same. Fix by comparing the existing command line with the newly generated one as sets and only updating GRUB_CMDLINE_LINUX_DEFAULT if they are different.
- Loading branch information