Skip to content

Commit

Permalink
deploy_vms_*: run playbook on standalone or cluster
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
insatomcat committed Feb 27, 2025
1 parent 961a3e3 commit 78a2757
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion playbooks/deploy_vms_cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

---
- name: Deploy VMs on cluster
hosts: "{{ groups.hypervisors[0] }}"
hosts: "{{ groups.cluster_machines[0] }}"
gather_facts: false
become: true
tasks:
Expand Down
2 changes: 1 addition & 1 deletion playbooks/deploy_vms_standalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

---
- name: Create and start VMs
hosts: hypervisors
hosts: standalone_machine
gather_facts: false
become: true
vars:
Expand Down

0 comments on commit 78a2757

Please sign in to comment.