Install Docker on Ubuntu localhost using Ansible Playbook --- - hosts: localhost tasks: - name: Update all packages to the latest version apt: name: "*" state: latest when: ansible_facts['os_family'] == "Debian" become: true - name: Upgrade all packages to the latest version apt: upgrade: dist when: ansible_facts['os_family'] == "Debian" become: true - name: Install apt-transport-https package: name: apt-transport-https state: present when: ansible_facts['os_family'] == "Debian" become: true - name: Install ca-certificates package: name: ca-certificates state: present when: ansible_facts['os_family'] == "Debian" become: true - name: Install curl package: ...