The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

Ansible plugin

ansibleAdhoc: Invoke an ansible adhoc command

  • hosts : String
  • become : boolean (optional)
  • becomeUser : String (optional)
  • colorized : boolean (optional)
  • credentialsId : String (optional)
  • dynamicInventory : boolean (optional)
  • extraVars (optional)
      Array / List of Nested Object
    • hidden : boolean (optional)
    • key : String (optional)
    • secretValue (optional)
      • Type: class hudson.util.Secret
  • extras : String (optional)
  • forks : int (optional)
  • hostKeyChecking : boolean (optional)
  • installation : String (optional)
  • inventory : String (optional)
  • inventoryContent : String (optional)
  • module : String (optional)
  • moduleArguments : String (optional)
  • vaultCredentialsId : String (optional)
  • vaultTmpPath : String (optional)

ansiblePlaybook: Invoke an ansible playbook

Execute an Ansible playbook. Only the playbook parameter is mandatory.
  • playbook : String
  • become : boolean (optional)
  • becomeUser : String (optional)
  • colorized : boolean (optional)
  • credentialsId : String (optional)
  • disableHostKeyChecking : boolean (optional)
  • dynamicInventory : boolean (optional)
  • extraVars (optional)
      Nested Choice of Objects
  • extras : String (optional)
  • forks : int (optional)
  • hostKeyChecking : boolean (optional)
  • installation : String (optional)
  • inventory : String (optional)
  • inventoryContent : String (optional)
  • limit : String (optional)
  • skippedTags : String (optional)
  • startAtTask : String (optional)
  • sudo : boolean (optional)
  • sudoUser : String (optional)
  • tags : String (optional)
  • vaultCredentialsId : String (optional)
  • vaultTmpPath : String (optional)

ansibleVault: Invoke ansible vault

Execute Ansible vault. Only the vaultCredentialsId parameter is mandatory.
  • action : String (optional)
  • content : String (optional)
  • input : String (optional)
  • installation : String (optional)
  • newVaultCredentialsId : String (optional)
  • output : String (optional)
  • vaultCredentialsId : String (optional)
  • vaultTmpPath : String (optional)

