Skip to content

Commit 17194e6

Browse files
authored
Allow jinja2 expression for choices field (#4043) (#4117)
1 parent aa1d8bc commit 17194e6

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/ansiblelint/schemas/role-arg-spec.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@
220220
"title": "Entry Point",
221221
"type": "object"
222222
},
223+
"full-jinja": {
224+
"pattern": "^\\{[\\{%](.|[\r\n])*[\\}%]\\}$",
225+
"type": "string"
226+
},
223227
"option": {
224228
"additionalProperties": false,
225229
"markdownDescription": "See [argument-spec](https://docs.ansible.com/ansible/latest/dev_guide/developing_program_flow_modules.html#argument-spec)",
@@ -228,7 +232,15 @@
228232
"type": "string"
229233
},
230234
"choices": {
231-
"type": "array"
235+
"oneOf": [
236+
{
237+
"type": "array"
238+
},
239+
{
240+
"$ref": "#/$defs/full-jinja",
241+
"type": "string"
242+
}
243+
]
232244
},
233245
"default": {
234246
"default": "None"

0 commit comments

Comments
 (0)