avoid using a lot of templates for a workflow in ansible tower or awx

You can achieve this by setting a prompt for limit and extra variables on a master patching template, then using the prompt option when adding the template to the workflow, that way you can set both the limit and the serial value per template instance added to the workflow.

  • Create a master template for patching.

  • Make sure you set the host filter to “all” (or a limit that matches all groups within the playbook), and set a variable for serial.

      host: all
      serial: "{{ variable_serial }}"
    
  • Now set the “PROMPT ON LAUNCH” option for both extra variables and limit on the master template and save it.

enter image description here

  • When you add the templates to the workflow, click on the “PROMPT” option and set each limit/template to one group/serial setting.

enter image description here

  • Then just keep adding templates to the workflow with different settings.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top