blob: 6f78ee00aa4b45369f3b5d68fe80c17298653674 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
---
- name: fetch the security groups for launch config
ec2_group_facts:
filters:
group-name: "{{ openshift_aws_launch_config_security_groups[openshift_aws_node_group.group] }}"
vpc-id: "{{ vpcout.vpcs[0].id }}"
region: "{{ openshift_aws_region }}"
register: ec2sgs
# Create the scale group config
- name: Create the node scale group launch config
ec2_lc:
name: "{{ openshift_aws_node_group.name }}-{{ openshift_aws_ami_map[openshift_aws_node_group.group] | default(openshift_aws_ami) }}-{{ l_epoch_time }}"
region: "{{ openshift_aws_region }}"
image_id: "{{ openshift_aws_ami_map[openshift_aws_node_group.group] | default(openshift_aws_ami) }}"
instance_type: "{{ l_node_group_config[openshift_aws_node_group.group].instance_type }}"
security_groups: "{{ openshift_aws_launch_config_security_group_id | default(ec2sgs.security_groups | map(attribute='group_id')| list) }}"
instance_profile_name: "{{ l_node_group_config[openshift_aws_node_group.group].iam_role if l_node_group_config[openshift_aws_node_group.group].iam_role is defined and
l_node_group_config[openshift_aws_node_group.group].iam_role != '' and
openshift_aws_create_iam_role
else omit }}"
user_data: "{{ lookup('template', 'user_data.j2') }}"
key_name: "{{ openshift_aws_ssh_key_name }}"
ebs_optimized: False
volumes: "{{ l_node_group_config[openshift_aws_node_group.group].volumes }}"
assign_public_ip: True
|