summaryrefslogtreecommitdiffstats
path: root/roles/bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'roles/bootstrap')
-rw-r--r--roles/bootstrap/tasks/install-ubuntu.yml50
-rw-r--r--roles/bootstrap/templates/ubuntu.conf.j24
2 files changed, 0 insertions, 54 deletions
diff --git a/roles/bootstrap/tasks/install-ubuntu.yml b/roles/bootstrap/tasks/install-ubuntu.yml
index f1c28d7..1b22c69 100644
--- a/roles/bootstrap/tasks/install-ubuntu.yml
+++ b/roles/bootstrap/tasks/install-ubuntu.yml
@@ -48,53 +48,3 @@
ansible.builtin.command:
cmd: "arch-chroot {{ mnt_root_path }} bootctl install"
changed_when: true
-
-- name: "Get machine-id"
- ansible.builtin.command:
- cmd: "cat {{ mnt_root_path }}/etc/machine-id"
- changed_when: false
- register: bootstrap_machine_id
-
-- name: "Get Kernel version"
- ansible.builtin.shell: |
- set -eo pipefail
- ls {{ mnt_root_path }}/boot/vmlinuz-* | sed 's/.*vmlinuz-//'
- args:
- executable: /usr/bin/bash
- changed_when: false
- register: bootstrap_kernel_version
-
-- name: "Create distro kernel directory"
- ansible.builtin.file:
- path: "{{ mnt_boot_path }}/{{ ansible_distribution | lower }}"
- state: "directory"
- mode: "0700"
-
-- name: "Copy kernel to efi partition"
- ansible.builtin.copy:
- src: "{{ item }}"
- dest: "{{ mnt_boot_path }}/{{ ansible_distribution | lower }}"
- remote_src: true
- mode: "0644"
- with_items:
- - "{{ mnt_root_path }}/boot/vmlinuz-{{ bootstrap_kernel_version.stdout }}"
- - "{{ mnt_root_path }}/boot/initrd.img-{{ bootstrap_kernel_version.stdout }}"
-
-- name: "Template systemd-boot files"
- ansible.builtin.template:
- src: "{{ item.src }}"
- dest: "{{ item.dest }}"
- mode: "0644"
- with_items:
- - src: "loader.conf.j2"
- dest: "{{ mnt_boot_path }}/loader/loader.conf"
- - src: "{{ ansible_distribution | lower }}.conf.j2"
- dest: "{{ mnt_boot_path }}/loader/entries/{{ ansible_distribution | lower }}.conf"
-
-- name: "Clean up debian kernel install"
- ansible.builtin.file:
- path: "{{ item }}"
- state: "absent"
- with_items:
- - "{{ mnt_boot_path }}/{{ bootstrap_machine_id.stdout }}"
- - "{{ mnt_boot_path }}/loader/entries/{{ bootstrap_machine_id.stdout }}-{{ bootstrap_kernel_version.stdout }}.conf"
diff --git a/roles/bootstrap/templates/ubuntu.conf.j2 b/roles/bootstrap/templates/ubuntu.conf.j2
deleted file mode 100644
index 4c8afa8..0000000
--- a/roles/bootstrap/templates/ubuntu.conf.j2
+++ /dev/null
@@ -1,4 +0,0 @@
-title Ubuntu 24.04
-linux /ubuntu/vmlinuz-{{ bootstrap_kernel_version.stdout }}
-initrd /ubuntu/initrd.img-{{ bootstrap_kernel_version.stdout }}
-options root=PARTLABEL={{ partition_root.name }} rw queit splash