---
CLOUDS:
    - NAME: '{{ JENKINS_EC2_REGION }}'
      ACCESS_KEY_ID: '{{ JENKINS_EC2_ACCESS_KEY_ID }}'
      SECRET_ACCESS_KEY: '{{ JENKINS_EC2_SECRET_ACCESS_KEY }}'
      USE_INSTANCE_PROFILE_FOR_CREDS: {{ jenkins_common_use_instance_profile_for_creds }}
      REGION: '{{ JENKINS_EC2_REGION }}'
      EC2_PRIVATE_KEY_PATH: '{{ jenkins_common_config_path }}/ec2/id_rsa'
      INSTANCE_CAP: '{{ jenkins_common_instance_cap }}'
      AMIS:
{% for ami in JENKINS_EC2_AMIS %}
          - AMI_ID: '{{ ami.AMI_ID }}'
            AVAILABILITY_ZONE: '{{ ami.AVAILABILITY_ZONE }}'
            SPOT_CONFIG:
                SPOT_MAX_BID_PRICE: '{{ ami.SPOT_CONFIG.SPOT_MAX_BID_PRICE }}'
                SPOT_INSTANCE_BID_TYPE: '{{ ami.SPOT_CONFIG.SPOT_INSTANCE_BID_TYPE }}'
            SECURITY_GROUPS: '{{ ami.SECURITY_GROUPS }}'
            REMOTE_FS_ROOT: '{{ ami.REMOTE_FS_ROOT }}'
            SSH_PORT: '{{ ami.SSH_PORT }}'
            INSTANCE_TYPE: '{{ ami.INSTANCE_TYPE }}'
            LABEL_STRING: '{{ ami.LABEL_STRING }}'
            MODE: '{{ ami.MODE }}'
            DESCRIPTION: '{{ ami.DESCRIPTION }}'
            INIT_SCRIPT_PATH: '{{ ami.INIT_SCRIPT_PATH }}'
            TEMP_DIR: '{{ ami.TEMP_DIR }}'
            USER_DATA: '{{ ami.USER_DATA }}'
            NUM_EXECUTORS: '{{ ami.NUM_EXECUTORS }}'
            REMOTE_ADMIN: '{{ ami.REMOTE_ADMIN }}'
            ROOT_COMMAND_PREFIX: '{{ ami.ROOT_COMMAND_PREFIX }}'
            JVM_OPTIONS: '{{ ami.JVM_OPTIONS }}'
            STOP_ON_TERMINATE: {{ ami.STOP_ON_TERMINATE }}
            SUBNET_ID: '{{ ami.SUBNET_ID }}'
            TAGS:
{% for tag in ami.TAGS %}
                - NAME: '{{ tag.NAME }}'
                  VALUE: '{{ tag.VALUE }}'
{% endfor %}
            IDLE_TERMINATION_MINUTES: '{{ ami.IDLE_TERMINATION_MINUTES }}'
            USE_PRIVATE_DNS_NAME: {{ ami.USE_PRIVATE_DNS_NAME }}
            INSTANCE_CAP: '{{ ami.INSTANCE_CAP }}'
            IAM_INSTANCE_PROFILE: '{{ ami.IAM_INSTANCE_PROFILE }}'
            USE_EPHEMERAL_DEVICES: {{ ami.USE_EPHEMERAL_DEVICES }}
            LAUNCH_TIMEOUT: '{{ ami.LAUNCH_TIMEOUT }}'
{% endfor %}
