mirror of
https://github.com/nicolabs/ansible-role-grub.git
synced 2026-04-10 12:41:49 +02:00
Moving to collections instead of modules shipped with Ansible.
This commit is contained in:
parent
8244ddde1e
commit
bc5d77a50b
|
|
@ -9,4 +9,4 @@
|
|||
- reboot
|
||||
|
||||
- name: reboot
|
||||
reboot:
|
||||
ansible.builtin.reboot:
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
---
|
||||
roles:
|
||||
- name: robertdebock.bootstrap
|
||||
collections:
|
||||
- name: ansible.builtin
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
|
||||
- name: test if grub_timeout is set correctly
|
||||
assert:
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- grub_timeout is defined
|
||||
- grub_timeout is number
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
quiet: yes
|
||||
|
||||
- name: test if grub_recordfail_timeout is set correctly
|
||||
assert:
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- grub_recordfail_timeout is defined
|
||||
- grub_recordfail_timeout is number
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
quiet: yes
|
||||
|
||||
- name: test if grub_options is set correctly
|
||||
assert:
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- grub_options is iterable
|
||||
quiet: yes
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
- grub_options is defined
|
||||
|
||||
- name: test if item in grub_options is set correctly
|
||||
assert:
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- item.option is defined
|
||||
- item.option is string
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@
|
|||
delegate_to: localhost
|
||||
|
||||
- name: install required packages
|
||||
package:
|
||||
ansible.builtin.package:
|
||||
name: "{{ grub_packages }}"
|
||||
state: present
|
||||
|
||||
- name: set GRUB_TIMEOUT
|
||||
lineinfile:
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/default/grub
|
||||
line: GRUB_TIMEOUT={{ grub_timeout }}
|
||||
create: yes
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
- update grub
|
||||
|
||||
- name: set GRUB_RECORDFAIL_TIMEOUT
|
||||
lineinfile:
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/default/grub
|
||||
line: GRUB_RECORDFAIL_TIMEOUT={{ grub_recordfail_timeout }}
|
||||
create: yes
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
- update grub
|
||||
|
||||
- name: add options to GRUB_CMDLINE_LINUX
|
||||
replace:
|
||||
ansible.builtin.replace:
|
||||
path: /etc/default/grub
|
||||
regexp: '^GRUB_CMDLINE_LINUX="((:?(?!{{ item.option }}={{ item.value }}).)*?)"$'
|
||||
replace: 'GRUB_CMDLINE_LINUX="\1 {{ item.option }}={{ item.value }}"'
|
||||
|
|
@ -46,4 +46,4 @@
|
|||
- grub_options | length > 0
|
||||
|
||||
- name: flush handlers
|
||||
meta: flush_handlers
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
|
|
|||
Loading…
Reference in a new issue