Simplify YAML callback tests (#9945)

Simplify YAML callback tests.
This commit is contained in:
Felix Fontein 2025-03-29 10:47:53 +01:00 committed by GitHub
parent bc64982259
commit e5e335348a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -67,7 +67,7 @@
ANSIBLE_NOCOLOR: 'true'
ANSIBLE_FORCE_COLOR: 'false'
ANSIBLE_STDOUT_CALLBACK: community.general.yaml
playbook: |
playbook: !unsafe |
- hosts: testhost
gather_facts: false
vars:
@ -78,9 +78,7 @@
tasks:
- name: Test to_yaml
debug:
msg: "{{ '{{' }}'{{ '{{' }}'{{ '}}' }} data | to_yaml {{ '{{' }}'{{ '}}' }}'{{ '}}' }}"
# The above should be: msg: "{{ data | to_yaml }}"
# Unfortunately, the way Ansible handles templating, we need to do some funny 'escaping' tricks...
msg: "{{ data | to_yaml }}"
expected_output: [
"",
"PLAY [testhost] ****************************************************************",