Closed marcbria closed 7 months ago
Ok. My approach was wrong. :-)
As far as I can see the role allows to define a virtualenv, so you don't need to add additional tasks... just use the features the role offers tot you.
If you got a similar issue, my solution was restarting it all as follows:
/usr/local/lib/docker
virtualenv folder- name: Installs Docker and Docker Compose using the ansible-docker role
hosts: all
become: yes
vars:
docker__channel: ["stable"]
docker__state: "latest"
docker__compose_v2_version: ""
docker__users: ["{{ ansible_env.SUDO_USER | d('root') }}"]
# docker__pip_virtualenv: "/usr/local/lib/docker/virtualenv"
# docker__pip_dependencies:
# - "python3-pip"
# - "virtualenv"
roles:
- name: nickjj.docker
And now, all worked like a charm.
Thanks @nickjj for your great work!
No problem, happy to hear it worked for you in the end.
By the way, the latest version of this role uses Docker Compose v2 and doesn't pip install Docker Compose v1 anymore by default, https://github.com/nickjj/ansible-docker?tab=readme-ov-file#installing-docker-compose-v1 has more details.
Hi,
Thanks a lot for sharing this nickjj.
I defined my playbook as follows:
I ran it from my laptop to a brand new debian12 and I got the following error:
So, just for testing, I created an additional playbook to install pip3 as follows:
But after running this new playbook, when I ran docker-install I got the same error. Am I doing something wrong?
Thanks for your help, m.