---
cfgs:
  aws:
    __id__: id

simple:
  topology:
    topology_name: simple
    resource_groups:
      - resource_group_name: aws
        resource_group_type: aws
        resource_definitions:
          - name: simple
            flavor: {{ flavor | default('t2.micro') }}
            role: aws_ec2
            region: {{ region | default('ca-central-1') }}
            image: {{ image | default('ami-0b85d4ff00de6a225') }}
            {% if security_groups is defined %}
            security_group:
              - default
              {% for group in security_groups %}
              - {{ group }}
              {% endfor %}
            {% endif %}
            count: 1
            {% if assign_public_ip is defined %}
            assign_public_ip: {{ assign_public_ip }}
            {% endif %}
            keypair: {{ keypair | default('ci-ops-central') }}
  layout:
    inventory_layout:
      vars:
        hostname: __IP__
        id: __id__
        ansible_ssh_private_key_file: {{ keypath | default('~/.ssh/id_rsa') }}
      hosts:
        example-node:
          count: 1
          host_groups:
            - example
  hooks:
    postup:
      - name: ec2_boot_log
