Default variable details

Some of debops.grub default variables have more extensive configuration than simple strings or lists, here you can find documentation and examples for them.


The grub__*_configuration variables define the contents of the /etc/default/grub.d/ansible.cfg configuration file. The variables are lists of YAML dictionaries, the dictionaries with the same name parameter are merged together in an order specified by the grub__combined_configuration variable, which allows some of the configuration to be modified via Ansible inventory or other Ansible roles.


Configure unattended filesystem check and repair on boot:

  - name: 'cmdline_linux_default'
      - 'fsck.mode=force'

Remove the quiet parameter from the default kernel command line:

  - name: 'cmdline_linux_default'
      - name: 'quiet'
        state: 'absent'


Each variable contains a list of YAML dictionaries, each dictionary defines a configuration file option using specific parameters:


Required. Name of a GRUB option, it's also used as an anchor for merging multiple configuration entries together.

The option name should be specified as lowercase, without the GRUB_ prefix. For example:

GRUB_DEFAULT       -> 'default'
GRUB_CMDLINE_LINUX -> 'cmdline_linux'

You can specify the full names with uppercase, but they will not be automatically merged with existing configuration.


The value which should be set for a given GRUB option. Values can be YAML booleans, numbers, strings or lists of strings. Additionally, in a list you can specify values in an extended format as a YAML dictionary with parameters:

The value you want to manage, a string.
If not specified or present, the value will be included in the configuration. If absent, the value will be removed from the configuration. If ignore, a given entry will not be evaluated by the role.

The value parameters that contain YAML lists from multiple configuration entries are merged together.

Optional. Specify the state of a given configuration entry. If not specified or present, the entry will be set in the GRUB configuration file. If absent, the entry will be removed from the configuration file. If ignore, this configuration entry will not be evaluated by the role.
Optional. String or a YAML text block with a comment added to a given configuration option in the GRUB config file.
Optional, boolean. If not specified or True, the value will be quoted. If False, the value will not be quoted.
Optional, boolean. If True, the role will add $GRUB_<NAME> string to the given configuration option, based on the entry name. This allows to preserve existing GRUB options from the /etc/default/grub; this is useful only for specific options like kernel parameters.
Optional, boolean. if True, the option will be exported in the GRUB environment by adding the export prefix in the configuration file. This is only needed in specific configuration scenarios.