try to avoid adding docker.list
- name: add docker repo
lineinfile:
path: "/etc/apt/sources.list.d/docker.list"
regexp: ".*https://download.docker.com/linux/.*"
create: true
line: "deb [arch=amd64] https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ os_codename }} stable"