Last active
March 22, 2018 09:38
-
-
Save prandelicious/cc150825b6c4dec6c5c2a54941c1c066 to your computer and use it in GitHub Desktop.
[Ansible] Ways to write output of a register variable to a local file
This file contains hidden or 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: Write to local disk | |
local_action: "copy content='{{ result.stdout_lines }}' dest='../files/list_cronjobs/list_cronjobs.txt'" | |
- name: Write to local disk | |
lineinfile: dest=../files/list_cronjobs/list_cronjobs.txt create=yes line="{{ result.stdout_lines }}" | |
delegate_to: 127.0.0.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment