Thanks! I was totally blind to that... ________________________________ From: ansible-project@googlegroups.com <ansible-project@googlegroups.com> on behalf of Matt Martz <m...@sivel.net> Sent: Tuesday, January 23, 2018 2:15:31 PM To: ansible-project@googlegroups.com Subject: Re: [ansible-project] ERROR! Unexpected Exception, this is probably a bug: unhashable type: 'dict'
You need to drop the `name: ` from your `notify`: ``` notify: - restart postgres ``` On Tue, Jan 23, 2018 at 12:15 PM, <timothy.w...@plexresearch.com<mailto:timothy.w...@plexresearch.com>> wrote: Running Ansible 2.4.2.0 on OSX 10.13.2 (via macports), python version 3.6.4. I'm running a playbook of some 100-odd tasks and this error occurs at some point in that operation. I can repeatedly run the playbook and get successively closer to the end. Some operations must run; if everything is skipped then no error occurs. The stack trace usually seems to point to a handler, but I can't spot the error. With "-vvv": the full traceback was: Traceback (most recent call last): File "/opt/local/bin/ansible-playbook", line 106, in <module> exit_code = cli.run() File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ansible/cli/playbook.py", line 130, in run results = pbex.run() File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ansible/executor/playbook_executor.py", line 154, in run result = self._tqm.run(play=play) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ansible/executor/task_queue_manager.py", line 290, in run play_return = strategy.run(iterator, play_context) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ansible/plugins/strategy/linear.py", line 292, in run results += self._wait_on_pending_results(iterator) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ansible/plugins/strategy/__init__.py", line 586, in _wait_on_pending_results results = self._process_pending_results(iterator) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ansible/plugins/strategy/__init__.py", line 470, in _process_pending_results if handler_name in self._listening_handlers: TypeError: unhashable type: 'dict' It would seem that the error is happening when notifications are collected, e.g. one task after which the failure occurs. Note that this is one task in the middle of several which do the "notify": - name: install hiredis 0.13 shared library become: yes copy: src={{ item.src }} dest={{ item.dest }} mode={{ item.mode }} with_items: - { src: "libhiredis.so.0.13", dest: "/usr/lib64/", mode: '0755' } tags: provision, hiredis, redis_fdw notify: - name: restart postgres The handler definition: --- - name: restart postgres become: yes service: name="{{ pg_service }}" state=restarted - name: reload sysctl configuration become: yes shell: sysctl -p /etc/sysctl.conf -- 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-project+unsubscr...@googlegroups.com<mailto:ansible-project+unsubscr...@googlegroups.com>. To post to this group, send email to ansible-project@googlegroups.com<mailto:ansible-project@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c80ee46d-edcb-4d7f-8bd3-99de620df508%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/c80ee46d-edcb-4d7f-8bd3-99de620df508%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- Matt Martz @sivel sivel.net<http://sivel.net> -- You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/6aqZBCG6I8k/unsubscribe. To unsubscribe from this group and all its topics, send an email to ansible-project+unsubscr...@googlegroups.com<mailto:ansible-project+unsubscr...@googlegroups.com>. To post to this group, send email to ansible-project@googlegroups.com<mailto:ansible-project@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAD8N0v-rmOtBT8-5DOs6sz-kUctO296DHvT6U0Lks7t1BRtzdA%40mail.gmail.com<https://groups.google.com/d/msgid/ansible-project/CAD8N0v-rmOtBT8-5DOs6sz-kUctO296DHvT6U0Lks7t1BRtzdA%40mail.gmail.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- 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-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CY4PR22MB1655DC3D1DBDC098691F1558CFE30%40CY4PR22MB1655.namprd22.prod.outlook.com. For more options, visit https://groups.google.com/d/optout.