matrixtest-IaC/kube-user.tpl

29 lines
693 B
Smarty
Raw Normal View History

#cloud-config
packages:
- chrony
- git
- lvm2
- xfsprogs
write_files:
- path: /etc/chrony/chrony.conf
permissions: "0644"
content: |
%{ for line in split("\n",file("chrony.conf")) ~}
${line}
%{ endfor ~}
owner: root:root
runcmd:
- [ systemctl, enable, chronyd ]
- systemctl restart chronyd
2024-01-12 14:56:07 +00:00
- mkdir -p /var/snap
- vgcreate snapvg /dev/sdb
- lvcreate -n lvol_snap -l 100%FREE snapvg
2024-01-12 14:56:07 +00:00
- mkfs -t xfs -n ftype=1 /dev/snapvg/lvol_snap
- cp -a /etc/fstab /run/fstab.bak
2024-01-12 14:56:07 +00:00
- echo "/dev/snapvg/lvol_snap /var/snap xfs defaults 0 0" >> /etc/fstab
- systemctl daemon-reload
- findmnt --verify || cp -a /run/fstab.bak /etc/fstab
2024-01-12 15:09:45 +00:00
- mount /var/snap