Browse Source

Allow override set scheme

Chris Callegari 6 years ago
parent
commit
8ee8e383a1
2 changed files with 7 additions and 1 deletions
  1. 6 0
      roles/openshift_aws/defaults/main.yml
  2. 1 1
      roles/openshift_aws/tasks/elb_single.yml

+ 6 - 0
roles/openshift_aws/defaults/main.yml

@@ -142,6 +142,8 @@ openshift_aws_elb_dict:
         instance_port: "{{ openshift_master_api_port }}"
         ssl_certificate_id: "{{ openshift_aws_elb_cert_arn }}"
       name: "{{ openshift_aws_elb_master_external_name }}"
+      # Set scheme [internal|internet-facing]
+      scheme: internet-facing
       tags: "{{ openshift_aws_kube_tags }}"
     internal:
       cross_az_load_balancing: False
@@ -163,6 +165,8 @@ openshift_aws_elb_dict:
         instance_protocol: tcp
         instance_port: "{{ openshift_master_api_port }}"
       name: "{{ openshift_aws_elb_master_internal_name }}"
+      # Set scheme [internal|internet-facing]
+      scheme: internal
       tags: "{{ openshift_aws_kube_tags }}"
   infra:
     external:
@@ -187,6 +191,8 @@ openshift_aws_elb_dict:
         instance_port: 443
         proxy_protocol: True
       name: "{{ openshift_aws_elb_infra_name }}"
+      # Set scheme [internal|internet-facing]
+      scheme: internet-facing
       tags: "{{ openshift_aws_kube_tags }}"
 
 openshift_aws_node_group_config_master_volumes:

+ 1 - 1
roles/openshift_aws/tasks/elb_single.yml

@@ -16,7 +16,7 @@
     health_check: "{{ item.value.health_check }}"
     instance_ids: "{{ item.value.instance_ids | default(omit) }}"
     listeners: "{{ item.value.listeners }}"
-    scheme: "{{ (item.key == 'internal') | ternary('internal','internet-facing') }}"
+    scheme: "{{ item.value.scheme | default('internal') }}"
     tags: "{{ item.value.tags }}"
     wait: True
   register: new_elb