Step one attempt
This commit is contained in:
27
Notes.txt
Normal file
27
Notes.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
#Hey Friends
|
||||
# Starting with installing terraform on my ansible box.
|
||||
wget -O - https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
|
||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(grep -oP '(?<=UBUNTU_CODENAME=).*' /etc/os-release || lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
|
||||
sudo apt update && sudo apt install terraform
|
||||
|
||||
# I dont want this to be in bash. but oh well
|
||||
|
||||
#starting with this github
|
||||
https://github.com/Telmate/terraform-provider-proxmox/blob/master/docs/index.md
|
||||
|
||||
#I am on Proxmox 8 so starting off there.
|
||||
|
||||
pveum role add TerraformProv -privs "Datastore.AllocateSpace Datastore.AllocateTemplate Datastore.Audit Pool.Allocate Sys.Audit Sys.Console Sys.Modify VM.Allocate VM.Audit VM.Clone VM.Config.CDROM VM.Config.Cloudinit VM.Config.CPU VM.Config.Disk VM.Config.HWType VM.Config.Memory VM.Config.Network VM.Config.Options VM.Monitor VM.Migrate VM.PowerMgmt SDN.Use"
|
||||
pveum user add terraform-prov@pve --password <in 1password>
|
||||
pveum aclmod / -user terraform-prov@pve -role TerraformProv
|
||||
pveum user token add terraform-prov@pve terraform-token --expire $(date -d 2025-10-24T23:59:59 +%s)
|
||||
#Nice this worked
|
||||
|
||||
# if update to 9 later
|
||||
pveum role modify TerraformProv -privs "Datastore.AllocateSpace Datastore.AllocateTemplate Datastore.Audit Pool.Allocate Sys.Audit Sys.Console Sys.Modify VM.Allocate VM.Audit VM.Clone VM.Config.CDROM VM.Config.Cloudinit VM.Config.CPU VM.Config.Disk VM.Config.HWType VM.Config.Memory VM.Config.Network VM.Config.Options VM.Migrate VM.PowerMgmt SDN.Use"
|
||||
|
||||
#If I hate this
|
||||
pveum role list
|
||||
pveum role delete <uid>
|
||||
pveum user delete <uid>
|
||||
|
||||
Reference in New Issue
Block a user