29 lines
1.1 KiB
YAML
29 lines
1.1 KiB
YAML
---
|
|
# Installs apps natively into Proxmox LXCs. The LXCs themselves are created
|
|
# by Terraform (build/config/terraform) — run that first; this playbook
|
|
# assumes the guests already exist and are reachable.
|
|
#
|
|
# Hosts come from the community.proxmox inventory plugin
|
|
# (inventory/proxmox.yml), which queries the Proxmox API rather than listing
|
|
# guests by hand. `apps` is declared per guest in host_vars/<guest>.yml,
|
|
# mirroring how `stacks` works for Unraid hosts.
|
|
- name: Install apps into Proxmox LXCs
|
|
hosts: proxmox_guests
|
|
gather_facts: true
|
|
vars:
|
|
repo_root: "{{ playbook_dir }}/../../../.."
|
|
# Comma-separated app names to restrict this run to. Shares the
|
|
# `only_stacks` name with playbooks/unraid.yml so a single `-e` narrows
|
|
# both platforms in one invocation of deploy.yml.
|
|
only_stacks: ""
|
|
|
|
tasks:
|
|
- name: Install each declared app
|
|
ansible.builtin.include_role:
|
|
name: lxc_app
|
|
loop: >-
|
|
{{ apps if only_stacks == ''
|
|
else apps | selectattr('name', 'in', only_stacks.split(',')) | list }}
|
|
loop_control:
|
|
loop_var: app
|
|
label: "{{ app.name }}"
|