mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 20:51:21 -03:30
Merge pull request #7575 from weltamdraht/add_extra_hosts
Adding inventory variable to set "extra_hosts" in generated compose file Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
commit
d10fdda453
@ -162,3 +162,9 @@ secret_key=awxsecret
|
||||
# Be aware that journald may rate limit your log messages if you choose it.
|
||||
# See: https://docs.docker.com/config/containers/logging/configure/
|
||||
# docker_logger=journald
|
||||
#
|
||||
|
||||
# Add extra hosts to docker compose file. This might be necessary to
|
||||
# sneak in servernames. For exmaple for DMZ self-signed CA certificates.
|
||||
# Equivialent to using the --add-host parameter with "docker run".
|
||||
#docker_compose_extra_hosts="otherserver.local:192.168.0.1,ldap-server.local:192.168.0.2"
|
||||
|
||||
@ -64,6 +64,13 @@ services:
|
||||
{% elif awx_alternate_dns_servers is defined %}
|
||||
dns: "{{ awx_alternate_dns_servers }}"
|
||||
{% endif %}
|
||||
{% if (docker_compose_extra_hosts is defined) and (':' in docker_compose_extra_hosts) %}
|
||||
{% set docker_compose_extra_hosts_list = docker_compose_extra_hosts.split(',') %}
|
||||
extra_hosts:
|
||||
{% for docker_compose_extra_host in docker_compose_extra_hosts_list %}
|
||||
- "{{ docker_compose_extra_host }}"
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
environment:
|
||||
http_proxy: {{ http_proxy | default('') }}
|
||||
https_proxy: {{ https_proxy | default('') }}
|
||||
@ -124,6 +131,13 @@ services:
|
||||
{% elif awx_alternate_dns_servers is defined %}
|
||||
dns: "{{ awx_alternate_dns_servers }}"
|
||||
{% endif %}
|
||||
{% if (docker_compose_extra_hosts is defined) and (':' in docker_compose_extra_hosts) %}
|
||||
{% set docker_compose_extra_hosts_list = docker_compose_extra_hosts.split(',') %}
|
||||
extra_hosts:
|
||||
{% for docker_compose_extra_host in docker_compose_extra_hosts_list %}
|
||||
- "{{ docker_compose_extra_host }}"
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
environment:
|
||||
http_proxy: {{ http_proxy | default('') }}
|
||||
https_proxy: {{ https_proxy | default('') }}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user