Error using wait_for exclude_hosts option

51 views
Skip to first unread message

Kevin Formsma

unread,
Oct 1, 2014, 5:18:47 PM10/1/14
to ansible...@googlegroups.com
I'm trying to use the new exclude_hosts option as part of the drained state on the wait_for module (https://github.com/ansible/ansible/pull/7260). I'm using the latest source from git.

However I'm getting the following error:
Traceback (most recent call last):
 
File "/home/monk/.ansible/tmp/ansible-tmp-1412198038.01-173699330634982/wait_for", line 1967, in <module>
    main
()
 
File "/home/monk/.ansible/tmp/ansible-tmp-1412198038.01-173699330634982/wait_for", line 326, in main
    exclude_hosts
= params['exclude_hosts'].split(',')
AttributeError: 'list' object has no attribute 'split'


My task looks like:
wait_for: host={{ ansible_hostname }} port=8080 state=drained exclude_hosts=somehost1,somehost2


Any ideas?

James Cammarata

unread,
Oct 1, 2014, 5:31:13 PM10/1/14
to ansible...@googlegroups.com
Hi Kevin, this appears to be a bug. Could you please open a GitHub issue for this? The fix for this is to remove the `.split(',')` from that line.

--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/31ac7699-cc36-48f0-b6a1-26ce43158d65%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kevin Formsma

unread,
Oct 2, 2014, 8:05:44 AM10/2/14
to ansible...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages