"invalid output"

ansible 1.6.10 running against centOS 6.5

  • name: Update all packages
    yum: name=* state=latest

got me:

TASK: [common | Update all packages] ******************************************
failed: [jedis-test] => {“failed”: true, “parsed”: false}
invalid output was: SUDO-SUCCESS-dhgoviiavigzenubojkfnnvxvpesnmih

Running it a second time with -vvvv succeeded. I’m guessing ansible ran into something like a prompt to import a GPG key. But the above output doesn’t help me figure that out :slight_smile:

I’ve seen that output when trying to run a blank module- are you doing fun things with modules or even action plugins?

On a remote system that has not yet run this step once, do this for me.

(A) checkout ansible from git
(B) source ./hacking/env-setup
(C) ./hacking/test-module -m yum - a “name=‘*’ state=latest”

Paste what you get back.

This should help us see what was going on.

[joliver@localhost ansible]$ source ./hacking/env-setup

Setting up Ansible to run out of checkout…

PATH=/home/joliver/ansible/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/joliver/bin
PYTHONPATH=/home/joliver/ansible/lib:
ANSIBLE_LIBRARY=/home/joliver/ansible/library:/usr/share/ansible/:/home/joliver/ansible/library
MANPATH=/home/joliver/ansible/docs/man:

Remember, you may wish to specify your host file with -i

Done!

[joliver@localhost ansible]$ ./hacking/test-module -m yum - a “name=‘*’ state=latest”
Traceback (most recent call last):
File “./hacking/test-module”, line 37, in
import ansible.utils as utils
File “/home/joliver/ansible/lib/ansible/utils/init.py”, line 23, in
import yaml
ImportError: No module named yaml

You’ll need to install the dependencies of the project.

One easy way without remembering the deps (which are small) is to just install the release version, then switch over the “running from source” bits.

pip install ansible

etc