Mirror of github.com/nicolabs/ansible-role-grub
Go to file
2022-03-14 20:57:43 +01:00
.github New version of GitHub Action and a new container for GitLab. 2022-02-14 09:47:44 +01:00
defaults Made grub_timeout and grub_recordfail_timeout optional 2022-03-14 20:22:01 +01: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 Tox will try Ansible 4 and 5. 2022-01-26 13:13:20 +01:00
tasks Added grub_default_options to define GRUB_CMDLINE_LINUX_DEFAULT 2022-03-14 20:57:43 +01: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 New version of GitHub Action and a new container for GitLab. 2022-02-14 09:47:44 +01:00
.pre-commit-config.yaml Add unquoted value finder. 2021-12-06 10:06:31 +01: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
CONTRIBUTING.md
LICENSE Happy 2022! 2022-01-01 11:48:35 +01:00
README.md Add ansible-later and implement advices. 2021-10-11 17:15:02 +02:00
requirements.txt
requirements.yml Remove not-required collections, add collections that are required, FQCN. 2022-01-25 21:52:54 +01:00
SECURITY.md
tox.ini Tox will try Ansible 4 and 5. 2022-01-26 13:13:20 +01: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.