---
- name: Add docker script
  command: curl -fsSL https://get.docker.com -o /root/get-docker.sh

- name: install docker
  command: sh /root/get-docker.sh

- name: Create docker configuration directory
  file:
    path: /etc/docker
    state: directory

- name: Configure docker
  template:
    src: daemon.json.j2
    dest: /etc/docker/daemon.json
  notify:
    - Reload systemd configuration
    - Restart docker service
