Comments (9)
Resolved : add to change docker.yml and add the following line :
docker.yml
-
name: Example
hosts: "all"
become: true
become_method: sudoroles:
- role: "nickjj.docker"
vars:
docker__users: ["administrator"]
tags: ["docker"]
- role: "nickjj.docker"
from ansible-docker.
Hi,
That typically happens when something bad happens with apt (package installation failure, etc.).
I'm not sure what you did exactly but I see you closed this issue. What did you end up doing?
from ansible-docker.
Hello, thanks for your reply.
As I do not know what's wrong with the vm, but I have done many things with apt, nothing successful. I was able to install the dependencies manually with sudo apt, but now I have this error at Add Docker's public GPG key : FAILED! => {"changed": false, "cmd": "/usr/bin/apt-key add -", "msg": "Warning: apt-key output should not be parsed
They should be both the same as nothing was installed on it but the OS, that's why I've asked the team for a new install of both, I've closed the issue for now and I will try to redeploy again when they're up, because as you've said that's nothing related to the role.
Regards
from ansible-docker.
With a fresh install of ubuntu I still have the problem on both.
Any ideas ?
from ansible-docker.
What version of Ubuntu are you using?
from ansible-docker.
from ansible-docker.
Interesting, I've never seen that error and I've installed this role dozens of times on Ubuntu 20.04.
What version of Ansible are you using?
I also never had to set become_method: sudo
because sudo
is the default. Maybe you overrode Ansible's defaults in your ansible.cfg file? You can see it's the default based on https://github.com/ansible/ansible/blob/4b673484f06fa9464601c27706c8a43d1e11bbcb/examples/ansible.cfg#L341.
from ansible-docker.
I did not change the ansible.cfg
The thing is that I use the devops azure as repository for the yml files and I run ansible playbooks from there with a release pipeline.
Well, I had many issues but you're right, I have removed become_method and it's still working. I was using become_user = administrator, it was working on only one node before the new install of the vms.
Right now, it's working and I'm new with ansible so I do make mistakes for sure ;)
Thanks for your work.
from ansible-docker.
Ah that makes sense then. When in doubt check the readme's example playbook. It has everything you need at the playbook level to make things work, which in this case is setting become: true
because root access is needed by this role to apt install packages and create certain config files in various /etc
paths, etc..
Often times you'll create some type of admin user and run Ansible as that user. Setting become: true
makes sure tasks are run with sudo
by default, otherwise you would run into permission issues for that admin user when encountering tasks that require root.
from ansible-docker.
Related Issues (20)
- Support for docker.io package (in addition to ce and ee) HOT 4
- 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.