---
os-server-new:
  topology:
    topology_name: os-server-new
    resource_groups:
      - resource_group_name: os-server-new
        resource_group_type: openstack
        resource_definitions:
          - name: "{{ distro | default('') }}database"
            role: os_server
            flavor: "{{ flavor | default('m1.small') }}"
            image: "{{ image | default('CentOS-7-x86_64-GenericCloud-1612') }}"
            count: 1
            keypair: "{{ keypair | default('ci-factory') }}"
            fip_pool: "{{ fip_pool | default('10.8.240.0') }}"
            networks:
              - "{{ networks | default('e2e-openstack') }}"
          - name: "{{ distro | default('') }}frontend"
            role: os_server
            flavor: m1.small
            flavor: "{{ flavor | default('m1.small') }}"
            image: "{{ image | default('CentOS-7-x86_64-GenericCloud-1612') }}"
            count: 1
            keypair: "{{ keypair | default('ci-factory') }}"
            auto_ip: no
            networks:
              - "{{ networks | default('e2e-openstack') }}"
        credentials:
          filename: clouds.yaml
          profile: ci-rhos
  layout:
    inventory_layout:
      vars:
        hostname: __IP__
      hosts:
        db-node:
          count: 1
          host_groups:
            - database
        frontend-node:
          count: 1
          host_groups:
            - frontend

os-sg-new:
  topology:
    topology_name: os-sg-new
    resource_groups:
      - resource_group_name: os-sg-new
        resource_group_type: openstack
        resource_definitions:
          - name: "{{ distro | default('') }}security_group"
            role: os_sg
            description: "Openstack Security Group with ssh access"
            rules:
              - rule_type: "inbound"
                from_port: 22
                to_port: 22
                proto: "tcp"
                cidr_ip: "0.0.0.0/0"
              - rule_type: "outbound"
                from_port: 22
                to_port: 22
                proto: "tcp"
                cidr_ip: "0.0.0.0/0"
        credentials:
          filename: clouds.yaml
          profile: ci-rhos

os-vol-new:
  topology: os-vol-new.yml

os-network:
  topology:
    topology_name: os_network
    resource_groups:
      - resource_group_name: simple
        resource_group_type: openstack
        resource_definitions:
          - name: testnet_example
            role: os_network
            unique: true
        credentials:
          filename: clouds.yaml
          profile: ci-rhos

os-router:
  topology:
    topology_name: os_router
    resource_groups:
      - resource_group_name: ex_group
        resource_group_type: openstack
        resource_definitions:
          - name: trouter_example
            role: os_router
            unique: true
        credentials:
          filename: clouds.yaml
          profile: ci-rhos

os-subnet:
  topology:
    topology_name: os-subnet
    resource_groups:
      - resource_group_name: ex_os_subnet
        resource_group_type: openstack
        resource_definitions:
          - name: test_network_ex
            role: os_network
            unique: false
          - name: test_subnet_ex
            role: os_subnet
            network_name: test_network_ex
            unique: false
            cidr: 192.167.128.0/24
        credentials:
          filename: clouds.yaml
          profile: ci-rhos
