This might be a feature request, if so pointers on how to request it would be helpful. I'd like to run an Ansible playbook from within Jenkins pipeline. It looks like the
ansiblePlaybook plugin allows an
installation parameter to be passed, but this must be set up globally. Is there any way to point it at a virtualenv without configuring the virtualenv globally? Basically, I'd like to do something like this:
stage 'Create virtualenv'
sh 'virtualenv venv'
sh 'venv/bin/pip install -r requirements.txt'
stage 'Run Ansible deploy'
ansiblePlaybook(playbook: 'foo.yml', ansibleExecutable: 'venv/bin/ansible-playbook')