--- - hosts: deployment connection: incus gather_facts: true tasks: - name: Wait for container to be ready wait_for_connection: timeout: 30 - name: Add inventory hostnames to /etc/hosts lineinfile: path: /etc/hosts line: "{{ item }}" state: present loop: - "192.168.56.21 dc01.example.local" - "192.168.56.22 client01.example.local" - name: Add Ansible PPA shell: | apt-get update apt-get install -y software-properties-common add-apt-repository --yes --update ppa:ansible/ansible - name: Install Ansible and dependencies apt: name: - ansible - python3-pip - python3-requests - nano state: present update_cache: yes