Selaa lähdekoodia

let user choose grub_bootloader_target

master
vanhempi
commit
f28958e463
2 muutettua tiedostoa jossa 17 lisäystä ja 1 poistoa
  1. +5
    -1
      tasks/main.yml
  2. +12
    -0
      templates/grub-install.args.j2

+ 5
- 1
tasks/main.yml Näytä tiedosto

@@ -11,7 +11,11 @@
dest: "{{ root_target_directory }}/etc/default/grub" dest: "{{ root_target_directory }}/etc/default/grub"


- name: grub-install - name: grub-install
command: chroot {{ root_target_directory }} grub-install {{ item }}
command:
chroot {{ root_target_directory }}
grub-install
{{ lookup('template','grub-install.args.j2') }}
{{ item }}
with_items: "{{ boot_devices }}" with_items: "{{ boot_devices }}"


- name: update-grub - name: update-grub


+ 12
- 0
templates/grub-install.args.j2 Näytä tiedosto

@@ -0,0 +1,12 @@
{% if grub_bootloader_target is defined %}
--target={{ grub_bootloader_target }}
{% endif %}
{% if efi_directory is defined %}
--efi-directory={{efi_directory}}
{% endif %}
{% if grub_bootloader_id is defined %}
--bootloader-id={{grub_bootloader_id}}
{% endif %}
{% if grub_bootloader_recheck is defined and grub_bootloader_recheck %}
--recheck
{% endif %}

Loading…
Peruuta
Tallenna