Start an ansible config for maintaining mf4.xiph.org.

Datacenter staff installed Debain 10.4 and left us with
ssh access to the root account, and a minimal lvm filesystem
setup.

To help document and maintain the configuration, declare
the basic storage volumes.

Assuming ssh access to root@mf4.xiph.org, the config
can be applied with:

  ansible-playbook -i hosts mf4.yaml

In theory it should verify the config, but avoid doing anything
destructive if it finds the system in a state that doesn't match
what's described.

This hasn't actually been tested on a bare system; resizing
the root and swap might need manual intervention.
parents
[xiph]
mf4.xiph.org
# Ansible playbook for mf4.xiph.org.
- name: Configure storage
# Run the remaining steps on the target instance.
hosts: mf4.xiph.org
remote_user: root
tasks:
- name: lvm volume group on RAID
lvg:
# Debian installer defaults to `lvm` for the volume group name.
vg: lvm
pvs: /dev/sda3
- name: lvm root volume
lvol:
vg: lvm
lv: root
size: 64G
- name: lvm swap volume
lvol:
vg: lvm
lv: swap
size: 12G
- name: mkswap
filesystem:
fstype: swap
dev: /dev/mapper/lvm-swap
- name: lvm home volume
lvol:
vg: lvm
lv: home
size: 1T
- name: home filesystem
filesystem:
fstype: ext4
dev: /dev/mapper/lvm-home
opts: -L mf4-home
- name: home volume mountpoint
mount:
state: mounted
src: /dev/mapper/lvm-home
path: /home
fstype: ext4
opts: defaults,errors=remount-ro
passno: 2
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