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