name: "Set up Ansible"
description: "Downloads and installs Ansible"
inputs:
  version:
    description: "Ansible version to install"
    required: false
    default: "10.2.0"
runs:
  using: "composite"
  steps:
    - name: "Install Ansible"
      shell: "bash"
      env:
        PIP_INDEX_URL: "https://nexus.bthlabs.pl/repository/pypi/simple/"
      run: |
        set -x
        python3 -m venv /opt/ansible

        /opt/ansible/bin/pip install ansible==${{ inputs.version }}
