diff --git a/handlers/main.yml b/handlers/main.yml index 423babe..ec6eb16 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -9,4 +9,4 @@ - reboot - name: reboot - reboot: + ansible.builtin.reboot: diff --git a/requirements.yml b/requirements.yml index 11e3224..1013b37 100644 --- a/requirements.yml +++ b/requirements.yml @@ -1,3 +1,5 @@ --- roles: - name: robertdebock.bootstrap +collections: + - name: ansible.builtin diff --git a/tasks/assert.yml b/tasks/assert.yml index 3b553f2..511c643 100644 --- a/tasks/assert.yml +++ b/tasks/assert.yml @@ -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 diff --git a/tasks/main.yml b/tasks/main.yml index ee155ef..b60deed 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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