如何通过线调试重定向输出线成文本文件剧本后执行

问题描述 投票:1回答:2

如何通过线调试重定向输出线成文本文件剧本执行后。

- name: Copy content to the output file ====> ( redirecting output variable i.e.  paths to a file.)
  copy:
      content: "{{ paths }}"  
      dest:"/home/oracle/script_results/{{inventory_hostname}}_get_facts.txt" 

得到这个输出在同一行..

[u'/u01/oracle/Oracle_Home/abc.txt', u'/u01/oracle/Oracle_Home/oracle.jar', u'/u01/oracle/Oracle_Home/oracle.war', u'/u01/oracle/Oracle_Home/oracle.ear', u'/u01/oracle/Oracle_Home/xyz.ear'

,.........续。

ansible
2个回答
© www.soinside.com 2019 - 2024. All rights reserved.