Hi I'm trying out the docker module and I want to run it without sudo as
root, but dont know why I get permission errors, running locally works
great.
I've added usermod -aG docker stefan
stefan@docker1:~$ groups
stefan docker
stefan@docker1:~$ docker ps
CONTAINER ID IMAGE COMMAND CREATED
STATUS PORTS NAMES
097yj2dfafb02 webtest:latest "apache2ctl -DFOREGR 35 minutes
ago Up 35 minutes 18.18.10.16:8080->80/tcp webtest
stefan@docker1:~$ docker stop 4927fdfafb02
097yj2dfafb02
IP
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state
UP group default qlen 1000
inet 18.10.10.16/24 brd 10.18.10.255 scope global eth0
And the ansible command:
- name: remove container
docker:
name: "{{ ansible_hostname }}"
image: webtest
state: absent
sudo: no
failed: [18.18.10.16] => {"changed": false, "failed": true}
msg: ConnectionError(ProtocolError('Connection aborted.', error(13,
'Permission denied')),)
I dont know why I get permission denied when I can run the commands locally
with docker.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/f77ddf5f-0c1f-4a96-80d7-5a3fd1e17354%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.