Today I tried to work through the Ansible Paramikoz Demo that uses ZEDS.
Everything was fine before I ran 'ansible "all" -m ping'.
root@sa01:/opt/workspace/ansible-paramikoz-demo# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3040ce2cde72 openssh-server:dev "/usr/sbin/sshd -D -…" 13 minutes ago Up 13 minutes 22/tcp ansible-paramikoz-demo_openssh-server_1
c39eb224f175 ssh-service-zet:dev "/docker-entrypoint.…" 13 minutes ago Up 13 minutes ansible-paramikoz-demo_ssh-service-zet_1
6883aea322cc ssh-service-sdk:dev "/bin/bash -c 'exec …" 13 minutes ago Up 13 minutes ansible-paramikoz-demo_ssh-service-sdk_1
When i runned it , i got
root@sa01:/opt/workspace/ansible-paramikoz-demo# ansible "all" -m ping -vvv
ansible [core 2.17.1]
config file = /opt/workspace/ansible-paramikoz-demo/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python3.10/dist-packages/ansible
ansible collection location = /opt/workspace/ansible-paramikoz-demo
executable location = /usr/local/bin/ansible
python version = 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (/usr/bin/python3)
jinja version = 3.1.3
libyaml = True
Using /opt/workspace/ansible-paramikoz-demo/ansible.cfg as config file
[DEPRECATION WARNING]: PARAMIKO_HOST_KEY_AUTO_ADD option, This option was moved to the plugin itself, use Use the option
from the plugin itself. instead. This feature will be removed from ansible-core in version 2.20. Deprecation warnings can
be disabled by setting deprecation_warnings=False in ansible.cfg.
host_list declined parsing /opt/workspace/ansible-paramikoz-demo/hosts.yaml as it did not pass its verify_file() method
script declined parsing /opt/workspace/ansible-paramikoz-demo/hosts.yaml as it did not pass its verify_file() method
Parsed /opt/workspace/ansible-paramikoz-demo/hosts.yaml inventory source with yaml plugin
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
<ansibletarget2.ziti> OPENZITI LOG LEVEL SET TO: 0
<ansibletarget1.ziti> OPENZITI LOG LEVEL SET TO: 0
The full traceback is:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/ansible/executor/task_executor.py", line 164, in run
res = self._execute()
File "/usr/local/lib/python3.10/dist-packages/ansible/executor/task_executor.py", line 636, in _execute
result = self._handler.run(task_vars=vars_copy)
File "/usr/local/lib/python3.10/dist-packages/ansible/plugins/action/normal.py", line 38, in run
result = merge_hash(result, self._execute_module(task_vars=task_vars, wrap_async=wrap_async))
File "/usr/local/lib/python3.10/dist-packages/ansible/plugins/action/__init__.py", line 1029, in _execute_module
self._make_tmp_path()
File "/usr/local/lib/python3.10/dist-packages/ansible/plugins/action/__init__.py", line 474, in _make_tmp_path
result = self._low_level_execute_command(cmd, sudoable=False)
File "/usr/local/lib/python3.10/dist-packages/ansible/plugins/action/__init__.py", line 1321, in _low_level_execute_command
rc, stdout, stderr = self._connection.exec_command(cmd, in_data=in_data, sudoable=sudoable)
File "/usr/local/lib/python3.10/dist-packages/ansible/plugins/connection/paramiko_ssh.py", line 544, in exec_command
super(Connection, self).exec_command(cmd, in_data=in_data, sudoable=sudoable)
File "/usr/local/lib/python3.10/dist-packages/ansible/plugins/connection/__init__.py", line 44, in wrapped
self._connect()
File "/opt/workspace/ansible-paramikoz-demo/ansible_collections/community/openziti/plugins/connection/paramiko.py", line 70, in _connect
self.init_options()
File "/opt/workspace/ansible-paramikoz-demo/ansible_collections/community/openziti/plugins/plugin_utils/_mixins.py", line 90, in init_options
self.ziti_identities = self.get_option('ziti_identities')
File "/opt/workspace/ansible-paramikoz-demo/ansible_collections/community/openziti/plugins/plugin_utils/_mixins.py", line 54, in ziti_identities
openziti.load(identity)
File "/usr/local/lib/python3.10/dist-packages/openziti/context.py", line 87, in load_identity
return ZitiContext.from_path(path)
File "/usr/local/lib/python3.10/dist-packages/openziti/context.py", line 77, in from_path
return cls(zitilib.load(path))
File "/usr/local/lib/python3.10/dist-packages/openziti/context.py", line 27, in __init__
raise TypeError("ctx is not a valid python void pointer type")
TypeError: ctx is not a valid python void pointer type
ansibletarget2.ziti | FAILED! => {
"msg": "Unexpected failure during module execution: ctx is not a valid python void pointer type",
"stdout": ""
}
The full traceback is:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/ansible/executor/task_executor.py", line 164, in run
res = self._execute()
File "/usr/local/lib/python3.10/dist-packages/ansible/executor/task_executor.py", line 636, in _execute
result = self._handler.run(task_vars=vars_copy)
File "/usr/local/lib/python3.10/dist-packages/ansible/plugins/action/normal.py", line 38, in run
result = merge_hash(result, self._execute_module(task_vars=task_vars, wrap_async=wrap_async))
File "/usr/local/lib/python3.10/dist-packages/ansible/plugins/action/__init__.py", line 1029, in _execute_module
self._make_tmp_path()
File "/usr/local/lib/python3.10/dist-packages/ansible/plugins/action/__init__.py", line 474, in _make_tmp_path
result = self._low_level_execute_command(cmd, sudoable=False)
File "/usr/local/lib/python3.10/dist-packages/ansible/plugins/action/__init__.py", line 1321, in _low_level_execute_command
rc, stdout, stderr = self._connection.exec_command(cmd, in_data=in_data, sudoable=sudoable)
File "/usr/local/lib/python3.10/dist-packages/ansible/plugins/connection/paramiko_ssh.py", line 544, in exec_command
super(Connection, self).exec_command(cmd, in_data=in_data, sudoable=sudoable)
File "/usr/local/lib/python3.10/dist-packages/ansible/plugins/connection/__init__.py", line 44, in wrapped
self._connect()
File "/opt/workspace/ansible-paramikoz-demo/ansible_collections/community/openziti/plugins/connection/paramiko.py", line 70, in _connect
self.init_options()
File "/opt/workspace/ansible-paramikoz-demo/ansible_collections/community/openziti/plugins/plugin_utils/_mixins.py", line 90, in init_options
self.ziti_identities = self.get_option('ziti_identities')
File "/opt/workspace/ansible-paramikoz-demo/ansible_collections/community/openziti/plugins/plugin_utils/_mixins.py", line 54, in ziti_identities
openziti.load(identity)
File "/usr/local/lib/python3.10/dist-packages/openziti/context.py", line 87, in load_identity
return ZitiContext.from_path(path)
File "/usr/local/lib/python3.10/dist-packages/openziti/context.py", line 77, in from_path
return cls(zitilib.load(path))
File "/usr/local/lib/python3.10/dist-packages/openziti/context.py", line 27, in __init__
raise TypeError("ctx is not a valid python void pointer type")
TypeError: ctx is not a valid python void pointer type
ansibletarget1.ziti | FAILED! => {
"msg": "Unexpected failure during module execution: ctx is not a valid python void pointer type",
"stdout": ""
}
I found the code and printed the ctx, but is none
def __init__(self, ctx):
print("Value of ctx is {} and type is {}".format(ctx, type(ctx)))
if not isinstance(ctx, int):
raise TypeError("ctx is not a valid python void pointer type")
self._ctx = ctx
The print is , How can i resolve this, thank you.
Value of ctx is None and type is <class 'NoneType'>