Find plugins

Ansible0.6.2Minimum Jenkins requirement: 1.596.1ID: ansible

Plugin Information

Plugin ID



In Latest Release
Since Latest Release

Latest Release
Latest Release Date
Required Core

0.6.2 (archives)
Jan 03, 2017
workflow-step-api (version:1.10, optional)
credentials (version:1.16.1)
job-dsl (version:1.36, optional)
ssh-credentials (version:1.10)

Source Code
Issue Tracking
Pull Requests

Open Issues
Pull Requests
Jean-Christophe Sirot (id: jcsirot)



2016-Nov 3817
2016-Dec 4001
2017-Jan 4377
2017-Feb 4561
2017-Mar 5102
2017-Apr 5084
2017-May 5510
2017-Jun 5790
2017-Jul 6103
2017-Aug 6390
2017-Sep 6636
2017-Oct 6837

This plugin allows to execute Ansible tasks as a job build step.



After the plugin installation, the plugin has to be configured. Click on Add Ansible to add new Ansible installation on Jenkins > Global Tool Configuration.
Fill up the fields:

Field name



This is a symbolic name used to identify a specific ansible installation when multiple installations are configured

Path to ansible executable directory

This is the directory where are installed the ansible and ansible-playbook binaries

Authentication with password

Even if using SSH keys is the recommended authentication method between the jenkins node running ansible, authentication with password may sometimes be required. Since version 0.3 the plugin supports password based authentication with sshpass. When using password based authentication, the sshpass binary is expected to be in the PATH. 

sshpass is available for Linux and OSX.

Using Jenkins Build and Environment Variables

It is possible to access build and environment variables in ansible playbooks. These variables are injected as environment variables within the ansible process. For example, use this code in an ansible playbook to access Jenkins BUILD_TAG variable.

- hosts: example
    - debug: msg="{{ lookup('env','BUILD_TAG') }}"

Open Issues

T Key Summary Assignee Reporter Status Created


Version 0.6.2 (3 Jan 2017)

Version 0.6.1 (1 Jan 2017)

  • Use latest parent project definition in order to deploy plugin (thanks to alecharp for the help and the PR)

Version 0.6 (31 Dec 2016)

WARN: 0.6.x version will be the last one to support Jenkins 1.xxx and Ansible 1.x - The 0.7.x and next releases will require Jenkins 2.32.1 (or higher) and Ansible 2.2 (or higher)

  • Add a "do not specify" option for inventory [JENKINS-34627]
  • Support inventoryContent in pipeline (thanks to leewin12 for the PR)
  • Add support of extra variables in jobdsl (thanks to pawbur for the PR)
  • Support empty forks (number of parallel processes) parameter [JENKINS-39438]
  • Escape '%' character in private key path (thanks to ewollesen for the PR) 
  • Omit ansible option when expanded environment variable is empty (thanks to vjestin for the PR) 
  • Add the --forks parameter configurable in pipeline step (thanks to anguswilliams for the PR)
  • Fix usage of environment variable in ansiblePlaybook pipeline step (thanks to thomasKalmar and barthorre for the PR) [JENKINS-38289]

Version 0.5 (5 May 2016) 

  • Add support for ansible extra variables [JENKINS-29863]
  • Improve Pipeline plugin integration [JENKINS-32911]
  • Add the possibility to use the default inventory file (thanks to Johann Schmitz for the PR)
  • Add colorized output in pipeline jobs (thanks to Kirill Merkushev for the PR)
  • Make Jenkins build variables available as environment variables for ansible (thanks to Kevin Mooney for the PR) [JENKINS-29284]

Version 0.4 (25 December 2015) 

  • Support for password protected SSH keys [JENKINS-30656]
  • Initial support for the workflow plugin [JENKINS-30398]
  • Add support for Job DSL plugin (thanks to Kirill Merkushev for the PR) [JENKINS-31790]

Version 0.3.1 (15 July 2015) 

Version 0.3 (20 June 2015) 

  • Add support for password based SSH authentication (with sshpass)
  • Environment variables can be used in Module and Module arguments text field in Ad-hoc command builder
  • Environment variables can be used in inline inventory text box [JENKINS-28547]

Version 0.2 (11 May 2015) 

  • Fix NullPointerException when no credentials are selected
  • Fix --skippedTags parameter configuration which was ignored
  • Fix NullPointerException and print an error message in the build console when the inventory is not set in the job configuration

Version 0.1 (01 May 2015)

  • Initial version
ArchivesGet past versions