- name: Install Docker. package: name: - docker - docker-compose state: present notify: restart docker - name: Ensure Docker is started and enabled at boot. service: name: docker state: "{{ docker_service_state }}" enabled: "{{ docker_service_enabled }}" - include_tasks: docker-users.yml when: docker_users | length > 0