I'm using Ubuntu 20.04 LTS and trying to run some packages on a Ubuntu EC2 instance through Ansible.
I was trying to run "nginxdemos/hello" docker image for which I mistakenly did this:
- name: Add Docker Repository apt_repository: repo: deb https://hub.docker.com/r/nginxdemos/hello/ state: present
which I suppose is wrong. But even after correcting it to "deb-src https://download.docker.com/linux/ubuntu/ bionic stable" it's giving me this error:
FAILED! => {"changed": false, "msg": "E:Malformed entry 1 in list file /etc/apt/sources.list.d/hub_docker_com_r_nginxdemos_hello.list (Suite), E:The list of sources could not be read."}
When I check "sources.list.d" directory, this file "hub_docker_com_r_nginxdemos_hello.list" does not even exist.
How do I resolve this? Please help.