Actualizar deploy-containers.yaml
This commit is contained in:
@@ -3,7 +3,7 @@ name: "Deploy Multiple Ubuntu 24.04 Containers"
|
|||||||
|
|
||||||
agent:
|
agent:
|
||||||
machine:
|
machine:
|
||||||
type: e2-standard-2
|
type: cloud
|
||||||
os_image: "ubuntu2204"
|
os_image: "ubuntu2204"
|
||||||
|
|
||||||
blocks:
|
blocks:
|
||||||
@@ -13,14 +13,14 @@ blocks:
|
|||||||
- name: "Init Terraform"
|
- name: "Init Terraform"
|
||||||
commands:
|
commands:
|
||||||
- checkout
|
- checkout
|
||||||
- sudo apt update && sudo apt install -y terraform incus-client
|
- sudo apt update && sudo apt install -y
|
||||||
- terraform init
|
- terraform init
|
||||||
|
|
||||||
- name: "Deploy Multiple Containers"
|
- name: "Deploy Multiple Containers"
|
||||||
task:
|
task:
|
||||||
env_vars:
|
env_vars:
|
||||||
- name: TF_VAR_containers
|
- name: TF_VAR_containers
|
||||||
value: '["web01", "db01", "proxy01"]'
|
value: '["web01", "web02"]'
|
||||||
jobs:
|
jobs:
|
||||||
- name: "Terraform Apply"
|
- name: "Terraform Apply"
|
||||||
commands:
|
commands:
|
||||||
@@ -33,9 +33,7 @@ blocks:
|
|||||||
commands:
|
commands:
|
||||||
- incus list
|
- incus list
|
||||||
- incus exec web01 -- hostname
|
- incus exec web01 -- hostname
|
||||||
- incus exec db01 -- lsb_release -a
|
- incus exec web02 -- lsb_release -a
|
||||||
- incus exec proxy01 -- uptime
|
|
||||||
|
|
||||||
- name: "Destroy (Manual)"
|
- name: "Destroy (Manual)"
|
||||||
task:
|
task:
|
||||||
run:
|
run:
|
||||||
|
|||||||
Reference in New Issue
Block a user