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
I started using ansible-doctor to document my roles, and, following the documentation, I see that I should be able to override an existing variable value, like so:
---
# defaults file for test# @var testvar:value: "foo"testvar: "secret"
However, when I run ansible-doctor, I have an error:
[CRITICAL] Unable to merge annotation values:
... too many values to unpack (expected 2) other=['"foo"']
Is this a normal behavior?
Thanks a lot for your answer!
The text was updated successfully, but these errors were encountered:
Hi, Thanks for your report. That's because the documentation is wrong here. The value will always be parsed as json/yaml, but therefor you need to flag it with a $.
Example:
## Content after the $ need to be a valid json; this json will be translated to YAML for the generated docs.
## Simple value
# @var demo_role_override: $ "test"
demo_role_override: original
## Complex value
# @var demo_role_override_complex:value: $ {"foo":"bar", "second":"value"}
demo_role_override_complex: {}
Rendered docs output:
demo_role_override: test
demo_role_override_complex:
foo: barsecond: value
Quoting matters in this case as well. I'll fix the documentation later.
Hi,
I started using ansible-doctor to document my roles, and, following the documentation, I see that I should be able to override an existing variable value, like so:
However, when I run
ansible-doctor
, I have an error:Is this a normal behavior?
Thanks a lot for your answer!
The text was updated successfully, but these errors were encountered: