- hosts: localhost tasks: - name: Create LXD container snapshot ansible.builtin.shell: lxc snapshot {{ name }} {{ label | default('') }}