-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwith_items.yml
More file actions
27 lines (25 loc) · 870 Bytes
/
with_items.yml
File metadata and controls
27 lines (25 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# This example workflow demonstrates how to run the same task for each item in a collection.
#
# Workflows in the Civis Platform are written in YAML and a workflow DSL
# (domain specific language) called Mistral.
#
# See this website, https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html,
# for an introduction to YAML.
#
# See the Mistral documentation, https://docs.openstack.org/mistral/train/user/wf_lang_v2.html,
# for a description of the Mistral DSL.
version: '2.0' # you always need this key to specify version 2 of the mistral DSL
workflow:
input:
# The collection referenced with YAQL should be under input
- things:
- foo
- bar
- spam
tasks:
foo_bar_spam:
action: civis.scripts.python3
with-items: thing in <% $.things %>
input:
source: |
print('<% $.thing %>')