diff --git a/app/tasks.py b/app/tasks.py index 3f5fca6d151ccb6b852ac3785e46b2ada9d409d3..42e15e2149cbc87fc276618bf22db3529b0fbc83 100644 --- a/app/tasks.py +++ b/app/tasks.py @@ -120,11 +120,13 @@ def trigger_vm_creation(name, interface, memory, cores): def trigger_ztp_configuration(host): """Trigger a job to generate a switch ZTP configuration""" + ztp_stack = ",".join([item.serial_number for item in host.stack_members()]) extra_vars = [ f"ztp_host={host.name}", f"ztp_ip={host.main_interface.ip}", f"ztp_mac={host.main_interface.mac}", f"ztp_model={host.model}", + f"ztp_stack='{ztp_stack}'", ] job_template = current_app.config["AWX_ZTP_CONFIGURATION"] current_app.logger.info(