summaryrefslogtreecommitdiffstats
path: root/playbooks/aws/openshift-cluster/tasks
diff options
context:
space:
mode:
authorWesley Hearn <whearn@redhat.com>2015-07-20 16:20:12 -0400
committerWesley Hearn <whearn@redhat.com>2015-07-23 11:30:48 -0400
commitc4cca1d7184ae859706b5854a04f18095c12f1d6 (patch)
treed0637086194fcc303226ff7d3f98684c8d427a44 /playbooks/aws/openshift-cluster/tasks
parent0cbeae4df062af3e2c1a4cb08ef3b4e742394ed6 (diff)
downloadopenshift-c4cca1d7184ae859706b5854a04f18095c12f1d6.tar.gz
openshift-c4cca1d7184ae859706b5854a04f18095c12f1d6.tar.bz2
openshift-c4cca1d7184ae859706b5854a04f18095c12f1d6.tar.xz
openshift-c4cca1d7184ae859706b5854a04f18095c12f1d6.zip
Infra node support
Diffstat (limited to 'playbooks/aws/openshift-cluster/tasks')
-rw-r--r--playbooks/aws/openshift-cluster/tasks/launch_instances.yml35
1 files changed, 34 insertions, 1 deletions
diff --git a/playbooks/aws/openshift-cluster/tasks/launch_instances.yml b/playbooks/aws/openshift-cluster/tasks/launch_instances.yml
index 25a87aaf6..92155582e 100644
--- a/playbooks/aws/openshift-cluster/tasks/launch_instances.yml
+++ b/playbooks/aws/openshift-cluster/tasks/launch_instances.yml
@@ -5,6 +5,7 @@
env: "{{ cluster }}"
env_host_type: "{{ cluster }}-openshift-{{ type }}"
host_type: "{{ type }}"
+ sub_host_type: "{{ g_sub_host_type }}"
- set_fact:
ec2_region: "{{ lookup('env', 'ec2_region')
@@ -34,6 +35,35 @@
ec2_assign_public_ip: "{{ lookup('env', 'ec2_assign_public_ip')
| default(deployment_vars[deployment_type].assign_public_ip, true) }}"
when: ec2_assign_public_ip is not defined
+
+- set_fact:
+ ec2_instance_type: "{{ ec2_master_instance_type | default(deployment_vars[deployment_type].type, true) }}"
+ ec2_security_groups: "{{ ec2_master_security_groups
+ | default(deployment_vars[deployment_type].security_groups, true) }}"
+ when: host_type == "master" and sub_host_type == "default"
+
+- set_fact:
+ ec2_instance_type: "{{ ec2_etcd_instance_type | default(deployment_vars[deployment_type].type, true) }}"
+ ec2_security_groups: "{{ ec2_etcd_security_groups
+ | default(deployment_vars[deployment_type].security_groups, true)}}"
+ when: host_type == "etcd" and sub_host_type == "default"
+
+- set_fact:
+ ec2_instance_type: "{{ ec2_infra_instance_type | default(deployment_vars[deployment_type].type, true) }}"
+ ec2_security_groups: "{{ ec2_infra_security_groups
+ | default(deployment_vars[deployment_type].security_groups, true) }}"
+ when: host_type == "node" and sub_host_type == "infra"
+
+- set_fact:
+ ec2_instance_type: "{{ ec2_node_instance_type | default(deployment_vars[deployment_type].type, true) }}"
+ ec2_security_groups: "{{ ec2_node_security_groups
+ | default(deployment_vars[deployment_type].security_groups, true) }}"
+ when: host_type == "node" and sub_host_type == "compute"
+
+- set_fact:
+ ec2_instance_type: "{{ lookup('env', 'ec2_instance_type')
+ | default(deployment_vars[deployment_type].type, true) }}"
+ when: ec2_instance_type is not defined
- set_fact:
ec2_security_groups: "{{ lookup('env', 'ec2_security_groups')
| default(deployment_vars[deployment_type].security_groups, true) }}"
@@ -99,6 +129,7 @@
env: "{{ env }}"
host-type: "{{ host_type }}"
env-host-type: "{{ env_host_type }}"
+ sub-host-type: "{{ sub_host_type }}"
volumes: "{{ volumes }}"
register: ec2
@@ -112,7 +143,9 @@
Name: "{{ item.0 }}"
- set_fact:
- instance_groups: tag_created-by_{{ created_by }}, tag_env_{{ env }}, tag_host-type_{{ host_type }}, tag_env-host-type_{{ env_host_type }}
+ instance_groups: "tag_created-by_{{ created_by }}, tag_env_{{ env }},
+ tag_host-type_{{ host_type }}, tag_env-host-type_{{ env_host_type }},
+ tag_sub-host-type_{{ sub_host_type }}"
- name: Add new instances groups and variables
add_host: