Ansible 2.0.0.2

I can run the yum module via ansible ad-hoc command 

ansible testloader -i inventory --vault-password-file ~/.vault_pass.txt -u 
ec2-user -m yum -a "name=* state=latest"

But when I run the module as a task inside the playbook I get module failed

TASK [test] 
********************************************************************
fatal: [54.175.222.151]: FAILED! => {"changed": false, "failed": true, 
"module_stderr": "", "module_stdout": "Traceback (most recent call 
last):\r\n  File 
\"/home/ec2-user/.ansible/tmp/ansible-tmp-1454614620.72-202915244324385/yum\", 
line 3767, in <module>\r\n    main()\r\n  File 
\"/home/ec2-user/.ansible/tmp/ansible-tmp-1454614620.72-202915244324385/yum\", 
line 1025, in main\r\n    disablerepo, disable_gpg_check, exclude, 
repoquery)\r\n  File 
\"/home/ec2-user/.ansible/tmp/ansible-tmp-1454614620.72-202915244324385/yum\", 
line 948, in ensure\r\n    res = latest(module, pkgs, repoq, yum_basecmd, 
conf_file, en_repos, dis_repos)\r\n  File 
\"/home/ec2-user/.ansible/tmp/ansible-tmp-1454614620.72-202915244324385/yum\", 
line 759, in latest\r\n    rc, out, err = module.run_command(yum_basecmd + 
['check-update'])\r\n  File 
\"/home/ec2-user/.ansible/tmp/ansible-tmp-1454614620.72-202915244324385/yum\", 
line 2792, in run_command\r\n    args = [ 
os.path.expandvars(os.path.expanduser(x)) for x in args ]\r\n  File 
\"/usr/lib64/python2.7/posixpath.py\", line 254, in expanduser\r\n    if 
not path.startswith('~'):\r\nAttributeError: 'NoneType' object has no 
attribute 'startswith'\r\n", "msg": "MODULE FAILURE", "parsed": false}

I don't understand why this is happening as I have an identical task within 
a different playbook (using a different set of group hosts), it works. 

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/bdbc8ee1-e751-493c-b0e7-bc56ca5e783e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to