all repos — proxmox-ansible @ ae7b7825ab8acbdfe1dbb2fdfd296dbf4fc682ba

ensure grub installed
Marco Andronaco andronacomarco@gmail.com
Sat, 11 Feb 2023 11:44:46 +0100
commit

ae7b7825ab8acbdfe1dbb2fdfd296dbf4fc682ba

parent

e4593aa4dfb8f48e9f09c5971389a165df3833f3

2 files changed, 14 insertions(+), 0 deletions(-)

jump to
M group_vars/all/vars.ymlgroup_vars/all/vars.yml

@@ -4,5 +4,6 @@ - btop

- firefox - tmux - git + - linux-lts username: "{{ ansible_user }}"
M tasks/essential.ymltasks/essential.yml

@@ -64,3 +64,16 @@ - filesystems

- fsck mkinitcpio_force_create: false mkinitcpio_disable_fallback_preset: true + +- name: Check to see if grub has been configured + stat: path=/boot/grub/grub.cfg + register: grub_config + +- name: Write grub configuration file + command: grub-mkconfig -o /boot/grub/grub.cfg + when: grub_config.stat.exists == False + +- name: Write grub to MBR + command: grub-install /dev/vda1 + when: grub_config.stat.exists == False +