Docker compose and ansible: site.yml does not appear to be a file -


im building docker-compose service probes db service start before starting test on app. docker-compose files worked great , created new host docker machine , error when running:

docker-compose agent 

this docker-compose.yml

test:   build: ../../   dockerfile: docker/dev/dockerfile   volumes_from:     - cache   links:     - db   environment:     django_settings_module: todobackend.settings.test     mysql_host: db     mysql_user: root     mysql_password: password     test_output_dir: /reports  builder:   build: ../../   dockerfile: docker/dev/dockerfile   volumes:     - ../../target:/wheelhouse   volumes_from:     - cache   entrypoint: "entrypoint.sh"   command: ["pip", "wheel", "--no-index", "-f /build", "."]   agent:   image: pjestrada/ansible   volumes:     - ../../ansible/probe.yml:/ansible/site.yml   links:     - db   environment:     probe_host: "db"     probe_port: "3306"  db:   image: mysql:5.6   hostname: db   expose:     - "3306"   environment:     mysql_root_password: password  cache:     build: ../../     dockerfile: docker/dev/dockerfile     volumes:       - /tmp/cache:/cache       - /build     entrypoint: "true" 

my playbook:

--- - name: probe host   hosts: localhost   connection: local   gather_facts: no   tasks:   - name: set facts     set_fact:       probe_host: "{{ lookup('env', 'probe_host') }}"       probe_port: "{{ lookup('env', 'probe_port') }}"       probe_delay: "{{ lookup('env', 'probe_delay') | default(0, true) }}"       probe_timeout: "{{ lookup('env', 'probe_timeout') | default (180, true) }}"   - name: message     debug:       msg: >         probing {{ probe_host }}:{{ probe_port }} delay={{ probe_delay }}s         , timeout={{ probe_timeout }}s    - name: waiting hosts respond...     local_action: >       wait_for host={{ probe_host }}       port={{ probe_port }}       delay={{ probe_delay }}       timeout={{ probe_timeout }} 

and ansible dockerfile:

from ubuntu:trusty maintainer pablo estrada <pjestradac@gmail.com>  # prevent dpkg errors env term=x-term-256color   run sed -i "s/http:\/\/archive./http:\/\/nz.archive./g" /etc/apt/sources.list   #install ansible  run apt-get update -qy && \     apt-get install -qy software-properties-common && \     apt-add-repository -y ppa:ansible/ansible && \     apt-get update -qy && \     apt-get install -qy ansible  # add voulme ansible playbooks volume /ansible workdir /ansible     #entrypoint entrypoint ["ansible-playbook"] cmd ["site.yml"] 

the error says: error! playbook: site.yml not appear file

i dont understand why happens if im mapping probe.yml site.yml on docker compose file. there wrong images?? help.

update

aparently issue happens when start docker machine , use

eval $(docker-machine env) 

this docker machine info:

default   *        virtualbox   running   tcp://192.168.99.100:2376           v1.12.1   

when worked did not have docker host docker-machine. can happening here?

it's you've specified path probe.yml doesn't exist on vm, , docker (being helpful) created directory , mounted you.

○ →ls -l total 8 -rw-r--r--  1 user  staff  110 13 sep 05:26 docker-compose.yml  ○ →docker-compose run agent ansible-playbook site.yml error! playbook: site.yml not appear file  ○ →ls -l total 8 -rw-r--r--  1 user  staff  110 13 sep 05:26 docker-compose.yml drwxr-xr-x  2 user  staff   68 13 sep 05:31 site.yml 

the directory using locally might not shared vm? although should have lot more agent failing if case.

sharing linux local vm

to quote the git repo

in case isn't clear, linux host support here hazy.

it sounds sharing /home shared folder called /users allow home directories automounted in local docker vm. if create link /home called /users , run docker commands there make directory paths same in both vm , local machine, , docker should happy.

ln -s /home /users vboxmanage sharefolder add "default" --name "/users" --hostpath "/users" cd /users/you/project eval $(docker-machine env default) docker-compose run whatever 

Comments

Popular posts from this blog

mongodb - How to keep track of users making Stripe Payments -

javascript - Fire on return from form "Submit" -

javascript - Thinglink image not visible until browser resize -