Mirror of github.com/nicolabs/ansible-role-grub
Go to file
2021-11-15 15:46:55 +01:00
.github Test against Fedora 34, 35 (latest) and 36/rawhide. 2021-11-15 15:46:55 +01:00
defaults Add a GRUB_RECORDFAIL_TIMEOUT option. 2020-08-23 15:22:37 +02:00
handlers Spread cmd over multiple lines, making the code a little more readable. 2021-09-22 14:08:32 +02:00
meta Add bookwork, combine bullseye+bookwork and focal+bionic to all. 2021-09-15 10:44:50 +02:00
molecule/default Add ansible-later and implement advices. 2021-10-11 17:15:02 +02:00
tasks Replace a module name for FQCN. 2021-06-10 09:53:51 +02:00
vars More readable. 2021-09-06 16:37:41 +02:00
.ansible-lint Start yaml with three dashes. 2021-03-28 12:50:56 +02:00
.gitignore Make unused variable finding work on Mac OS X 2021-03-25 15:31:31 +01:00
.gitlab-ci.yml Test against Fedora 34, 35 (latest) and 36/rawhide. 2021-11-15 15:46:55 +01:00
.later.yml Add ansible-later and implement advices. 2021-10-11 17:15:02 +02:00
.pre-commit-config.yaml Regenerate CI and docs. 2021-10-07 22:45:24 +02:00
.travis.yml Regenerate CI and docs. 2021-06-10 09:54:26 +02:00
.yamllint No rawhide, package GPG issue. 2021-02-15 15:21:53 +01:00
CODE_OF_CONDUCT.md Initial commit 2020-05-18 13:51:01 +02:00
CONTRIBUTING.md Regenerate docs and ci. 2020-08-08 17:16:54 +02:00
LICENSE It's a new year. 2021-01-12 10:41:13 +01:00
README.md Add ansible-later and implement advices. 2021-10-11 17:15:02 +02:00
requirements.txt Ansible 2.10 and up are tested 2021-01-18 09:58:57 +01:00
requirements.yml The collection community.general is required because apk and zypper. 2021-09-20 09:49:52 +02:00
SECURITY.md Add MarkDown anchors. 2020-06-04 21:11:29 +02:00
tox.ini Regernerate CI, fix molecule and tox. 2021-05-11 13:26:13 +02:00

grub

Configure grub on your system.

GitHub GitLab Quality Downloads Version
github gitlab quality downloads Version

Example Playbook

This example is taken from molecule/default/converge.yml and is tested on each push, pull request and release.

---
- name: Converge
  hosts: all
  become: yes
  gather_facts: yes

  roles:
    - role: robertdebock.grub
      grub_options:
        - option: cgroup_enable
          value: memory
        - option: systemd.unified_cgroup_hierarchy
          value: 0

The machine needs to be prepared. In CI this is done using molecule/default/prepare.yml:

---
- name: prepare
  hosts: all
  become: yes
  gather_facts: no

  roles:
    - role: robertdebock.bootstrap

  tasks:
    - name: make /etc/default
      ansible.builtin.file:
        path: /etc/default
        state: directory
        mode: "0755"

    - name: place bogus /etc/default/grub
      ansible.builtin.copy:
        content: 'GRUB_CMDLINE_LINUX="a=1"'
        dest: /etc/default/grub
        mode: "0664"

Also see a full explanation and example on how to use these roles.

Role Variables

The default values for the variables are set in defaults/main.yml:

---
# defaults file for grub

grub_timeout: 5

grub_recordfail_timeout: "{{ grub_timeout }}"

# Add options here, for example:
# grub_options:
#   - option: cgroup_enable
#     value: memory

Requirements

Status of used roles

The following roles are used to prepare a system. You can prepare your system in another way.

Requirement GitHub GitLab
robertdebock.bootstrap Build Status GitHub Build Status GitLab

Context

This role is a part of many compatible roles. Have a look at the documentation of these roles for further information.

Here is an overview of related roles: dependencies

Compatibility

This role has been tested on these container images:

container tags
alpine all
el 8
debian all
fedora all
opensuse all
ubuntu all

The minimum version of Ansible required is 2.10, tests have been done to:

  • The previous version.
  • The current version.
  • The development version.

If you find issues, please register them in GitHub

License

Apache-2.0

Author Information

Robert de Bock

Please consider sponsoring me.