Created
February 2, 2021 05:19
-
-
Save nshores/22b81791161da5069272b91bab41a968 to your computer and use it in GitHub Desktop.
ansible-resize-lvm.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ansible -i /mnt/c/Users/nshores/Documents/repos/shoreslab/ansible/hosts.nshores swarm_nodes -m shell -a '/bin/bash -c " \ | |
(echo n; echo ""; echo ""; echo ""; echo w) | sudo fdisk /dev/sda && \ | |
sudo pvcreate /dev/sda4 && \ | |
sudo vgextend ubuntu-vg /dev/sda4 && \ | |
sudo lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv && \ | |
sudo resize2fs /dev/ubuntu-vg/ubuntu-lv"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment