container: Support setting container hostname
This commit is contained in:
@@ -6,6 +6,7 @@ container_mounts: []
|
|||||||
container_devices: []
|
container_devices: []
|
||||||
container_publish_ports: []
|
container_publish_ports: []
|
||||||
container_networks: []
|
container_networks: []
|
||||||
|
container_hostname: ""
|
||||||
container_ip: ""
|
container_ip: ""
|
||||||
container_secrets: []
|
container_secrets: []
|
||||||
container_env: {}
|
container_env: {}
|
||||||
|
|||||||
@@ -119,11 +119,17 @@ argument_specs:
|
|||||||
required: false
|
required: false
|
||||||
default: []
|
default: []
|
||||||
elements: str
|
elements: str
|
||||||
|
container_hostname:
|
||||||
|
description: Hostname to set inside the container. Available to other containers on the same network.
|
||||||
|
type: str
|
||||||
|
required: false
|
||||||
|
default: ""
|
||||||
container_ip:
|
container_ip:
|
||||||
description: IPv4 address for the container in the first network defined in container_networks
|
description: IPv4 address for the container in the first network defined in container_networks
|
||||||
type: str
|
type: str
|
||||||
required: false
|
required: false
|
||||||
default: ""
|
default: ""
|
||||||
|
|
||||||
container_secrets:
|
container_secrets:
|
||||||
description: A list of secrets available to the container as file or environment variable
|
description: A list of secrets available to the container as file or environment variable
|
||||||
type: list
|
type: list
|
||||||
|
|||||||
@@ -50,6 +50,7 @@
|
|||||||
mount: "{{ _container_mounts | map('items') | map('map', 'join', '=') | map('join', ',') }}"
|
mount: "{{ _container_mounts | map('items') | map('map', 'join', '=') | map('join', ',') }}"
|
||||||
device: "{{ _container_devices }}"
|
device: "{{ _container_devices }}"
|
||||||
network: "{{ _container_networks_with_ip }}"
|
network: "{{ _container_networks_with_ip }}"
|
||||||
|
hostname: "{{ container_hostname or omit }}"
|
||||||
publish: "{{ container_publish_ports }}"
|
publish: "{{ container_publish_ports }}"
|
||||||
secrets: "{{ _container_secrets }}"
|
secrets: "{{ _container_secrets }}"
|
||||||
env: "{{ container_env }}"
|
env: "{{ container_env }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user