ansible-role-docker-compose-generator
ansible-role-docker-compose-generator copied to clipboard
Add support for local docker volumes
This PR adds support for including local docker volumes in the docker compose file.
I've also updated the readme to include an example implementation.
I've just got around to fixing this PR, there was a stupid typo in one of the tags that caused the template generation to fail.
Hi @itsmegb,
Thanks for this PR. For my use case I modified your template to add name: {{volume.name}} to ensure that the volume was named as I described. I was wondering if you considered naming the volumes? Would this be a change you would be willing to add to the PR?
{% for volume in docker_volumes %}
{{ volume.name }}:
name: {{ volume.name }}
{% if volume.external is defined %}
external: {{ volume.external }}
{% endif %}
{% endfor %}
sorry i let this go stale. needs a rebase now i think.