Last active
August 27, 2015 09:22
-
-
Save shirou/6670bca78673d8e150d5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: sh run | |
raw : "show run" | |
register: show_run | |
- name: sh run output | |
local_action: shell /bin/echo "{{ item }}" >> /tmp/hoge # >> なのに注意。この前に書き出し先ファイルを消しておく必要があるかも | |
with_items: show_run.stdout_lines | |
# joinを使う方式では、空白が削られてしまった。 | |
# - name: sh run output | |
# local_action: shell /bin/echo "{{ show_run.stdout_lines | join('\n')}}" > /tmp/hoge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment