Ansible - docker_network module

If you are not familiar with modules, check out Ansible - Getting Started with Modules.

The docker_network module can be used to create, update and remove a docker network. In this example, the foo-network Docker network will be created.

- name: create Docker network foo-network
  docker_network:
    name: foo-network

 

In this example, the subnet and default gateway are defined.

- name: create Docker network foo-network
  docker_network:
    name: foo-network
    ipam_options:
      subnet: '172.50.0.0/16'
      gateway: '172.50.0.1'

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.





Please enter 551b7 in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |