support assign subnet to container instance
This commit is contained in:
@@ -18,3 +18,12 @@ services:
|
||||
{% if item.CPUSET is defined %}
|
||||
cpuset: {{ item.CPUSET }}
|
||||
{% endif %}
|
||||
{% if item.SUBNET is defined %}
|
||||
networks:
|
||||
default:
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: {{ item.SUBNET | ansible.utils.ipaddr('net') }}
|
||||
gateway: {{ item.SUBNET | ansible.utils.nthhost(0) }}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user