Mirror of github.com/nicolabs/ansible-role-grub
Go to file
2021-02-15 15:21:53 +01:00
.github No rawhide, package GPG issue. 2021-02-15 15:21:53 +01:00
defaults Add a GRUB_RECORDFAIL_TIMEOUT option. 2020-08-23 15:22:37 +02:00
handlers Empty line to start and dont restart when in checkmode, software is missing. 2020-11-24 20:50:17 +01:00
meta Prepare fo Ansible 2.10 only. 2021-01-17 13:43:20 +01:00
molecule/default No rawhide, package GPG issue. 2021-02-15 15:21:53 +01:00
tasks Assert on localhost, makes the play stop if the assertion fails. 2021-01-18 09:59:08 +01:00
vars Consistent newlines. 2020-07-06 09:50:22 +02:00
.ansible-lint No rawhide, package GPG issue. 2021-02-15 15:21:53 +01:00
.gitignore Initial commit 2020-05-18 13:51:01 +02:00
.gitlab-ci.yml No rawhide, package GPG issue. 2021-02-15 15:21:53 +01:00
.pre-commit-config.yaml Add pre-commit hooks to find empty files and unused variables. 2021-01-12 10:41:10 +01:00
.travis.yml Much simpler, save build-minutes. 2020-12-04 14:17:35 +01: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 No Travis, Ansible 2.10. 2021-01-18 09:58:46 +01:00
requirements.txt Ansible 2.10 and up are tested 2021-01-18 09:58:57 +01:00
requirements.yml New format for requirements, prepared for collections. 2020-11-01 20:18:15 +01:00
SECURITY.md Add MarkDown anchors. 2020-06-04 21:11:29 +02:00
tox.ini No rawhide, package GPG issue. 2021-02-15 15:21:53 +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/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.