New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
to_nice_yaml producing "..." (3 dots) on role vars but not template vars #17095
Comments
I've done a little bit of research here, and the first thing that I notice, is that you seem to be passing just a plain string through Based on that, and what I can tell of the yaml emitter, it looks to see if you are writing a plain string, and that plain string is the root document, and if so, it appends a line reading The If I use any other data type, other than a scalar, pyyaml does not insert the Based on this, I'd have to assume that you shouldn't be piping your scalar values through |
Hi @sivel. |
From what I could tell looking through the pyyaml code, explicit_end has no bearing on this situation. I think at this point, this bug has less to do with ansible and more with the behavior of pyyaml. |
I had this problem yesterday, and responded to this thread, but ended up removing my comment. For me it was a journey - through jinja2 and templates. |
Going to close this out. There isn't anything for ansible to do here. This is expected based on the behavior of pyyaml. |
ISSUE TYPE
COMPONENT NAME
template and to_nice_yaml filter
ANSIBLE VERSION
ansible 2.1.1.0
CONFIGURATION
ANSIBLE_JINJA2_EXTENSIONS=jinja2.ext.do,jinja2.ext.i18n,jinja2.ext.loopcontrols,jinja2.ext.with_
ANSIBLE_PRIVATE_ROLE_VARS=true
OS / ENVIRONMENT
N/A
SUMMARY
While attempting to use 'template' to generate a YAML file, I noticed that 'to_nice_yaml' produces trailing "..." (3 dots) after outputting some variables, but not other.
This happens with role variables that are used directly inside the template, but not with objects that are obtained through loop variables.
STEPS TO REPRODUCE
templates/_debug.yml.j2
output file
loop_config (outer)
loop_config (inner)
EXPECTED RESULTS
desired output file
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: