Hi All,
I am very new to ansible and trying to explore.
I have requirement of launching docker container out of my box and execute
series of scripts in the docker container.
- name: Execute xpcgen inside the container
docker_container:
image: ubuntu-xpc
name: XPCGEN
volumes_from: CREATE_CONTAINER
command: "{{ view_path }}/{{ compile_path }}/script.sh"
state: started
register: xpcgen
- debug: var=xpcgen
The above code is written in my ansible yml file and it suppose to create a
docker container out of my customized docker image ubuntu-xpc and script
"script.sh" to be run from the docker container.
But the problem here is, the commands inside the script will be initiated
and ansible will comeout without any errors.
When i checked docker logs, the log will say, the process has started.
But ansible is not waiting until the script finishes its job.
Any help would be higly appreciable.
Thanks,
MHM
--
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/c817ede9-df37-4c57-8637-02f449a1f3d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.