Ansible hosts group reference does not work I'm trying for hours already to run a docker installation on a specific group of hosts.
This is my hosts.yml
all:
  hosts:
    01-dev:
      ansible_host: &lt;IP1&gt;
    02-dev:
      ansible_host: &lt;IP2&gt;
    03-dev:
      ansible_host: &lt;IP3&gt;

  children:
    docker:
      hosts:
        01-dev
        02-dev
    dev:
      hosts:
        01-dev
        02-dev
        03-dev

This is my site.yml

- name: Configure hosts
  hosts: dev
  tasks:
    - name: Update and upgrade apt packages
      become: true
      apt:
        upgrade: yes
        update_cache: yes
        cache_valid_time: 86400 #One day
    - name: Install needed network manager libs
      become: yes
      ansible.builtin.package:
        name:
          - network-manager
        state: present
    - name: &quot;Configuring eth&quot;
      become: yes
      community.general.nmcli:
        conn_name: &quot;System ens18&quot;
        ifname: ens18
        type: ethernet
        state: present
        autoconnect: yes
        ip4: &quot;{{ansible_host}}/24&quot;
        gw4: &quot;192.168.3.1&quot;

  hosts: docker
  become: true
  tasks:
    - name: Install aptitude using apt
      apt: name=aptitude state=latest update_cache=yes force_apt_get=yes

    - name: Install required system packages
      apt: name={{ item }} state=latest update_cache=yes
      loop: [ 'apt-transport-https', 'ca-certificates', 'curl', 'software-properties-common', 'python3-pip', 'virtualenv', 'python3-setuptools']

    - name: Add Docker GPG apt Key
      apt_key:
        url: https://download.docker.com/linux/ubuntu/gpg
        state: present

    - name: Add Docker Repository
      apt_repository:
        repo: deb https://download.docker.com/linux/ubuntu bionic stable
        state: present

    - name: Update apt and install docker-ce
      apt: update_cache=yes name=docker-ce state=latest

    - name: Install Docker Module for Python
      pip:
        name: docker

Then I run the command ansible-playbook -i hosts.yml site.yml -vvv --ask-become-pass and I get the error that there are no hosts for a group docker
What is wrong with my hosts file?
I think it should be:
children:
    docker:
      hosts:
        01-dev:
        02-dev:

(The colon)