Created
January 27, 2020 17:17
-
-
Save cinco/569d29e2d9630fde68d1c40d43bb201b to your computer and use it in GitHub Desktop.
provisioner terraform para expansão de disco LVM
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
provisioner "remote-exec" { | |
connection { | |
host = "var.ip[count.index]" | |
user = "login" | |
password = "senha" | |
} | |
inline = [ | |
"echo senha | sudo -S growpart /dev/sda 2", | |
"sudo growpart /dev/sda 5", | |
"sudo pvresize /dev/sda5", | |
"sudo lvextend -l +100%FREE /dev/mapper/ubu--S1604lvm--modelo--vg-root", | |
"sudo resize2fs /dev/mapper/ubu--S1604lvm--modelo--vg-root" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment