blob: 9431427174db2e0b06041769241960163897ed04 [file] [log] [blame]
---
- hosts: 127.0.0.1
connection: local
vars:
dockerfiles:
{% for dockerfile in dockerfiles %}
- docker_image_name: {{ dockerfile.docker_image_name }}
dockerfile_fn: {{ dockerfile.dockerfile_fn }}
{% endfor %}
tasks:
{% for dockerfile in dockerfiles %}
- name: build_docker_{{ dockerfile.docker_image_name }}
shell: chdir={{ build_dir }} docker build -f {{ dockerfile.dockerfile_fn }} --rm -t {{ dockerfile.docker_image_name }} .
{% endfor %}
# - build_dockers:
# shell: docker build -f {{ '{{' }} item.dockerfile_fn {{ '}}' }} --rm -t {{ '{{' }} item.docker_image_name {{ '}}' }} .
# with items: "dockerfiles"