Skip to content

Instantly share code, notes, and snippets.

@jondkelley
Created October 25, 2018 19:44
Show Gist options
  • Save jondkelley/b2e693e07acfbc3dac97705464edc9bb to your computer and use it in GitHub Desktop.
Save jondkelley/b2e693e07acfbc3dac97705464edc9bb to your computer and use it in GitHub Desktop.
cat a file in Windows using ansible
---
- name: 'get newrelic-infra config'
win_shell: 'more newrelic-infra.yml'
args:
chdir: 'C:\Program Files\New Relic\newrelic-infra\'
executable: cmd
register: hello
- name: 'show newrelic-infra config'
debug: msg="{{ hello.stdout.split('\n')[:-1] }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment