Ever since moving from Ansible 1.9.4 to 2.0.0.2 on Ubuntu 14.04, running a
local play such as...
ansible-playbook -c local deploy.yml
... throws...
Traceback (most recent call last):
File "/usr/bin/ansible-playbook", line 85, in <module>
sys.exit(cli.run())
File "/usr/lib/pymodules/python2.7/ansible/cli/playbook.py", line 150, in
run
results = pbex.run()
File "/usr/lib/pymodules/python2.7/ansible/executor/playbook_executor.py",
line 148, in run
result = self._tqm.run(play=play)
File "/usr/lib/pymodules/python2.7/ansible/executor/task_queue_manager.py"
, line 237, in run
play_return = strategy.run(iterator, play_context)
File "/usr/lib/pymodules/python2.7/ansible/plugins/strategy/linear.py",
line 224, in run
task_vars = self._variable_manager.get_vars(loader=self._loader, play=
iterator._play, host=host, task=task)
File "/usr/lib/pymodules/python2.7/ansible/vars/__init__.py", line 341, in
get_vars
all_vars['ansible_delegated_vars'] = self._get_delegated_vars(loader,
play, task, all_vars)
File "/usr/lib/pymodules/python2.7/ansible/vars/__init__.py", line 479, in
_get_delegated_vars
include_hostvars=False,
File "/usr/lib/pymodules/python2.7/ansible/vars/__init__.py", line 245, in
get_vars
all_vars = combine_vars(all_vars, host.get_vars())
File "/usr/lib/pymodules/python2.7/ansible/inventory/host.py", line 129,
in get_vars
results['inventory_hostname_short'] = self.name.split('.')[0]
AttributeError: 'NoneType' object has no attribute 'split'
The task in question involves a 'composer update' which is the first point
in the play that connects to an external source but that's neither here nor
there.
I don't have any entries in my /etc/ansible/hosts file as in 1.9.4.
I've tried modifying my local hostname in various formats without luck.
This issue is discussed here
<https://github.com/ansible/ansible/issues/13608> but, to be completely
honest, I don't understand the conclusion.
I didn't have trouble with this in 1.9.4. Can someone please explain where
I should look to resolve this or what has changed between the versions?
--
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/e898bab5-9b6f-413e-a794-790e703c23b3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.