2018-04-01 20:20:23 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# I am an Ansible old-style module.
|
|
|
|
|
|
|
|
INPUT=$1
|
|
|
|
|
|
|
|
[ ! -r "$INPUT" ] && {
|
2018-04-02 07:05:37 +00:00
|
|
|
echo "Usage: $0 <input_file>" >&2
|
2018-04-01 20:20:23 +00:00
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "{"
|
|
|
|
echo " \"changed\": false,"
|
|
|
|
echo " \"msg\": \"Here is my input\","
|
2018-04-02 07:05:37 +00:00
|
|
|
echo " \"filename\": \"$INPUT\","
|
2018-04-01 20:20:23 +00:00
|
|
|
echo " \"input\": [\"$(cat $INPUT | tr \" \' )\"]"
|
|
|
|
echo "}"
|