---
apiVersion: batch/v1
kind: Job
metadata:
  generateName: litmus-openebs-provision-
  namespace: litmus
spec:
  template:
    metadata:
      name: litmus
      labels:
        app: openebs-provision
    spec:
      serviceAccountName: litmus
      restartPolicy: Never
      containers:
      - name: ansibletest
        image: openebs/ansible-runner:ci
        imagePullPolicy: IfNotPresent

        env:
          - name: ANSIBLE_STDOUT_CALLBACK
            #value: log_plays, actionable, default
            value: default

            # OpenEBS Version
          - name: RELEASE_VERSION
            value: ""
            
            # Namespace where OpenEBS is deployed
          - name: OPERATOR_NS
            value: openebs

            #  Image tag for NDM (optional)
          - name: NDM_TAG
            value: ""

            # Mode of the Deploy (operator or helm)
          - name: DEPLOY_TYPE
            value: ""

            # To deploy OpenEBS components ACTION could be 'provision'
            # To remove the OpenEBS ACTION could be 'deprovision'
          - name: ACTION
            value: provision 

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