Bug 1810985

Summary: [RFE] Improve update speed by reducing the number of skipped tasks during ansible run.
Product: Red Hat OpenStack Reporter: Sofer Athlan-Guyot <sathlang>
Component: openstack-tripleo-heat-templatesAssignee: Sofer Athlan-Guyot <sathlang>
Status: ON_DEV --- QA Contact: Jason Grosso <jgrosso>
Severity: medium Docs Contact:
Priority: medium    
Version: 16.1 (Train)CC: augol, jpretori, mburns
Target Milestone: zstreamKeywords: FutureFeature, RFE, Triaged, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Sofer Athlan-Guyot 2020-03-06 10:53:04 UTC
Description of problem:  During update, we do this:

 - generate ansible tasks with step conditional attached
 - run all the tasks inside a step0 to step5 loop 

This means that every step 1 tasks is hit 6 times and only run once. The other 5 times it's skipped. It seems that even skipped task make a ssh connection which make the overall cost even higher.

This make the log less readable, a simple grep doesn't work as expected as you can hit the skipped tasks as well.

We need to "invert" the logic here.

We should collect all conditionals and generate one playbook by step. Like this, we don't change the interface (step conditional) but we only run each task in each step once.