vanhempi
commit
6e796e4b25
2 muutettua tiedostoa jossa 16 lisäystä ja 17 poistoa
  1. +1
    -0
      defaults/main.yml
  2. +15
    -17
      tasks/main.yml

+ 1
- 0
defaults/main.yml Näytä tiedosto

@@ -1,3 +1,4 @@
cmdline: ""
grub_cmdline_linux: "{{ cmdline }}"
grub_cmdline_linux_default: quiet {{ cmdline }}
grub_disable_recovery: false


+ 15
- 17
tasks/main.yml Näytä tiedosto

@@ -1,31 +1,29 @@
---
- include_role:
name: chroot_environment
vars:
chroot_environment_state: mounted
when: root_target_directory is defined
- name: debian packages
apt:
pkg:
- arch-install-scripts

- name: default grub settings
template:
src: default-grub.j2
dest: "{{ root_target_directory }}/etc/default/grub"
dest: "{{ root_target_directory | default('') }}/etc/default/grub"

- name: grub-install
command:
chroot {{ root_target_directory }}
command: >
{% if root_target_directory is defined %}arch-chroot {{ root_target_directory }}{% endif %}
grub-install
{{ lookup('template','grub-install.args.j2') }}
{{ lookup('template','grub-install.args.j2') }}
{{ item }}
with_items: "{{ boot_devices }}"

- name: update-grub
command: chroot {{ root_target_directory }} update-grub
command: >
{% if root_target_directory is defined %}arch-chroot {{ root_target_directory }}{% endif %}
update-grub

- name: update initramfs
command: chroot {{ root_target_directory }} update-initramfs -u

- include_role:
name: chroot_environment
vars:
chroot_environment_state: unmounted
when: root_target_directory is defined
command: >
{% if root_target_directory is defined %}arch-chroot {{ root_target_directory }}{% endif %}
update-initramfs -u

Loading…
Peruuta
Tallenna