summaryrefslogtreecommitdiff
path: root/roles/installer/debian
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2020-11-21 04:44:34 +0100
committerChristian Pointner <equinox@spreadspace.org>2020-11-21 04:44:34 +0100
commit48d0df39753037b6688c55a372254ef9ecae5631 (patch)
treeed7c92eac51186d1284c2fe5005b7efa7d3411ae /roles/installer/debian
parentuse delegation for vm/guest install and define (diff)
don't use install_hostname variable in roles
Diffstat (limited to 'roles/installer/debian')
-rw-r--r--roles/installer/debian/iso/defaults/main.yml2
-rw-r--r--roles/installer/debian/iso/tasks/main.yml6
-rw-r--r--roles/installer/debian/iso/templates/grub.cfg.j22
-rw-r--r--roles/installer/debian/iso/templates/isolinux.cfg.j26
-rw-r--r--roles/installer/debian/usb/tasks/main.yml6
-rw-r--r--roles/installer/debian/usb/templates/syslinux.cfg.j24
6 files changed, 13 insertions, 13 deletions
diff --git a/roles/installer/debian/iso/defaults/main.yml b/roles/installer/debian/iso/defaults/main.yml
index 8949e5b3..afdb2df8 100644
--- a/roles/installer/debian/iso/defaults/main.yml
+++ b/roles/installer/debian/iso/defaults/main.yml
@@ -1,2 +1,2 @@
---
-iso_install_target_dir: "{{ global_artifacts_dir }}/{{ install_hostname }}/debian-installer"
+iso_install_target_dir: "{{ global_artifacts_dir }}/{{ inventory_hostname }}/debian-installer"
diff --git a/roles/installer/debian/iso/tasks/main.yml b/roles/installer/debian/iso/tasks/main.yml
index fd2f941d..3170c7b5 100644
--- a/roles/installer/debian/iso/tasks/main.yml
+++ b/roles/installer/debian/iso/tasks/main.yml
@@ -12,7 +12,7 @@
- block:
- name: create temporary workdir
tempfile:
- prefix: "iso-install.{{ install_hostname }}."
+ prefix: "iso-install.{{ inventory_hostname }}."
state: directory
register: tmpdir
@@ -51,11 +51,11 @@
- name: make sure target image does not exist
file:
- path: "{{ iso_install_target_dir }}/{{ install_hostname }}.iso"
+ path: "{{ iso_install_target_dir }}/{{ inventory_hostname }}.iso"
state: absent
- name: generate target iso image
- command: xorriso -indev "{{ debian_installer_target_dir }}/mini.iso" -outdev "{{ iso_install_target_dir }}/{{ install_hostname }}.iso" -boot_image any replay -update initrd.gz initrd.gz -update isolinux.cfg isolinux.cfg -update grub.cfg /boot/grub/grub.cfg
+ command: xorriso -indev "{{ debian_installer_target_dir }}/mini.iso" -outdev "{{ iso_install_target_dir }}/{{ inventory_hostname }}.iso" -boot_image any replay -update initrd.gz initrd.gz -update isolinux.cfg isolinux.cfg -update grub.cfg /boot/grub/grub.cfg
args:
chdir: "{{ tmpdir.path }}"
diff --git a/roles/installer/debian/iso/templates/grub.cfg.j2 b/roles/installer/debian/iso/templates/grub.cfg.j2
index d13ca96d..12b8837b 100644
--- a/roles/installer/debian/iso/templates/grub.cfg.j2
+++ b/roles/installer/debian/iso/templates/grub.cfg.j2
@@ -14,7 +14,7 @@ set menu_color_highlight=black/light-gray
set timeout=10
set default=0
-menuentry "automated installer for {{ install_hostname }}" {
+menuentry "automated installer for {{ inventory_hostname }}" {
linux /linux --- auto {{ (install_cooked.kernel_cmdline | default([])) | join(' ') }}
initrd /initrd.gz
}
diff --git a/roles/installer/debian/iso/templates/isolinux.cfg.j2 b/roles/installer/debian/iso/templates/isolinux.cfg.j2
index 0fb43c25..1a758bda 100644
--- a/roles/installer/debian/iso/templates/isolinux.cfg.j2
+++ b/roles/installer/debian/iso/templates/isolinux.cfg.j2
@@ -1,4 +1,4 @@
-DEFAULT {{ install_hostname }}
+DEFAULT {{ inventory_hostname }}
TIMEOUT 100
PROMPT 1
SAY *****************************************
@@ -6,10 +6,10 @@ SAY **
SAY ** Distro: {{ install_distro }}
SAY ** Codename: {{ install_codename }}
SAY **
-SAY ** will be booting automated installer for {{ install_hostname }} in 10s ...
+SAY ** will be booting automated installer for {{ inventory_hostname }} in 10s ...
SAY **
-LABEL {{ install_hostname }}
+LABEL {{ inventory_hostname }}
KERNEL linux
INITRD initrd.gz
APPEND auto fb=false {{ (install_cooked.kernel_cmdline | default([])) | join(' ') }}
diff --git a/roles/installer/debian/usb/tasks/main.yml b/roles/installer/debian/usb/tasks/main.yml
index b9969677..e02f38e6 100644
--- a/roles/installer/debian/usb/tasks/main.yml
+++ b/roles/installer/debian/usb/tasks/main.yml
@@ -40,18 +40,18 @@
- block:
- name: create temporary workdir
tempfile:
- prefix: "usb-install.{{ install_hostname }}."
+ prefix: "usb-install.{{ inventory_hostname }}."
state: directory
register: tmpdir
- name: copy the original initramfs to the usb drive
copy:
src: "{{ debian_installer_target_dir }}/initrd.gz"
- dest: "{{ usb_install_path }}/initrd.{{ install_hostname }}.gz"
+ dest: "{{ usb_install_path }}/initrd.{{ inventory_hostname }}.gz"
- name: generate host specific initial ramdisk
vars:
- preseed_initrd: "{{ usb_install_path }}/initrd.{{ install_hostname }}.gz"
+ preseed_initrd: "{{ usb_install_path }}/initrd.{{ inventory_hostname }}.gz"
preseed_tmpdir: "{{ tmpdir.path }}"
import_role:
name: installer/debian/preseed
diff --git a/roles/installer/debian/usb/templates/syslinux.cfg.j2 b/roles/installer/debian/usb/templates/syslinux.cfg.j2
index 4531c1f9..98890372 100644
--- a/roles/installer/debian/usb/templates/syslinux.cfg.j2
+++ b/roles/installer/debian/usb/templates/syslinux.cfg.j2
@@ -1,5 +1,5 @@
{% if (ansible_play_hosts_all | length) == 1 %}
-DEFAULT {{ install_hostname }}
+DEFAULT {{ inventory_hostname }}
TIMEOUT 100
PROMPT 1
SAY *****************************************
@@ -7,7 +7,7 @@ SAY **
SAY ** Distro: {{ install_distro }}
SAY ** Codename: {{ install_codename }}
SAY **
-SAY ** will be booting automated installer for {{ install_hostname }} in 10s ...
+SAY ** will be booting automated installer for {{ inventory_hostname }} in 10s ...
SAY **
{% else %}
DEFAULT menu.c32