Browse Source

Set openshift_node_group_name for AWS hosts.

Andrew Butcher 6 years ago
parent
commit
d74659cc20

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

@@ -154,7 +154,7 @@ openshift_aws_master_group:
   group: master
   tags:
     host-type: master
-    sub-host-type: default
+    sub-host-type: master
     runtime: docker
 
 openshift_aws_node_groups:
@@ -172,6 +172,11 @@ openshift_aws_node_groups:
     sub-host-type: infra
     runtime: docker
 
+openshift_aws_node_group_mappings:
+  master: 'node-config-master'
+  compute: 'node-config-compute'
+  infra: 'node-config-infra'
+
 openshift_aws_created_asgs: []
 openshift_aws_current_asgs: []
 

+ 1 - 0
roles/openshift_aws/tasks/setup_master_group.yml

@@ -26,6 +26,7 @@
     groups: "{{ openshift_aws_masters_groups }}"
     name: "{{ item.public_dns_name }}"
     hostname: "{{ openshift_aws_clusterid }}-master-{{ item.instance_id[:-5] }}"
+    openshift_node_group_name: "{{ openshift_aws_node_group_mappings[item.tags['sub-host-type']] }}"
   with_items: "{{ instancesout.instances }}"
 
 - name: wait for ssh to become available

+ 1 - 0
roles/openshift_aws/tasks/setup_scale_group_facts.yml

@@ -46,4 +46,5 @@
     ansible_ssh_host: "{{ item.public_dns_name }}"
     name: "{{ item.public_dns_name }}"
     hostname: "{{ item.public_dns_name }}"
+    openshift_node_group_name: "{{ openshift_aws_node_group_mappings[item.tags['sub-host-type']] }}"
   with_items: "{{ qinstances.instances }}"