error in module docs

100 views
Skip to first unread message

pixel fairy

unread,
Feb 20, 2015, 7:39:30 PM2/20/15
to ansible...@googlegroups.com
http://docs.ansible.com/developing_modules.html

the verbose educational example dumped this

ansible/hacking/test-module -m ./timex.py -a time=\"March 14 12:23\"
* including generated source, if any, saving to: /Users/pixel/.ansible_module_generated
* this may offset any line numbers in tracebacks/debuggers!
***********************************
RAW OUTPUT

Traceback (most recent call last):
  File "/Users/pixel/.ansible_module_generated", line 21, in <module>
    arguments = shlex.split(args_data)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shlex.py", line 279, in split
    return list(lex)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shlex.py", line 269, in next
    token = self.get_token()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shlex.py", line 96, in get_token
    raw = self.read_token()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shlex.py", line 172, in read_token
    raise ValueError, "No closing quotation"
ValueError: No closing quotation

***********************************
INVALID OUTPUT FORMAT

Traceback (most recent call last):
  File "ansible/hacking/test-module", line 153, in runtest
    results = utils.parse_json(out)
  File "/void/pixel/vcstree/ansible/lib/ansible/utils/__init__.py", line 541, in parse_json
    results = json.loads(data)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

pixel fairy

unread,
Feb 20, 2015, 7:43:36 PM2/20/15
to ansible...@googlegroups.com
forgot a few things. this is on os x 10.8, using ansible checked out from github.

$ uname -a
Darwin bonechar.socal.rr.com 14.1.0 Darwin Kernel Version 14.1.0: Mon Dec 22 23:10:38 PST 2014; root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64
bonechar:vcstree pixel$ ansible --version
ansible 1.9 (devel 1e867b0b8e) last updated 2015/02/15 10:11:02 (GMT -700)
  lib/ansible/modules/core: (detached HEAD 4ba2d55589) last updated 2015/02/14 14:50:25 (GMT -700)
  lib/ansible/modules/extras: (detached HEAD 2ffd7235e5) last updated 2015/02/14 14:50:28 (GMT -700)
  v2/ansible/modules/core: (detached HEAD 34784b7a61) last updated 2015/02/14 14:50:31 (GMT -700)
  v2/ansible/modules/extras: (detached HEAD 312d59061c) last updated 2015/02/14 14:50:35 (GMT -700)
  configured module search path = None

Dan Vaida

unread,
Feb 21, 2015, 2:26:51 PM2/21/15
to ansible...@googlegroups.com
Not to intrude, but I think you will have more luck in here: https://groups.google.com/forum/#!forum/ansible-devel
Reply all
Reply to author
Forward
0 new messages