---
ansible-hook:
  topology:
    topology_name: ansible-hook
    resource_groups:
      - resource_group_name: ansible-hook
        resource_group_type: openstack
        resource_definitions:
          - name: ansible-hook
            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') }}
        credentials:
          filename: clouds.yml
          profile: cirhos
  layout:
    inventory_layout:
      vars:
        hostname: __IP__
        ansible_ssh_private_key_file: {{ keypath | default('~/.ssh/id_rsa') }}
      hosts:
        example-node:
          count: 1
          host_groups:
            - example
  hooks:
    postup:
      - name: ping
        type: ansible
        context: true
        path: hooks/ping
        actions:
          - playbook: ping.yml
