Use a variable for the lvm volumn group name.

The Debian installer defaulted to `lvm` and we're unlikely to
change it, but using a variable makes it less likely we'll
make errors if we do change it in the future.
parent d39b14e4
...@@ -6,43 +6,47 @@ ...@@ -6,43 +6,47 @@
hosts: mf4.xiph.org hosts: mf4.xiph.org
remote_user: root remote_user: root
# Debian installer defaults to `lvm` for the volume group name.
vg: lvm
tasks: tasks:
- name: lvm volume group on RAID - name: lvm volume group on RAID
lvg: lvg:
# Debian installer defaults to `lvm` for the volume group name. # Debian installer defaults to `lvm` for the volume group name.
vg: lvm vg: "{{ vg }}"
pvs: /dev/sda3 pvs: /dev/sda3
- name: lvm root volume - name: lvm root volume
lvol: lvol:
vg: lvm vg: "{{ vg }}"
lv: root lv: root
size: 64G size: 64G
- name: lvm swap volume - name: lvm swap volume
lvol: lvol:
vg: lvm vg: "{{ vg }}"
lv: swap lv: swap
size: 12G size: 12G
- name: mkswap - name: mkswap
filesystem: filesystem:
fstype: swap fstype: swap
dev: /dev/mapper/lvm-swap dev: /dev/mapper/{{ vg }}-swap
- name: lvm home volume - name: lvm home volume
lvol: lvol:
vg: lvm vg: "{{ vg }}"
lv: home lv: home
size: 1T size: 1T
- name: home filesystem - name: home filesystem
filesystem: filesystem:
fstype: ext4 fstype: ext4
dev: /dev/mapper/lvm-home dev: /dev/mapper/{{ vg }}-home
opts: -L mf4-home opts: -L mf4-home
- name: home volume mountpoint - name: home volume mountpoint
mount: mount:
state: mounted state: mounted
src: /dev/mapper/lvm-home src: /dev/mapper/{{ vg }}-home
path: /home path: /home
fstype: ext4 fstype: ext4
opts: defaults,errors=remount-ro opts: defaults,errors=remount-ro
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment