Comments (15)
Closing this. It's been addressed in v1.8.0
which is available in the Galaxy. The role is back to working with Ansible 2.5 and 2.7.
from ansible-docker.
What type of environment are you running this under?
On Ubuntu 16.04, Ubuntu 18.04 and Debian Stretch it installs on a fresh box using version "latest" with state "present".
from ansible-docker.
Microsoft Azure : Canonical, UbuntuServer, 18.04-LTS, latest
from ansible-docker.
Here's what I used for testing where everything ran successfully:
- Set up those 3 distros using Docker images
- Created a stock Ubuntu 18.04 VM using the server ISO on Ubuntu's site
- Set up a brand new DigitalOcean 18.04 server
In all 3 cases, the role ran to completion and installed the latest version of Docker and Docker Compose.
In all 3 cases, I ran apt-get update -y && apt-get install -y python
before this role since that's required for Ansible to run. This is a common bootstrap strategy.
What happens if you add that to a pre_tasks
in your playbook?
from ansible-docker.
Here's a complete task you can drop in:
- name: Install Python without using Ansible modules
raw: >
bash -c "test -e /usr/bin/python \
|| (apt-get -qy update && apt-get install -qy python)"
changed_when: false
It's using raw since this is meant to be ran before Ansible is even capable of being run.
from ansible-docker.
Here's my playbook:
- hosts: "host"
become: true
become_method: sudo
roles:
- { role: "nickjj.docker", tags: ["docker"] }
pre_tasks:
- name: Install python 2
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
from ansible-docker.
Does anything change if you use python
instead of python-minimal
?
from ansible-docker.
Same error with python
instead of python-minimal
from ansible-docker.
You could try adding this after the - name: Install Virtualenv
task:
- name: Upgrade PIP
pip:
name: "pip"
virtualenv: "{{ docker__pip_virtualenv }}"
state: "forcereinstall"
Truthfully I'm not sure why that would be needed on Azure, but it's worth trying.
from ansible-docker.
Also what version of Ansible are you using? Maybe the pip
package changed in some way to automatically convert latest
to being omit. I'm running 2.7.5
.
from ansible-docker.
Another thing you could try is setting docker__compose_version: ""
. Let me know if that installs the latest version without erroring out. If it does, that's likely something I should merge into the next release.
from ansible-docker.
I'm using Ansible 2.5.1
from ansible-docker.
Working fine with Ansible 2.7.5
from ansible-docker.
Thanks. Did you happen to try ""
with 2.5.1?
from ansible-docker.
Going by some PR I read I think ""
will fail with 2.5.1 too.
I think any version that's not parseable as a version is getting cast to ""
and in 2.5.x, ""
gets passed into pip like pip install docker-compose==""
(which is invalid) but with 2.7.x it gets set as pip install docker-compose
because Ansible doesn't set the version for empty strings.
I'll leave this issue open until I address a solution that works for both 2.5.x and 2.7.x, thanks for the heads up.
from ansible-docker.
Related Issues (20)
- Support for docker.io package (in addition to ce and ee) HOT 4
- Failed : Install Docker's dependencies HOT 9
- Package dependency error for Docker installation on clean Ubuntu 18.04 HOT 11
- Ubuntu 20.04 ImportError: No module named pkg_resources HOT 10
- Avoid docker login issue with X11 HOT 11
- Expected behavior for DockerHub private repositories login options? HOT 19
- Failed to import the required Python library HOT 10
- Update apt cache before installing packages HOT 1
- Add way to add additional packages to install HOT 3
- Versioning pinning not working HOT 5
- Install Python packages: Could not get output from /usr/local/bin/virtualenv --help HOT 16
- Hi; Please consider suppressing credentials output in: Manage Docker registry login credentials HOT 8
- Upgrade edge case HOT 9
- I'm thinking about no longer setting up a virtualenv, pip installing docker / docker compose and switching the docker_login module to a shell script HOT 2
- docker not installed into /usr/local/bin HOT 4
- Unable to find pip in the virtualenv HOT 8
- Error in new v2.2.0 version when using ansible 2.9.14 HOT 3
- Docker Compose V1 causes the Install Python packages step to crash HOT 3
- Error with pip on basic usage HOT 2
- Task exception at: Install Python packages HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-docker.