container: Support static ip for container

This commit is contained in:
uumas
2025-09-14 03:08:24 +03:00
parent ad50e05ee9
commit 0b73582f36
4 changed files with 24 additions and 1 deletions

View File

@@ -1,6 +1,17 @@
---
_container_image: "{{ container_image | replace('/', '_') ~ '.image' }}"
_container_networks: "{{ container_networks | map('regex_replace', '$', '.network') }}"
_container_networks_with_ip: >-
{{
[
_container_networks[0] ~ (
':ip=' ~ container_ip if container_ip | length > 0 else ''
)
]
+ _container_networks[1:]
}}
_container_volumes: "{{ container_mounts | selectattr('type', '==', 'volume') }}"
_container_mount_sources: "{{ container_mounts | map(attribute='source') }}"