Skip to content

Instantly share code, notes, and snippets.

@Alphadelta14 Alphadelta14/stdout
Created Aug 25, 2016

Embed
What would you like to do?
PLAY [localhost] **************************************************************
GATHERING FACTS ***************************************************************
<localhost> REMOTE_MODULE setup
ok: [localhost]
TASK: [mylib | Test library out] **********************************************
<localhost> REMOTE_MODULE testlib something=else hello=world
ok: [localhost] => {"argv": ["/home/alpha/.ansible/tmp/ansible-tmp-1472124073.82-220477884547431/testlib", "/home/alpha/.ansible/tmp/ansible-tmp-1472124073.82-220477884547431/arguments"], "data": "something=else hello=world "}
PLAY RECAP ********************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=0
- name: "Test library out"
testlib:
hello: "world"
something: "else"
#!/usr/bin/env python
import sys
import json
data = open(sys.argv[1]).read()
print json.dumps({
"argv": sys.argv,
"data": data
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.