update grub with handler

This commit is contained in:
Ruben Blanco 2023-10-26 13:40:11 +02:00
parent 115cf8736e
commit 49506f5561
2 changed files with 9 additions and 7 deletions

View File

@ -9,4 +9,10 @@
- name: restart nslcd
service:
name: "{{ nslcd_daemon }}"
state: restarted
state: restarted
# update grub
#- name: update grub config
- name: grub register
command: update-grub
# when: grub_register.changed

View File

@ -245,14 +245,10 @@
block: |
set superusers="{{ user_grub }}"
password_pbkdf2 {{ user_grub }} {{ code_grub }}
notify: grub register
tags:
- grub-password
register: grub_register
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# paso2 - update grub
- name: update grub config
command: update-grub
when: grub_register.changed
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++