workflow update
This commit is contained in:
@@ -17,6 +17,15 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
terraform-ansible-deploy:
|
terraform-ansible-deploy:
|
||||||
runs-on: frente
|
runs-on: frente
|
||||||
|
env:
|
||||||
|
PROXMOX_VE_API_TOKEN: https://api.staging.example.com
|
||||||
|
PROXMOX_VE_ENDPOINT: true
|
||||||
|
GITEA_BASE_URL: https://api.staging.example.com
|
||||||
|
GITEA_TOKEN: true
|
||||||
|
AWS_ACCESS_KEY_ID: https://api.staging.example.com
|
||||||
|
AWS_SECRET_ACCESS_KEY: true
|
||||||
|
AWS_REGION: garage
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
selected_instance = one([
|
||||||
|
for cfg in var.instance_configs :
|
||||||
|
cfg if cfg.crispy_name == var.node_name
|
||||||
|
])
|
||||||
@@ -1,10 +1,3 @@
|
|||||||
locals {
|
|
||||||
selected_instance = one([
|
|
||||||
for cfg in var.instance_configs :
|
|
||||||
cfg if cfg.crispy_name == var.node_name
|
|
||||||
])
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "proxmox_virtual_environment_file" "cloud_config" {
|
resource "proxmox_virtual_environment_file" "cloud_config" {
|
||||||
content_type = "snippets"
|
content_type = "snippets"
|
||||||
datastore_id = "local"
|
datastore_id = "local"
|
||||||
@@ -31,7 +24,7 @@ resource "proxmox_virtual_environment_file" "cloud_config" {
|
|||||||
- docker
|
- docker
|
||||||
shell: /bin/bash
|
shell: /bin/bash
|
||||||
ssh-authorized-keys:
|
ssh-authorized-keys:
|
||||||
- "${var.vm_user_sshkey}" # Inject user's SSH key
|
- "${var.vm_user_sshkey}" # +++ Needs to be put into a variable injected by git actions secrets
|
||||||
sudo: ALL=(ALL) NOPASSWD:ALL
|
sudo: ALL=(ALL) NOPASSWD:ALL
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
@@ -42,6 +35,7 @@ resource "proxmox_virtual_environment_file" "cloud_config" {
|
|||||||
- gnupg
|
- gnupg
|
||||||
- lsb-release
|
- lsb-release
|
||||||
- unattended-upgrades
|
- unattended-upgrades
|
||||||
|
- rsync
|
||||||
|
|
||||||
runcmd:
|
runcmd:
|
||||||
- systemctl enable qemu-guest-agent
|
- systemctl enable qemu-guest-agent
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ variable "instance_configs" {
|
|||||||
vmid = string
|
vmid = string
|
||||||
}))
|
}))
|
||||||
default = [
|
default = [
|
||||||
{ crispy_name = "snap", vmid = "9002" },
|
{ crispy_name = "snap", vmid = "902" },
|
||||||
{ crispy_name = "crackle", vmid = "9000" },
|
{ crispy_name = "crackle", vmid = "901" },
|
||||||
{ crispy_name = "pop", vmid = "900" }
|
{ crispy_name = "pop", vmid = "900" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user