diff --git a/roles/installer/defaults/main.yml b/roles/installer/defaults/main.yml index 337145d1..6caa7214 100644 --- a/roles/installer/defaults/main.yml +++ b/roles/installer/defaults/main.yml @@ -53,7 +53,7 @@ route_tls_secret: '' # route_host: '' -hostname: '{{ ansible_operator_meta.name }}.example.com' +hostname: '' # Add a nodeSelector for the AWX pods. It must match a node's labels for the pod # to be scheduled on that node. Specify as literal block. E.g.: diff --git a/roles/installer/templates/ingress.yaml.j2 b/roles/installer/templates/ingress.yaml.j2 index f03b2af4..fb2a6f5f 100644 --- a/roles/installer/templates/ingress.yaml.j2 +++ b/roles/installer/templates/ingress.yaml.j2 @@ -17,8 +17,7 @@ metadata: {% endif %} spec: rules: - - host: '{{ hostname }}' - http: + - http: paths: - path: '{{ ingress_path }}' pathType: Prefix @@ -27,6 +26,9 @@ spec: name: '{{ ansible_operator_meta.name }}-service' port: number: 80 +{% if hostname %} + host: {{ hostname }} +{% endif %} {% if ingress_tls_secret %} tls: - hosts: