diff options
author | Thomas Wiest <twiest@users.noreply.github.com> | 2015-04-21 16:54:37 -0400 |
---|---|---|
committer | Thomas Wiest <twiest@users.noreply.github.com> | 2015-04-21 16:54:37 -0400 |
commit | 89c74233535537d7daae41730e22b7133870e40d (patch) | |
tree | 6273f5786b2606a797c1a8c4e5fa52e0915b8859 /playbooks/aws/openshift-cluster/tasks | |
parent | 1f9c84c2ac6ecb044b1ec5be4c21d864b20e996d (diff) | |
parent | 71ff62e46f464916f57345f4945f2e28cf5cdcdc (diff) | |
download | openshift-89c74233535537d7daae41730e22b7133870e40d.tar.gz openshift-89c74233535537d7daae41730e22b7133870e40d.tar.bz2 openshift-89c74233535537d7daae41730e22b7133870e40d.tar.xz openshift-89c74233535537d7daae41730e22b7133870e40d.zip |
Merge pull request #172 from detiber/aws_vpc
add vpc support to ec2 cluster, add more overrides for variables
Diffstat (limited to 'playbooks/aws/openshift-cluster/tasks')
-rw-r--r-- | playbooks/aws/openshift-cluster/tasks/launch_instances.yml | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/playbooks/aws/openshift-cluster/tasks/launch_instances.yml b/playbooks/aws/openshift-cluster/tasks/launch_instances.yml index 77ee25424..34172396a 100644 --- a/playbooks/aws/openshift-cluster/tasks/launch_instances.yml +++ b/playbooks/aws/openshift-cluster/tasks/launch_instances.yml @@ -1,25 +1,35 @@ --- -# TODO: modify machine_image based on deployment_type - set_fact: - machine_type: "{{ lookup('env', 'ec2_instance_type') | default('m3.large', true) }}" - machine_image: "{{ lookup('env', 'ec2_ami') | default(deployment_vars[deployment_type].image, true) }}" - machine_region: "{{ lookup('env', 'ec2_region') | default(deployment_vars[deployment_type].region, true) }}" - machine_keypair: "{{ lookup('env', 'ec2_keypair')|default('libra', true) }}" created_by: "{{ lookup('env', 'LOGNAME')|default(cluster, true) }}" - security_group: "{{ lookup('env', 'ec2_security_group')|default('public', true) }}" env: "{{ cluster }}" - host_type: "{{ type }}" env_host_type: "{{ cluster }}-openshift-{{ type }}" + host_type: "{{ type }}" + machine_type: "{{ lookup('env', 'ec2_instance_type') + | default(deployment_vars[deployment_type].type, true) }}" + machine_image: "{{ lookup('env', 'ec2_ami') + | default(deployment_vars[deployment_type].image, true) }}" + machine_region: "{{ lookup('env', 'ec2_region') + | default(deployment_vars[deployment_type].region, true) }}" + machine_keypair: "{{ lookup('env', 'ec2_keypair') + | default(deployment_vars[deployment_type].keypair, true) }}" + machine_subnet: "{{ lookup('env', 'ec2_vpc_subnet') + | default(deployment_vars[deployment_type].vpc_subnet, true) }}" + machine_public_ip: "{{ lookup('env', 'ec2_public_ip') + | default(deployment_vars[deployment_type].assign_public_ip, true) }}" + security_groups: "{{ lookup('env', 'ec2_security_groups') + | default(deployment_vars[deployment_type].security_groups, true) }}" - name: Launch instance(s) ec2: state: present region: "{{ machine_region }}" keypair: "{{ machine_keypair }}" - group: "{{ security_group }}" + group: "{{ security_groups }}" instance_type: "{{ machine_type }}" image: "{{ machine_image }}" count: "{{ instances | oo_len }}" + vpc_subnet_id: "{{ machine_subnet | default(omit, true) }}" + assign_public_ip: "{{ machine_public_ip | default(omit, true) }}" wait: yes instance_tags: created-by: "{{ created_by }}" |