f4bf952f34
This ensures that we cleanup images that are superceded and no longer necessary. We do this to avoid filling the disk with docker images. Note that we use the -f flag to avoid being prompted by docker image prune for confirmation. Change-Id: I8eb5bb97d8c66755e695498707220c9e6e7b2de0
21 lines
525 B
YAML
21 lines
525 B
YAML
- name: Synchronize docker-compose directory
|
|
synchronize:
|
|
src: zuul-preview-docker/
|
|
dest: /etc/zuul-preview-docker/
|
|
- name: Install docker-compose
|
|
package:
|
|
name:
|
|
- docker-compose
|
|
state: present
|
|
- name: Run docker-compose pull
|
|
shell:
|
|
cmd: docker-compose pull
|
|
chdir: /etc/zuul-preview-docker/
|
|
- name: Run docker-compose up
|
|
shell:
|
|
cmd: docker-compose up -d
|
|
chdir: /etc/zuul-preview-docker/
|
|
- name: Run docker prune to cleanup unneeded images
|
|
shell:
|
|
cmd: docker image prune -f
|