Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 766 Bytes

README.md

File metadata and controls

23 lines (15 loc) · 766 Bytes

ansible-docker

Steps to run a role on a container docker :

Add yourself to docker group :

  • sudo usermod -aG

Create a directory keys in container :

Run the role on the container :

  • ansible-playbook -v --ask-sudo-pass -e "container_name=container ports=['80'] role=laReponse" site.yml

If you have an error :

  • fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "ConnectionError: ('Connection aborted.', error(2, 'No such file or directory'))"}

run the docker service, on archlinux "systemctl start docker.service"

If you have an error :

  • "fatal: [localhost]: FAILED! => {"failed": true, "msg": "list object has no element 0"}"

run "docker kill container"