Re: [ansible-project] copy content module is not readable, how to remove all special character and make it proper text readable

2021-02-18 Thread Sameer Nagwekar
Thank you so much that worked like a charm. This was my first successful playbook :-) On Thursday, February 18, 2021 at 9:47:30 AM UTC-8 dick@geant.org wrote: > This is because your data is json formatted, but your debug uses yaml > to display. > It could be as simple as adding the

Re: [ansible-project] copy content module is not readable, how to remove all special character and make it proper text readable

2021-02-18 Thread Dick Visser
This is because your data is json formatted, but your debug uses yaml to display. It could be as simple as adding the to_nice_yaml filter, i.e.: - name: copy the output copy: content: "{{ result | to_nice_yaml }}" dest: "/home/sameer/Documents/icx.txt" delegate_to:

Re: [ansible-project] copy content module is not readable, how to remove all special character and make it proper text readable

2021-02-18 Thread Sameer Nagwekar
Sorry for being little ambiguous. Here is the output of my file when I read it. It is all clubbed together with newline \n and no proper formatting. === more icx.txt {"ansible_facts": {"ansible_net_gather_subset": ["config",

Re: [ansible-project] copy content module is not readable, how to remove all special character and make it proper text readable

2021-02-17 Thread Dick Visser
On Wed, 17 Feb 2021 at 22:09, Sameer Nagwekar wrote: > I am able to run this playbook it copies the file to destination folder > but it has all the special characters and the text is not in readable > format. Any help in formatting the output file? > "special characters" is a bit ambiguous.

[ansible-project] copy content module is not readable, how to remove all special character and make it proper text readable

2021-02-17 Thread Sameer Nagwekar
I am able to run this playbook it copies the file to destination folder but it has all the special characters and the text is not in readable format. Any help in formatting the output file? tasks: - name: collect the config facts icx_facts: gather_subset: - config