From 78a2757058700564104e00690b73ca93f12b1afb Mon Sep 17 00:00:00 2001 From: Florent CARLI Date: Mon, 24 Feb 2025 14:29:34 +0100 Subject: [PATCH] deploy_vms_*: run playbook on standalone or cluster In an inventory with cluster machines and standalone machine, we don't want the deploy_vms_standalone machine to run on "hypervisors" since the cluster machines also are hypervisors. Same thing for deploy_vms_cluster, it must run on a member of cluster_machines Signed-off-by: Florent CARLI --- playbooks/deploy_vms_cluster.yaml | 2 +- playbooks/deploy_vms_standalone.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/deploy_vms_cluster.yaml b/playbooks/deploy_vms_cluster.yaml index 8007ab63c..3abbcd6e1 100644 --- a/playbooks/deploy_vms_cluster.yaml +++ b/playbooks/deploy_vms_cluster.yaml @@ -5,7 +5,7 @@ --- - name: Deploy VMs on cluster - hosts: "{{ groups.hypervisors[0] }}" + hosts: "{{ groups.cluster_machines[0] }}" gather_facts: false become: true tasks: diff --git a/playbooks/deploy_vms_standalone.yaml b/playbooks/deploy_vms_standalone.yaml index be9994c4c..9e56592e3 100644 --- a/playbooks/deploy_vms_standalone.yaml +++ b/playbooks/deploy_vms_standalone.yaml @@ -3,7 +3,7 @@ --- - name: Create and start VMs - hosts: hypervisors + hosts: standalone_machine gather_facts: false become: true vars: