With a basic test Ansible playbook
- name: Manage Incus instances
hosts: all
gather_facts: false
tasks:
- name: Run a command in Incus instance
command: echo "Hello from Incus"
- name: Run again
command: echo "Hello again"
It takes 35 seconds to execute. Meanwhile,
incus exec a echo "Hello from Incus" && incus shell exec a "Hello again"
only takes 4 seconds. This is with an Ubuntu cloud container instance