Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- """
- Description:
- hajimete no ansible module
- """
- import json, shlex, sys
- def main():
- result = {}
- result['changed'] = False
- result['message'] = 'Hello, World!'
- with open(sys.argv[1], 'rb') as args_file:
- args = args_file.read()
- for arg in shlex.split(args):
- (key, value) = arg.split('=')
- if key == 'name':
- result['message'] = '{name:s} is good!'.format(name=value)
- print(json.dumps(result))
- if __name__ == '__main__':
- main()
Add Comment
Please, Sign In to add comment