I want to copy some data from obne dictioneary to teh other and use a task like this, which works fine:
``` - name: Create dg_helper for usage information about data_groups ansible.builtin.set_fact: dg_helper: "{{ dg_helper| default({}) | combine( { item: {' handled_in': [], 'backed_up_in': [], 'content' : data_groups[item].content }} ) }}" with_items: "{{ data_groups }}" no_log: true tags: data_overview ``` When I used folded or literal style used folded stype and literal style, I get the above mentioned error : ``` - name: Create dg_helper for usage information about data_groups ansible.builtin.set_fact: dg_helper: | "{{ dg_helper| default({}) | combine( { item: {'handled_in':[], 'backed_up_in':[], 'content': data_groups[ item].content } } ) }}" with_items: "{{ data_groups }}" tags: data_overview ``` This gives : ``` ansible-playbook --tags data_overview reports_scripts_pb.yml PLAY [Generate Reports] **************************************************************************************************************************************************************************************************************************** TASK [Create dg_helper for usage information about data_groups] ************************************************************************************************************************************************************************************ ok: [localhost] => (item=assets) fatal: [localhost]: FAILED! => {"msg": "failed to combine variables, expected dicts but got a 'AnsibleUnsafeText' and a 'dict': \n\"\\\"{'assets': {'handled_in': [], 'backed_up_in': [], 'content': 'Software, Graphiken, Fonts usw'}}\\\"\\n\"\n{\"audio\": {\"handled_in\": [], \"backed_up_in\": [], \"content\": \"Musik, H\\u00f6rspiele, H\\u00f6rb\\u00fccher\"}}"} ``` Why is this ? Thanks a lot Norbert -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d923f44c-46d6-45ee-85d5-c59a3482132en%40googlegroups.com.