Mirror of github.com/nicolabs/ansible-role-grub
Go to file
2021-03-28 12:50:56 +02:00
.github
defaults
handlers Collections FQCN. 2021-02-22 13:59:19 +01:00
meta Please edit meta/main.yml and assure we can correctly determine full role name. 2021-03-11 09:50:02 +01:00
molecule/default Use the latest collection. 2021-02-15 17:46:05 +01:00
tasks Moving to collections instead of modules shipped with Ansible. 2021-02-19 14:08:50 +01:00
vars
.ansible-lint
.gitignore Make unused variable finding work on Mac OS X 2021-03-25 15:31:31 +01:00
.gitlab-ci.yml Use newer version of Docker image. 2021-02-19 17:28:25 +01:00
.pre-commit-config.yaml Make unused variable finding work on Mac OS X 2021-03-25 15:31:31 +01:00
.travis.yml
.yamllint
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
README.md Fix GitLab build-status badge in the documentation. 2021-03-28 12:50:56 +02:00
requirements.txt
requirements.yml Update requirments to include collections. 2021-02-19 17:28:27 +01:00
SECURITY.md
tox.ini

grub

Configure grub on your system.

GitHub GitLab Quality Downloads Version
github gitlab quality downloads Version

Example Playbook

This example is taken from molecule/resources/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/resources/prepare.yml:

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

  roles:
    - role: robertdebock.bootstrap

  tasks:
    - name: make /etc/default
      file:
        path: /etc/default
        state: directory
        mode: "0755"
    - name: place bogus /etc/default/grub
      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

These 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 requirements

The following roles are used to prepare a system. You may choose to prepare your system in another way, I have tested these roles as well.

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 7, 8
debian buster, bullseye
fedora all
opensuse all
ubuntu focal, bionic

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.