Closed ke4roh closed 5 years ago
I understand what you're getting at, but could you give a use case example or something we could write a test for?
- name: Make a thing
copy: &rememberThis
from: "{{ data | long | filter | string }}"
data: "{{doc.here}}"
register: aPlace
- name: Copy the other thing
copy:
<<: *rememberThis
from: "{{doc.q}}"
register: newPlace
What you've just laid out here would be a pretty major change to how our pipelines are defined and called. I don't think it's a bad thing, but we will need to rework a few things.
A step should be given its configuration after it has been run through jinjava with the latest doc and environment.
The definition of a step would also need to include an annotation to give it a name so we can easily find it. We also need to think about a namespace, if desired. If not, what exactly happens when two steps with the same name exist?
What are your thoughts?
Tabling for now because the fully-qualified class name can be worked around with Yaml anchor/alias and exact similarity to Ansible is not critical.
Like Ansible has
yum
, allow for steps to be keys with arguments in our DSL. This will probably require an annotation, and remove the need for specifying the fully-qualified class name in the DSL.