Comments (10)
The Create and start services on Docker-compose
task isn't a part of this role.
How are you starting Docker Compose in that task?
Have you checked the README about using the docker_*
modules? https://github.com/nickjj/ansible-docker#working-with-ansibles-docker_-modules
Do you get the same error if you run docker-compose up
on your server directly?
from ansible-docker.
Hi,
What version of Python do you have installed?
from ansible-docker.
HI
ansible_python_interpreter=/usr/bin/python3
ls -la /usr/bin/python3
lrwxrwxrwx 1 root root 9 Mar 13 2020 /usr/bin/python3 -> python3.8
from ansible-docker.
- name: Create and start services on Docker-compose
community.docker.docker_compose:
project_src: "/opt/erlymon/"
if you run directly, then no errors are displayed
docker-compose -v
docker-compose version 1.29.2, build unknown
docker-compose -f /opt/erlymon/docker-compose.yml up
Creating network "erlymon_default" with the default driver
Creating volume "erlymon_prometheus_data" with default driver
Creating volume "erlymon_grafana_data" with default driver
Pulling prometheus (prom/prometheus:latest)...
...
from ansible-docker.
Check the readme link I supplied.
from ansible-docker.
I added vars ansible_python_interpreter in task, nothing has changed
- name: Create and start services on Docker-compose
community.docker.docker_compose:
project_src: "/opt/erlymon/"
vars:
ansible_python_interpreter: "/usr/bin/env python3-docker"
from ansible-docker.
I was wrong, that's another task! Thank you very much for your help and patience.
from ansible-docker.
No problem, I'm guessing it's all working now?
from ansible-docker.
Yes, everything works with this. Thank you! Now installing the role on a clean host (exactly the role - task from examply) I encountered apt problem.
TASK [nickjj.docker : Install Docker's dependencies] ***************************
fatal: [monitoring-stage.e]: FAILED! => {"cache_update_time": 1622726890, "cache_updated": false, "changed": false, "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\" install 'apt-transport-https' 'gnupg2' 'software-properties-common' 'gcc' 'python3-dev' 'python3-pip' 'virtualenv'' failed: E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem. \n", "rc": 100, "stderr": "E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem. \n", "stderr_lines": ["E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem. "], "stdout": "", "stdout_lines": []}
dpkg --configure -a on host resolved this promblem. This is probably a problem with the ubuntu repositories. A couple of hours ago, from that virtual machine template with cloudinit, I did not observe this problem
from ansible-docker.
Typically a fresh host would have sudo apt-get update
run on it before preparing it to run Ansible, perhaps through a dedicated bootstrap role.
That's why this role doesn't run the update itself. IMO this is an anti-pattern of Ansible roles to run an apt update in every role, or define a cache timeout, it's something I used to do 5 years ago but stopped.
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
- 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
- Setting ansible_python_interpreter to "/usr/bin/env python3-docker" causes not found error HOT 1
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.