6 - ami|default(DEFAULT_AMI) != ''
7 - region|default(vpc_region) != ''
8 - security_group_ids != ''
15 - "{{ (country|default() != '')|ternary('c0', '') }}{{ country|default('') }}"
16 - "{{ (phase|default() != '')|ternary('d0', '') }}{{ phase|default('') }}"
21 - "{{ stack|default('') }}"
22 - "{{ (country|default() != '')|ternary('c0', '') }}{{ country|default('') }}"
23 - "{{ (phase|default() != '')|ternary('d0', '') }}{{ phase|default('') }}"
28 - "{{ stack|default('') }}"
29 - "{{ (country|default() != '')|ternary('c0', '') }}{{ country|default('') }}"
30 - "{{ (phase|default() != '')|ternary('d0', '') }}{{ phase|default('') }}"
33 - name: assemble user data
36 EC2_REGION: "{{ region|default(vpc_region) }}"
37 CLOUD_COUNTRIES: "{{ country|default() }}"
38 CLOUD_ENVIRONMENT: "{{ ACCT_NAME }}"
39 CLOUD_MONITOR_BUCKET: "{{ module }}"
40 CLOUD_APP: "{{ module }}"
41 CLOUD_STACK: "{{ stack|default('None') }}"
42 CLOUD_DEV_PHASE: "{{ phase|default() }}"
43 CLOUD_CLUSTER: "{{ ud_cluster|select|join('-') }}"
44 CLOUD_AUTO_SCALE_GROUP: "{{ ud_asgn|select|join('-') }}"
45 CLOUD_LAUNCH_CONFIG: "{{ lc_n|select|join('-') }}"
49 region: "{{ region|default(vpc_region) }}"
50 name: "{{ lc_n|select|join('-') }}"
51 image_id: "{{ ami|default(DEFAULT_AMI) }}"
52 key_name: "{{ MANAGEMENT_KEY_NAME }}"
53 instance_profile_name: "{{ module }}"
54 security_groups: "{{ security_group_ids }}"
55 instance_type: "{{ instance_type}}"
57 # setting the root volume seems to prevent instances from launching
58 # - device_name: /dev/sda
61 # delete_on_termination: true
62 - device_name: /dev/sdb
64 - device_name: /dev/sdc
66 - device_name: /dev/sdd
68 - device_name: /dev/sde
70 user_data: "{{ lookup('template', 'userdata.sh.j2') }}"
71 register: launchconfig