Open pbychikhin opened 4 years ago
Probably that's not a very good idea to unfold loops. They work fine and "changed_when" on a registered variable inside loop works as expected. Also some vars such as random strings cant only be generated at run time. So a generator can be implemented for the purpose of inbound vars validation. Or it can just validate the inbound yml with vars.
It seems to be quite a hard task to perform even simply tasks with playbooks, such as inbound data validation, loop control, exit condition control etc. Try to implement a generator in Python, that will perform all needed validations, unfold loops into separate tasks, set vars inside playbook etc. As a result, we will run ansible-playbook with just one parameter - the playbook itself.