libvirt-multi-node-net:
  topology:
    topology_name: libvirt-multi-node-net
    resource_groups:
      - resource_group_name: "Test-Net"
        resource_group_type: "libvirt"
        resource_definitions:
          - name: static-DHCP-Test
            role: libvirt_network
            uri: {{ uri | default('qemu:///system') }}
            ip: {{ ip | default('192.168.74.100') }}
            dhcp_start: {{ dhcp_start | default('192.168.74.101') }}
            forward_mode: {{ forward_mode | default('nat') }}
            dhcp_end: {{ dhcp_end | default('192.168.74.112') }}
            domain: {{ domain | default('linchpin.net') }}
            netmask: {{ netmask | default('255.255.255.0') }}
            delete_on_destroy: {{ delete | default('True') }}

      - resource_group_name: "libvirt-multi-node-net"
        resource_group_type: libvirt
        resource_definitions:
          - role: libvirt_node
            name: lib-multi-net-node
            uri: {{ uri | default('qemu:///system') }}
            count: 3
            image_src: 'http://repo.atlantic.net/fedora/linux/releases/29/Cloud/x86_64/images/Fedora-Cloud-Base-29-1.2.x86_64.qcow2'
            memory: {{ memory | default('2048') }}
            vcpus: {{ vcpus | default('1') }}
            arch: {{ arch |  default('x86_64') }}
            ssh_key: {{ ssh_key | default('libvirt') }}
            networks:
              - name: static-DHCP-Test
                dhcp: True
                static_ip_reserved: False
              - name: default
                dhcp: True
                static_ip_reserved: True
            additional_storage: {{ storage | default('10G') }}
            {% if user is defined %}
            cloud_config:
              users:
                - name: {{ user.name | default('admin') }}
                  gecos: {{ user.gecos | default('Admin User') }}
                  groups: {{ user.groups | default('wheel') }}
                  sudo: {{ user.sudo | default('ALL=(ALL) NOPASSWD:ALL') }}
                  ssh_import_id: {{ user.ssh_id | default('gh:admin') }}
                  lock_passwd: {{ user.lock | default(true) }}
                  passwd:123456
            {% else %}
            cloud_config:
              users:
                - name: admin
                  gecos: Admin User
                  groups: wheel
                  sudo: 'ALL=(ALL) NOPASSWD:ALL'
                  ssh_import_id: gh:admin
                  lock_passwd: true
                  passwd: '123456'
              root_password: '123456'
            {% endif %}
            storage:
              - name: osd0
                size: 1
                units: G
                disk_type: virtio_blk
                device: vdb
