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 @@
hosts: mf4.xiph.org
remote_user: root
# Debian installer defaults to `lvm` for the volume group name.
vg: lvm
tasks:
- name: lvm volume group on RAID
lvg:
# Debian installer defaults to `lvm` for the volume group name.
vg: lvm
vg: "{{ vg }}"
pvs: /dev/sda3
- name: lvm root volume
lvol:
vg: lvm
vg: "{{ vg }}"
lv: root
size: 64G
- name: lvm swap volume
lvol:
vg: lvm
vg: "{{ vg }}"
lv: swap
size: 12G
- name: mkswap
filesystem:
fstype: swap
dev: /dev/mapper/lvm-swap
dev: /dev/mapper/{{ vg }}-swap
- name: lvm home volume
lvol:
vg: lvm
vg: "{{ vg }}"
lv: home
size: 1T
- name: home filesystem
filesystem:
fstype: ext4
dev: /dev/mapper/lvm-home
dev: /dev/mapper/{{ vg }}-home
opts: -L mf4-home
- name: home volume mountpoint
mount:
state: mounted
src: /dev/mapper/lvm-home
src: /dev/mapper/{{ vg }}-home
path: /home
fstype: ext4
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