-
Bug
-
Resolution: Duplicate
-
Normal
-
None
-
6.15.4
-
5
-
False
-
Moderate
-
None
-
None
-
None
-
None
Description of problem:
Plays starting with "---" will failing when calling multiple plays via render_template
How reproducible:
100%
Is this issue a regression from an earlier version:
Not sure.
Steps to Reproduce:
1. Create play1 and play2, both starting with "---"
2. Create a 3 play, that will call the play1 and play2
<%= render_template 'simple_play' %> <%= render_template 'simple_play1' %>
3. Try to execute it.
Actual behavior:
It will fail as below
[DEPRECATION WARNING]: ANSIBLE_COLLECTIONS_PATHS option, does not fit var naming standard, use the singular form ANSIBLE_COLLECTIONS_PATH instead. This feature will be removed from ansible-core in version 2.19. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. ERROR! We were unable to read either as JSON nor YAML, these are the errors we got from each: JSON: Expecting value: line 1 column 1 (char 0) Syntax Error while loading YAML. but found another document The error appears to be in '/tmp/d20241219-898-1tc2624/project/playbook.yml': line 10, column 1, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: --- ^ here Exit status: 4
and line 10 in this case is related to "---"
--- - hosts: all gather_facts: yes tasks: - name: Print something ansible.builtin.debug: msg: "I'm here, up and running" --- <<< THIS IS THE LINE IN QUESTION - hosts: all gather_facts: yes tasks: - name: Print something ansible.builtin.debug: msg: "I'm here Up Again, up and running"
Expected behavior:
Execute with no issues.
Business Impact / Additional info: