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

Add support for networks configuration

Open simoncaron opened this issue 2 years ago • 9 comments

Added a few lines to support the networks and networks aliases configurations.

simoncaron avatar Jun 17 '22 04:06 simoncaron

One suggestion i have for this (that I used locally) is to rename the 'networks' variable to something like 'docker_networks'. This would make it clearer in the ansible config that the defined variables are for docker specifically and not for anything else.

itsmegb avatar Jul 21 '22 06:07 itsmegb

rename the 'networks' variable to something like 'docker_networks'

@itsmegb : I would agree, but under this train of thought, we may also propose to change the containers variable to docker_containers This would be a breaking change, but I'd assume we'd want to create and stick with a standard.

This would be a question for @ironicbadger

coredotbin avatar Oct 02 '22 03:10 coredotbin

Why isn't this merged? This is one of the options that are missing. @ironicbadger

SolidRhino avatar Nov 04 '22 14:11 SolidRhino

Why isn't this merged? This is one of the options that are missing. @ironicbadger

life.

rename the 'networks' variable to something like 'docker_networks'

@itsmegb : I would agree, but under this train of thought, we may also propose to change the containers variable to docker_containers This would be a breaking change, but I'd assume we'd want to create and stick with a standard.

This would be a question for @ironicbadger

Renaming to docker_networks would be preferable so that it's clearer from the Ansible side I quite agree.

ironicbadger avatar Nov 15 '22 19:11 ironicbadger

Those changes make sense, but there will nee to be another PR as its already been merged 😀

I've switched to using Jinja templates because of the complexity of my setup, so I'm not using this modification anymore.

On Tue, 15 Nov 2022, 19:56 Alex Kretzschmar, @.***> wrote:

Why isn't this merged? This is one of the options that are missing. @ironicbadger https://github.com/ironicbadger

life.

rename the 'networks' variable to something like 'docker_networks'

@itsmegb https://github.com/itsmegb : I would agree, but under this train of thought, we may also propose to change the containers variable to docker_containers This would be a breaking change, but I'd assume we'd want to create and stick with a standard.

This would be a question for @ironicbadger https://github.com/ironicbadger

Renaming to docker_networks would be preferable so that it's clearer from the Ansible side I quite agree.

— Reply to this email directly, view it on GitHub https://github.com/ironicbadger/ansible-role-docker-compose-generator/pull/8#issuecomment-1315795640, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACQYCZGULT3FAZR2HJ6JYTWIPTGPANCNFSM5ZBANT7A . You are receiving this because you were mentioned.Message ID: <ironicbadger/ansible-role-docker-compose-generator/pull/8/c1315795640@ github.com>

itsmegb avatar Nov 15 '22 20:11 itsmegb

You can take all the time you want to review my PRs @ironicbadger... as long as you keep entertaining me with a new episode of Self-Hosted every two week ;)

I renamed the variable to docker_networks.

simoncaron avatar Nov 16 '22 02:11 simoncaron

Thanks for the changes. I think an example for the readme might be useful too, then I'll merge.

ironicbadger avatar Nov 17 '22 01:11 ironicbadger

@simoncaron @ironicbadger I've started using this PR in my infrastructure. Example for the readme should be something like:

 - network_name: proxy_private
   active: true
   external: false

seedzero avatar Mar 13 '23 03:03 seedzero

Adding the option for internal would be very helpful this is what it looks like in docker compose

network:
  internal_only_network:
    internal: true

@simoncaron Let me know if you would like a PR to your branch

BCNelson avatar Jun 20 '23 06:06 BCNelson

picking this up again (sorry i let it sit so long). i'm a bit confused as to the current state of what's here.

i would still like to get this merged.

ironicbadger avatar Mar 16 '24 03:03 ironicbadger