Created
August 25, 2016 11:22
-
-
Save Alphadelta14/49c2cf738d2adbfb906638c51124b597 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
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 |
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: "Test library out" | |
testlib: | |
hello: "world" | |
something: "else" |
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
#!/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