波斯火车头

task打印执行结果

使用debug输出task执行的register:

- name: check extract session
#  script: /app/ansiblecfg/XXX/roles/test/tasks/psgrep.sh > /home/shdxspark/psgrep.log
  script: /app/ansiblecfg/XXX/roles/test/tasks/psgrep.sh
  register: psgrep_output

#通过debug方式打印psgrep.sh脚本的返回结果psgrep_output
- debug: var=psgrep_output.stdout_lines

结果输出:

 

posted on 2017-01-24 13:01  波斯火车头  阅读(340)  评论(0编辑  收藏  举报