These tasks
- name: Create Jenkins data directory on host
file: "path=/home/{{ansible_ssh_user}}/.jenkins state=directory mode=0777"
- name: Jenkins data directory
shell: "docker create -v {{ansible_env.HOME}}/.jenkins:/var/jenkins_home
--name jenkins.data mediaplayout/jenkins"
sudo: yes
- name: Run Jenkins container
shell: docker run -d -p 8080:8080 -p 50000:50000 --volumes-from
jenkins.data --name jenkins.master mediaplayout/jenkins
sudo: yes
generates a docker container with a volume that is shared with the host at
~/.jenkins
These tasks:
- name: Create Jenkins data directory on host
file: "path=/home/{{ansible_ssh_user}}/.jenkins state=directory mode=0777"
- name: Jenkins data directory
docker:
name: jenkins.data
image: mediaplayout/jenkins
state: present
volumes: "/home/{{ansible_ssh_user}}/.jenkins:/var/jenkins_home"
sudo: yes
- name: Start Jenkins container
docker:
name: jenkins.master
image: mediaplayout/jenkins
pull: always
state: started
volumes_from:
- 'jenkins.data'
ports:
- 8080:8080
- 50000:50000
sudo: yes
don't shared the directory at that location
Is the second playbook correct or is there a issue with the Ansible docker
module?
--
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/d5b185ee-19ad-4343-aa77-d701d2fc6041%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.