Following the example, the ansible work -m shell -a whoami command fails to run with the following error:
The full traceback is:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/ansible/executor/task_executor.py", line 140, in run
res = self._execute()
File "/usr/lib/python3/dist-packages/ansible/executor/task_executor.py", line 559, in _execute
self._set_connection_options(variables, templar)
File "/usr/lib/python3/dist-packages/ansible/executor/task_executor.py", line 896, in _set_connection_options
self._connection.set_options(var_options=options)
File "/home/user/ansible-qubes/connection_plugins/qubes.py", line 255, in set_options
if task_keys['delegate_to'] and 'management_proxy' in self._options:
TypeError: 'NoneType' object is not subscriptable
work | FAILED | rc=-1 >>
Unexpected failure during module execution.
Following the example, the
ansible work -m shell -a whoami
command fails to run with the following error:This is caused by this line https://github.com/Rudd-O/ansible-qubes/blob/c2f006868c69e95a60538269f6f156b8be49f8b2/connection_plugins/qubes.py#L255
Changing the line to the following solves the issue.