Skip to content

Commit

Permalink
Allow jinja2 expression for choices field (#4043) (#4117)
Browse files Browse the repository at this point in the history
  • Loading branch information
cavcrosby authored Apr 24, 2024
1 parent aa1d8bc commit 17194e6
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/ansiblelint/schemas/role-arg-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@
"title": "Entry Point",
"type": "object"
},
"full-jinja": {
"pattern": "^\\{[\\{%](.|[\r\n])*[\\}%]\\}$",
"type": "string"
},
"option": {
"additionalProperties": false,
"markdownDescription": "See [argument-spec](https://docs.ansible.com/ansible/latest/dev_guide/developing_program_flow_modules.html#argument-spec)",
Expand All @@ -228,7 +232,15 @@
"type": "string"
},
"choices": {
"type": "array"
"oneOf": [
{
"type": "array"
},
{
"$ref": "#/$defs/full-jinja",
"type": "string"
}
]
},
"default": {
"default": "None"
Expand Down

0 comments on commit 17194e6

Please sign in to comment.