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