You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ source hacking/env-setup
$ cd ../playbooks/
$ ansible-playbook -k -K --tags=apt -i issue11320-inventory issue11320.yml
SSH password:
SUDO password[defaults to SSH password]:
PLAY ****************************************************************************
TASK [setup] ********************************************************************
<snip>
fatal: [www.bright-futures.org]: FAILED! => {
"failed": true,
"msg": "ERROR! [Errno 51] Network is unreachable"
}
<snip>
[ERROR]: Unexpected Exception: 'NoneType' object is not iterable
With debug enabled and --fork=1
$ ansible-playbook -k -K --tags=apt -i issue11320-inventory issue11320.yml --fork=1 -vvv
Using /Volumes/Warrior1TB/Users/tanner/projects/ansible.git/playbooks/ansible.cfg as config file
SSH password:
SUDO password[defaults to SSH password]:
1 plays in issue11320.yml
PLAY ****************************************************************************
TASK [setup] ********************************************************************
<snip>
fatal: [www.bright-futures.org]: FAILED! => {
"failed": true,
"msg": "ERROR! [Errno 51] Network is unreachable"
}
<snip>
[ERROR]: Unexpected Exception: 'NoneType' object is not iterable
the full traceback was:
Traceback (most recent call last):
File "/Volumes/Warrior1TB/Users/tanner/projects/ansible.git/ansible/bin/ansible-playbook", line 77, in <module>
sys.exit(cli.run())
File "/Volumes/Warrior1TB/Users/tanner/projects/ansible.git/ansible/lib/ansible/cli/playbook.py", line 148, in run
results = pbex.run()
File "/Volumes/Warrior1TB/Users/tanner/projects/ansible.git/ansible/lib/ansible/executor/playbook_executor.py", line 161, in run
result = self._tqm.run(play=play)
File "/Volumes/Warrior1TB/Users/tanner/projects/ansible.git/ansible/lib/ansible/executor/task_queue_manager.py", line 194, in run
return strategy.run(iterator, play_context)
File "/Volumes/Warrior1TB/Users/tanner/projects/ansible.git/ansible/lib/ansible/plugins/strategies/linear.py", line 141, in run
host_tasks = self._get_next_task_lockstep(hosts_left, iterator)
File "/Volumes/Warrior1TB/Users/tanner/projects/ansible.git/ansible/lib/ansible/plugins/strategies/linear.py", line 103, in _get_next_task_lockstep
return _advance_selected_hosts(hosts, lowest_cur_block, PlayIterator.ITERATING_TASKS)
File "/Volumes/Warrior1TB/Users/tanner/projects/ansible.git/ansible/lib/ansible/plugins/strategies/linear.py", line 85, in _advance_selected_hosts
(s, t) = host_tasks[host.name]
TypeError: 'NoneType' object is not iterable
Remove the unreachable host from the inventory file.
We believe the above commit should resolve this problem for you. This will also be included in the next major release.
If you continue seeing any problems related to this issue, or if you have any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:
Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular issue is resolved.
Issue Type:
Bug Report
Ansible Version:
$ ansible --version
ansible 2.0.0 (devel ae54792) last updated 2015/07/21 22:43:44 (GMT -500)
lib/ansible/modules/core: (detached HEAD 55bc9e8) last updated 2015/07/21 15:39:28 (GMT -500)
lib/ansible/modules/extras: (detached HEAD 26c1bd7) last updated 2015/07/21 15:39:28 (GMT -500)
v1/ansible/modules/core: (detached HEAD f8d8af1) last updated 2015/06/03 00:37:54 (GMT -500)
v1/ansible/modules/extras: (detached HEAD 495ad45) last updated 2015/06/03 00:37:58 (GMT -500)
configured module search path = None
Ansible Configuration:
$ source hacking/env-setup
Environment:
OS X Yosemite 10.10.4
$ python -V
Python 2.7.6
$ pip freeze
ansible==2.0.0
coverage==3.7.1
coveralls==0.5
docopt==0.6.2
ecdsa==0.13
epdb==0.12
httplib2==0.9.1
isodate==0.5.1
Jinja2==2.7.3
kerberos==1.2.2
linecache2==1.0.0
MarkupSafe==0.23
mock==1.0.1
nose==1.3.7
paramiko==1.15.2
passlib==1.6.2
pycallgraph==1.0.1
pycrypto==2.6.1
pywinrm==0.0.3
PyYAML==3.11
requests==2.7.0
six==1.9.0
traceback2==1.4.0
unittest2==1.0.1
xmltodict==0.9.2
Summary:
When a host is unreachable ansible-playbook eventually throws an [ERROR]: Unexpected Exception: 'NoneType' object is not iterable
Steps To Reproduce:
Using the same setup and configuration I used in #11320
With debug enabled and --fork=1
Remove the unreachable host from the inventory file.
Expected Results:
I assume the plays would run to completion even if multiple hosts are unreachable.
The text was updated successfully, but these errors were encountered: