apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
  name: zansible
spec:
  description: >-
     Run ansible
  workspaces:
    - name: source
      description: Ansible files
  params:
    - name: ANSIBLE_CONFIG
      description: Dir containing ansible.cfg
      type: string
    - name: PLAYBOOK
      description: Location and name of playbook to run
      type: string
    - name: Inventory
      description: Location of inventory
      type: string
    - name: dbbParms
      description: Location of dbbParms
      type: string
      default: ""
  steps:
    - name: runansible
      image: image-registry.openshift-image-registry.svc:5000/tekton-zace/zocpansible:1.0
      env:
        - name: ANSIBLE_CONFIG
          value: $(params.ANSIBLE_CONFIG)
        - name: PLAYBOOK
          value: $(params.PLAYBOOK)
        - name: Inventory
          value: $(params.Inventory)
        - name: dbbParms
          value: $(params.dbbParms)

