summaryrefslogtreecommitdiff
path: root/roles/vm-install
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2017-12-14 00:44:55 +0100
committerChristian Pointner <equinox@spreadspace.org>2017-12-14 00:44:55 +0100
commit9f527c500e092bc17fd63403a86822d7f19fdc04 (patch)
treea7009d03240a3fc9807daca0a4b6e51cafdee2c8 /roles/vm-install
parentinstall htoprc and disable installation of recommends (diff)
improve handling of dummy lvm volume
Diffstat (limited to 'roles/vm-install')
-rw-r--r--roles/vm-install/tasks/main.yaml7
-rw-r--r--roles/vm-install/templates/preseed_debian-stretch.cfg.j26
2 files changed, 4 insertions, 9 deletions
diff --git a/roles/vm-install/tasks/main.yaml b/roles/vm-install/tasks/main.yaml
index a59e6fe2..22a6a351 100644
--- a/roles/vm-install/tasks/main.yaml
+++ b/roles/vm-install/tasks/main.yaml
@@ -121,10 +121,3 @@
- name: reenable StrictHostKeyChecking
set_fact:
ansible_ssh_extra_args: ""
-
-- name: remove dummy logical volume
- lvol:
- vg: "{{ inventory_hostname }}"
- lv: dummy
- state: absent
- force: yes
diff --git a/roles/vm-install/templates/preseed_debian-stretch.cfg.j2 b/roles/vm-install/templates/preseed_debian-stretch.cfg.j2
index 8198d71b..c20b607b 100644
--- a/roles/vm-install/templates/preseed_debian-stretch.cfg.j2
+++ b/roles/vm-install/templates/preseed_debian-stretch.cfg.j2
@@ -1,5 +1,5 @@
#########################################################################
-# Radio Helsinki preseed file for Debian stretch based VMs
+# spreadspace preseed file for Debian stretch based VMs
#########################################################################
d-i debian-installer/language string en
@@ -99,4 +99,6 @@ d-i grub-installer/with_other_os boolean false
d-i finish-install/reboot_in_progress note
-d-i preseed/late_command string in-target bash -c "passwd -d root; passwd -l root; umask 077; mkdir -p /root/.ssh/; echo -e '{{ sshserver_root_keys }}' > /root/.ssh/authorized_keys"
+d-i preseed/late_command string \
+ lvremove -f {{ inventory_hostname }}/dummy; \
+ in-target bash -c "passwd -d root; passwd -l root; umask 077; mkdir -p /root/.ssh/; echo -e '{{ sshserver_root_keys }}' > /root/.ssh/authorized_keys"