summaryrefslogtreecommitdiff
path: root/roles/installer
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
parentuse delegation for vm/guest install and define (diff)
don't use install_hostname variable in roles
Diffstat (limited to 'roles/installer')
-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
-rw-r--r--roles/installer/openbsd/autoinstall/tasks/main.yml24
7 files changed, 25 insertions, 25 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
diff --git a/roles/installer/openbsd/autoinstall/tasks/main.yml b/roles/installer/openbsd/autoinstall/tasks/main.yml
index fc5f6194..8c84aaf0 100644
--- a/roles/installer/openbsd/autoinstall/tasks/main.yml
+++ b/roles/installer/openbsd/autoinstall/tasks/main.yml
@@ -1,16 +1,16 @@
---
- name: create temporary directories
loop:
- - files/etc
- - site/
+ - files/etc
+ - site/
file:
path: "{{ obsd_autoinstall_tmpdir }}/{{ item }}"
state: directory
- name: generate bootloader and installer configuration
loop:
- - auto_install.conf
- - boot.conf
+ - auto_install.conf
+ - boot.conf
template:
src: "{{ item }}.j2"
dest: "{{ obsd_autoinstall_tmpdir }}/files/etc/{{ item }}"
@@ -21,13 +21,13 @@
- name: extract installer files from iso
vars:
installer_files:
- - cdbr
- - cdboot
- - bsd
- - bsd.mp
- - bsd.rd
- - "INSTALL.{{ obsd_autoinstall_arch }}"
- - "{{ obsd_autoinstall_file_sets | product([obsd_autoinstall_version_short+'.tgz']) | map('join') | list }}"
+ - cdbr
+ - cdboot
+ - bsd
+ - bsd.mp
+ - bsd.rd
+ - "INSTALL.{{ obsd_autoinstall_arch }}"
+ - "{{ obsd_autoinstall_file_sets | product([obsd_autoinstall_version_short+'.tgz']) | map('join') | list }}"
iso_extract:
image: "{{ obsd_autoinstall_orig_iso }}"
dest: "{{ obsd_autoinstall_tmpdir }}/files"
@@ -45,7 +45,7 @@
dest: "{{ obsd_autoinstall_tmpdir }}/files/site{{ obsd_autoinstall_version_short }}.tgz"
- name: generate host specific installer image
- command: 'genisoimage -RTLldDN -o "{{ install_hostname }}.iso" -no-emul-boot -b "cdbr" -c "boot.catalog" files/'
+ command: 'genisoimage -RTLldDN -o "{{ inventory_hostname }}.iso" -no-emul-boot -b "cdbr" -c "boot.catalog" files/'
args:
chdir: "{{ obsd_autoinstall_tmpdir }}/"