Ansible
Cmdra ships an Ansible connection plugin backed by the Python SDK.
Plugin path:
sdk/python/cmdra_client/ansible_plugins/connection/cmdra.py
Install the Ansible extra
.venv/bin/pip install -e './sdk/python[ansible]'
Set the plugin path
From the repository root:
export PYTHONPATH="$PWD/sdk/python"
export ANSIBLE_CONNECTION_PLUGINS="$PWD/sdk/python/cmdra_client/ansible_plugins"
export ANSIBLE_LOCAL_TEMP="${TMPDIR:-/tmp}/cmdra-ansible-local"
export ANSIBLE_REMOTE_TEMP="${TMPDIR:-/tmp}/cmdra-ansible-remote"
mkdir -p "$ANSIBLE_LOCAL_TEMP" "$ANSIBLE_REMOTE_TEMP"
Inventory variables
The plugin reads:
ansible_cmdra_addressansible_cmdra_ca_certansible_cmdra_client_certansible_cmdra_client_keyansible_cmdra_server_nameoptional
Example run
.venv/bin/ansible-playbook \
-i sdk/python/examples/ansible/inventory.ini \
sdk/python/examples/ansible/ping.yml
What the plugin maps to
exec_commandruns a shell command throughstart_shell_commandput_fileruns throughupload_filefetch_fileruns throughdownload_file
This lets standard Ansible modules operate through cmdrad rather than SSH.
History-management operations such as deleting one execution from history or clearing finished history are not exposed through the connection plugin. Use cmdractl, cmdraui, or one of the SDKs for those actions.