---
apiVersion: batch/v1
kind: Job
metadata:
  generateName: litmus-csi-provisioner-
  namespace: litmus
spec:
  template:
    metadata:
      name: litmus
      labels:
        app: csi-provisioner
    spec:
      serviceAccountName: litmus
      restartPolicy: Never
      containers:
      - name: ansibletest
        image: openebs/ansible-runner:ci
        imagePullPolicy: IfNotPresent
        env:
          - name: ANSIBLE_STDOUT_CALLBACK
            #value: log_plays
            value: default

          - name: PROVIDER_STORAGE_CLASS
            value: openebs-csi-cstor-sparse

          - name: SNAPSHOT_CLASS
            value: csi-cstor

          - name: NODE_OS
            value: ubuntu-16.04

          - name: CSPC
            value: cstor-sparse-pool

          - name: REPLICA_COUNT
            value: "3"

        command: ["/bin/bash"]
        args: ["-c", "ansible-playbook ./providers/csi-provisioner/test.yml -i /etc/ansible/hosts -v; exit 0"]
