---
cfgs:
  openshift:
    __name__: metadata.name

openshift-new:
  topology:
    topology_name: openshift
    resource_groups:
      - resource_group_name: test1
        resource_group_type: openshift
        resource_definitions:
          - name: openshift
            role: openshift_inline
            # the variable name must not be 'namespace' due to collision
            # with Jinja2 internal variable. Known issue:
            # https://github.com/ansible/ansible/issues/41955
            namespace: {{ oc_namespace | default('linchpin') }}
            definition:
              kind: Pod
              apiVersion: v1
              metadata:
                name: hello-openshift
                labels:
                  name: hello-openshift
              spec:
                containers:
                - name: hello-openshift
                  image: openshift/hello-openshift
                  ports:
                  - containerPort: 8080
                    protocol: TCP
                  resources: {}
                  volumeMounts:
                  - name: tmp
                    mountPath: /tmp
                  terminationMessagePath: /dev/termination-log
                  imagePullPolicy: IfNotPresent
                  securityContext:
                    capabilities: {}
                    privileged: false
                volumes:
                - name: tmp
                  emptyDir: {}
                restartPolicy: Always
                dnsPolicy: ClusterFirst
                serviceAccount: ''
          - name: openshift2
            role: openshift_inline
            # the variable name must not be 'namespace' due to collision
            # with Jinja2 internal variable. Known issue:
            # https://github.com/ansible/ansible/issues/41955
            namespace: {{ oc_namespace | default('linchpin') }}
            definition:
              kind: Pod
              apiVersion: v1
              metadata:
                name: goodbye-openshift
                labels:
                  name: goodbye-openshift
              spec:
                containers:
                - name: goodbye-openshift
                  image: openshift/hello-openshift
                  ports:
                  - containerPort: 8080
                    protocol: TCP
                  resources: {}
                  volumeMounts:
                  - name: tmp
                    mountPath: /tmp
                  terminationMessagePath: /dev/termination-log
                  imagePullPolicy: IfNotPresent
                  securityContext:
                    capabilities: {}
                    privileged: false
                volumes:
                - name: tmp
                  emptyDir: {}
                restartPolicy: Always
                dnsPolicy: ClusterFirst
                serviceAccount: ''
        {% if credentials is defined %}
        credentials:
          filename: {{ credentials.filename }}
          profile: {{ credentials.profile }}
        {% else %}
        credentials:
          filename: config.yml
          profile: default
        {% endif %}
  layout:
    inventory_layout:
      vars:
        hostname: __IP__
        name: __name__
      hosts:
        pod:
          count: 1
          host_groups:
            - pods
  hooks:
    preup:
      - name: res_check
    postup:
      - name: ocp_container_boot_log
