27 lines
694 B
Plaintext
27 lines
694 B
Plaintext
|
#cloud-config
|
||
|
|
||
|
packages:
|
||
|
- chrony
|
||
|
- git
|
||
|
- lvm2
|
||
|
- xfsprogs
|
||
|
write_files:
|
||
|
- path: /etc/chrony/chrony.conf
|
||
|
permissions: "0644"
|
||
|
content: |
|
||
|
{{ lookup('ansible.builtin.file', 'chrony.conf') | indent(6, False ) }}
|
||
|
owner: root:root
|
||
|
|
||
|
runcmd:
|
||
|
- [ systemctl, enable, chronyd ]
|
||
|
- systemctl restart chronyd
|
||
|
- mkdir -p /var/snap
|
||
|
- vgcreate snapvg /dev/sdb
|
||
|
- lvcreate -n lvol_snap -l 100%FREE snapvg
|
||
|
- mkfs -t xfs -n ftype=1 /dev/snapvg/lvol_snap
|
||
|
- cp -a /etc/fstab /run/fstab.bak
|
||
|
- 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
|
||
|
- mount /var/snap
|