ansible-role-docker-compose-generator icon indicating copy to clipboard operation
ansible-role-docker-compose-generator copied to clipboard

Add initial support for fragments

Open coredotbin opened this issue 2 years ago • 1 comments

Add initial support for anchors and fragments

Example usage added to README.md

Usage:

containers:
  - service_name: netbox
    active: true
    image: docker.io/netboxcommunity/netbox:
    anchor: netbox
...
  - service_name: netbox-worker
    fragment: netbox

Result:

services:
  netbox: &netbox
    image: docker.io/netboxcommunity/netbox:
    container_name: netbox
...
  netbox-worker:
    <<: *netbox
    container_name: netbox-worker

coredotbin avatar Oct 28 '23 20:10 coredotbin

Let me know if you want me to recreate the PR... looks like I forked the branch before adopting upstream changes?

coredotbin avatar Oct 28 '23 20:10 coredotbin

i'd prefer not include this PR as fragments are one of the more cursed features of YAML. it's a neat trick but not one i want to include here. thanks for the contrib!

ironicbadger avatar Mar 16 '24 03:03 ironicbadger