Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Dec 6th, 2018 65 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. #!/usr/bin/python
  2. """
  3. Description:
  4.   hajimete no ansible module
  5. """
  6. import json, shlex, sys
  7.  
  8.  
  9. def main():
  10.     result = {}
  11.     result['changed'] = False
  12.     result['message'] = 'Hello, World!'
  13.  
  14.     with open(sys.argv[1], 'rb') as args_file:
  15.         args = args_file.read()
  16.  
  17.     for arg in shlex.split(args):
  18.         (key, value) = arg.split('=')
  19.         if key == 'name':
  20.             result['message'] = '{name:s} is good!'.format(name=value)
  21.  
  22.     print(json.dumps(result))
  23.  
  24.  
  25. if __name__ == '__main__':
  26.     main()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top