incus-contrib/ansible/playbooks/webapp-post-deploy.yml

33 lines
1.0 KiB
YAML

---
# webapp-post-deploy.yml — Configure webapp blueprint instances
#
# Aether sends ffsdn_instances (a list of all instances in the deployment).
# This playbook loops over each instance and dispatches to db or web tasks.
- name: Webapp post-deploy — configure instances via Incus API
hosts: localhost
gather_facts: false
connection: local
vars:
incus_api: "https://192.168.102.140:8443"
incus_cert: "/runner/project/incus-client.crt"
incus_key: "/runner/project/incus-client.key"
base_packages: "curl vim htop jq"
blueprint_name: "webapp"
valid_components: ["db", "web"]
tasks:
- name: Validate required variables
ansible.builtin.assert:
that:
- ffsdn_instances is defined
- ffsdn_instances | length > 0
fail_msg: "ffsdn_instances must be provided by Aether"
- name: Configure each instance
ansible.builtin.include_tasks: showcase/webapp-deploy-instance.yml
loop: "{{ ffsdn_instances }}"
loop_control:
loop_var: instance