step([$class: 'AnsibleAdHocCommandBuilder']): Invoke Ansible Ad-Hoc Command

  • hostPattern : String
    The host or set of hosts on which the command will be executed. For more details see the ansible documentation for Patterns.
  • inventory
      Nested Choice of Objects
    • $class: 'InventoryContent'
      • content : String
      • dynamic : boolean
        Check this box if a dynamic inventory is used. For more details see the ansible documentation for Dynamic Inventory
    • $class: 'InventoryDoNotSpecify'
      • $class: 'InventoryPath'
        • path : String
          Specify the inventory host path or a comma separated host list
    • module : String
      Module name to execute. The shell module is used when left empty.
    • command : String
      Module arguments or shell command to execute
    • additionalParameters : String (optional)
      Any additional parameters to pass to the ansible command.

      Warning:

      The content of this textbox will be passed as is to the command line.
    • ansibleName : String (optional)
    • becomeUser : String (optional)
      Desired become user. "root" is used when this field is empty.
    • colorizedOutput : boolean (optional)
      Check this box to allow ansible to render ANSI color codes in the Jenkins console. This option works well with the Jenkins AnsiColor plugin.
    • credentialsId : String (optional)
      Select the credentials for the SSH connections. Only private key authentication is supported.
    • disableHostKeyChecking : boolean (optional)
      Check this box if you really want to disable the validation of the hosts SSH server keys.
    • extraVars (optional)
        Array / List of Nested Object
      • hidden : boolean (optional)
      • key : String (optional)
      • secretValue (optional)
        • Type: class hudson.util.Secret
    • forks : int (optional)
      Specify number of parallel processes to use. Set to 0 to use the default value.
    • hostKeyChecking : boolean (optional)
    • sudo : boolean (optional)
      Run operations with sudo. It works only when the remote user is sudoer with nopasswd option. Sudo has been deprecated in favor of become and will be removed in Ansible 2.6.
    • sudoUser : String (optional)
      Desired sudo user. "root" is used when this field is empty. Sudo has been deprecated in favor of become and will be removed in Ansible 2.6.
    • unbufferedOutput : boolean (optional)
      Skip standard output buffering for the ansible process. The ansible output is directly rendered into the Jenkins console. This option can be usefull for long running operations.
    • vaultCredentialsId : String (optional)
      Select the credentials for vault encrypted vars. Only secret file and secret text are supported.
    • vaultTmpPath : String (optional)
      Insert the path where to store temporary generated vault password files, ssh keys, etc... Default is in workspace.

    step([$class: 'AnsiblePlaybookBuilder']): Invoke Ansible Playbook

    • playbook : String
      Path to the ansible playbook file. The path can be absolute or relative to the job workspace.
    • inventory
        Nested Choice of Objects
      • $class: 'InventoryContent'
        • content : String
        • dynamic : boolean
          Check this box if a dynamic inventory is used. For more details see the ansible documentation for Dynamic Inventory
      • $class: 'InventoryDoNotSpecify'
        • $class: 'InventoryPath'
          • path : String
            Specify the inventory host path or a comma separated host list
      • additionalParameters : String (optional)
        Any additional parameters to pass to the ansible command.

        Warning:

        The content of this textbox will be passed as is to the command line.
      • ansibleName : String (optional)
      • becomeUser : String (optional)
        Desired become user. "root" is used when this field is empty.
      • colorizedOutput : boolean (optional)
        Check this box to allow ansible to render ANSI color codes in the Jenkins console. This option works well with the Jenkins AnsiColor plugin.
      • credentialsId : String (optional)
        Select the credentials for the SSH connections. Only private key authentication is supported.
      • disableHostKeyChecking : boolean (optional)
        Check this box if you really want to disable the validation of the hosts SSH server keys.
      • extraVars (optional)
          Array / List of Nested Object
        • hidden : boolean (optional)
        • key : String (optional)
        • secretValue (optional)
          • Type: class hudson.util.Secret
      • forks : int (optional)
        Specify number of parallel processes to use. Set to 0 to use the default value.
      • hostKeyChecking : boolean (optional)
      • limit : String (optional)
        Further limit selected hosts to an additional pattern.
      • skippedTags : String (optional)
        only run plays and tasks whose tags do not match these values.
      • startAtTask : String (optional)
        Start the playbook at the task matching this name.
      • sudo : boolean (optional)
        Run operations with sudo. It works only when the remote user is sudoer with nopasswd option. Sudo has been deprecated in favor of become and will be removed in Ansible 2.6.
      • sudoUser : String (optional)
        Desired sudo user. "root" is used when this field is empty. Sudo has been deprecated in favor of become and will be removed in Ansible 2.6.
      • tags : String (optional)
        Only run plays and tasks tagged with these values.
      • unbufferedOutput : boolean (optional)
        Skip standard output buffering for the ansible process. The ansible output is directly rendered into the Jenkins console. This option can be usefull for long running operations.
      • vaultCredentialsId : String (optional)
        Select the credentials for vault encrypted vars. Only secret file and secret text are supported.
      • vaultTmpPath : String (optional)
        Insert the path where to store temporary generated vault password files, ssh keys, etc... Default is in workspace.

      step([$class: 'AnsibleVaultBuilder']): Invoke Ansible Vault

      • action : String (optional)
        Desired vault action.
      • ansibleName : String (optional)
      • content : String (optional)
        Desired encrypted content.
      • input : String (optional)
        Desired input file to encrypt.
      • newVaultCredentialsId : String (optional)
        Select the credentials for rekeying vault encrypted files. Only Jenkins secret file and secret text are supported.
      • output : String (optional)
        Desired output file for encrypted content.
      • vaultCredentialsId : String (optional)
        Select the credentials for vault encrypted vars. Only Jenkins secret file and secret text are supported.
      • vaultTmpPath : String (optional)
        Insert the path where to store temporary generated vault password files, ssh keys, etc... Default is in workspace.

      Was this page helpful?

      Please submit your feedback about this page through this quick form.

      Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

          


      See existing feedback here.