You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jinja always casts extra_vars to string because it is impossible to
specify in a schema what vars might pass through extra_vars. So, to make
it possible to pass objects through Jinja and have them show up as
objects or ints or whatever, this adds directives with tests to show
they work.
The directives available are: '!INT', '!JSON', '!AST'. See the readme
for how to use them.
Copy file name to clipboardExpand all lines: CHANGES.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,22 @@
1
1
# Changelog
2
2
3
+
## v0.6.0
4
+
5
+
* Add extra_vars parsing directives to get around difficulties with Jinja (which casts all
6
+
extra_vars as strings). When passing in an object via Jinja, all values become strings. To get
7
+
around this, add "!AST", "!JSON", or "!INT" directives in your action-chain yaml:
8
+
9
+
```yaml
10
+
chain:
11
+
name: 'example'
12
+
ref: 'ansible.command_local'
13
+
extra_parameters:
14
+
-
15
+
keyA: "!AST{{ jinja_variable_a }}"
16
+
keyB: "!JSON{{ jinja_variable_b | tojson }}"
17
+
keyC: "!INT{{ jinja_variable_c | int }}"
18
+
```
19
+
3
20
## v0.5.0
4
21
5
22
* Added ability to use yaml structures to pass arbitrarily complex values through extra_vars. key=value and @file syntax is still supported. Example usage:
0 commit comments