summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2019-12-07 15:04:13 +0200
committerLars Wirzenius <liw@liw.fi>2019-12-07 17:47:21 +0200
commit9d4ca3e766f1804249f9744f1f526719cbc8d892 (patch)
treefb7c99105940a6c0e3c106d3cc3d0f88add4a97b
parenta748d5416226185d341a50846b4ad759ba941871 (diff)
downloadvmdb2-9d4ca3e766f1804249f9744f1f526719cbc8d892.tar.gz
Fix: ansible.vmdb to use modern style of tags
-rw-r--r--ansible.vmdb29
-rw-r--r--lvm2.vmdb29
2 files changed, 33 insertions, 25 deletions
diff --git a/ansible.vmdb b/ansible.vmdb
index 4e96e7f..1378024 100644
--- a/ansible.vmdb
+++ b/ansible.vmdb
@@ -12,33 +12,38 @@ steps:
device: "{{ output }}"
start: 0%
end: 100%
- part-tag: root-part
+ tag: /
+ - kpartx: "{{ output }}"
+
- mkfs: ext4
- partition: root-part
+ partition: /
+
+ - mount: /
- - mount: root-part
- fs-tag: root-fs
-
- - unpack-rootfs: root-fs
+ - unpack-rootfs: /
- debootstrap: stretch
mirror: http://deb.debian.org/debian
- target: root-fs
+ target: /
unless: rootfs_unpacked
- apt: install
packages:
- linux-image-amd64
- - python
- fs-tag: root-fs
+ fs-tag: /
unless: rootfs_unpacked
- - cache-rootfs: root-fs
+ - apt: install
+ packages:
+ - python
+ fs-tag: /
+
+ - cache-rootfs: /
unless: rootfs_unpacked
- - ansible: root-fs
+ - ansible: /
playbook: ansible.yml
- grub: bios
- tag: root-fs
+ tag: /
diff --git a/lvm2.vmdb b/lvm2.vmdb
index 169f501..66be7fd 100644
--- a/lvm2.vmdb
+++ b/lvm2.vmdb
@@ -2,46 +2,42 @@
# system that boots on a PC with BIOS. Uses LVM2.
steps:
- - mkimg: "{{ image }}"
+ - mkimg: "{{ output }}"
size: 4G
- mklabel: msdos
- device: "{{ image }}"
+ device: "{{ output }}"
- mkpart: primary
- device: "{{ image }}"
+ device: "{{ output }}"
start: 1M
end: 100M
tag: /boot
- mkpart: primary
- device: "{{ image }}"
+ device: "{{ output }}"
start: 100M
end: 2G
- tag: /rootpv
+ tag: rootpv
- - cryptsetup: /rootpv
- tag: rootpv_crypt
- key-cmd: echo lvm2.lukskey
+ - kpartx: "{{ output }}"
- vgcreate: rootvg
physical:
- - rootpv_crypt
+ - rootpv
- lvcreate: rootvg
name: rootfs
size: 1G
- mkfs: ext2
- partition: boot
+ partition: /boot
- mkfs: ext4
partition: rootfs
- mount: /boot
- - mount: /boot
-
- mount: rootfs
- unpack-rootfs: rootfs
@@ -60,12 +56,19 @@ steps:
- cache-rootfs: rootfs
unless: rootfs_unpacked
+ # - apt: install
+ # packages:
+ # - lvm2
+ # tag: rootfs
+
- chroot: rootfs
shell: |
sed -i '/^root:[^:]*:/s//root::/' /etc/passwd
echo pc-vmdb2 > /etc/hostname
+# vgdisplay
+# lvdisplay
- grub: bios
tag: rootfs
- image-dev: "{{ image }}"
+ image-dev: "{{ output }}"
console: serial