Update qubesformation.py

This commit is contained in:
Brian Zalewski 2022-10-18 11:49:48 -04:00 committed by GitHub
parent 9043a3a736
commit 77015a49ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@ import collections
import os import os
import sys import sys
import tempfile import tempfile
import json
from ansible import errors from ansible import errors
from ansible.plugins.action.template import ActionModule as template from ansible.plugins.action.template import ActionModule as template
@ -21,7 +22,7 @@ def generate_datastructure(vms, task_vars):
# This block will skip any VMs that are not in the groups defined in the 'formation_vm_groups' variable # This block will skip any VMs that are not in the groups defined in the 'formation_vm_groups' variable
# This allows you to deploy in multiple stages which is useful in cases # This allows you to deploy in multiple stages which is useful in cases
# where you want to create a template after another template is already provisioned. # where you want to create a template after another template is already provisioned.
print(task_vars) print(json.dumps(task_vars))
print(task_vars.ansible_facts.formation_vm_groups) print(task_vars.ansible_facts.formation_vm_groups)
if hasattr(task_vars.ansible_facts, 'formation_vm_groups'): if hasattr(task_vars.ansible_facts, 'formation_vm_groups'):
continueLoop = true continueLoop = true