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

          - name: APP_PVC
            value: storagepool-claim

          - name: APP_NAMESPACE
            value: sp

        command: ["/bin/bash"]
        args: ["-c", "ansible-playbook ./experiments/functional/custom/tests/storagepool-backend/test.yml -i /etc/ansible/hosts -v; exit 0"]
