Hey guys, I want set the GRUB_DEFAULT Variable accordingly to a specified kernel version. I'm not quite sure how to do it in an ansible clean way.
Pseudo code which explains the desired task
-----------------------
var kernelversion="5.0.3"
// file: /boot/grub/grub.cfg
parse_grub_cfg(kernelversion){
return(entry)
// entry=2>1 or 3>2, ....
}
file: /etc/default/grub
set_grub(entry)
-------------------------------
How can I achieve the task?
Solution A)
write an complete own module which parses the /boot/grub/grub.cfg file and
than edits the /etc/default/grub file
Solution B)
write a custom fact. The custom fact sets the correct entry as new ansible
variable than call the liniefile module to edit the /etc/default/grub file
Solution C)
call the script module with the parsing script
Solution D)
something complete different
Attached is the script for parsing the /boot/grub/grub.cfg
--
You received this message because you are subscribed to the Google Groups
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to ansible-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-devel/ae948136-9d5a-4056-82ac-ebd54abfe5feo%40googlegroups.com.
func
Description: Binary data
