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

ansiblePlaybook: Invoke an ansible playbook

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

ansibleVault: Invoke ansible vault

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

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

  • hostPattern
    The host or set of hosts on which the command will be executed. For more details see the ansible documentation for Patterns.
    • Type: String
  • inventory
      Nested Choice of Objects
    • $class: 'InventoryContent'
      • content
        • Type: String
      • dynamic
        Check this box if a dynamic inventory is used. For more details see the ansible documentation for Dynamic Inventory
        • Type: boolean
    • $class: 'InventoryDoNotSpecify'
      • $class: 'InventoryPath'
        • path
          Specify the inventory host path or a comma separated host list
          • Type: String
    • module
      Module name to execute. The shell module is used when left empty.
      • Type: String
    • command
      Module arguments or shell command to execute
      • Type: String
    • additionalParameters (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.
      • Type: String
    • ansibleName (optional)
      • Type: String
    • becomeUser (optional)
      Desired become user. "root" is used when this field is empty.
      • Type: String
    • colorizedOutput (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.
      • Type: boolean
    • credentialsId (optional)
      Select the credentials for the SSH connections. Only private key authentication is supported.
      • Type: String
    • disableHostKeyChecking (optional)
      Check this box if you really want to disable the validation of the hosts SSH server keys.
      • Type: boolean
    • extraVars (optional)
        Array/List
        Nested Object
      • hidden (optional)
        • Type: boolean
      • key (optional)
        • Type: String
      • value (optional)
        • Type: String
    • forks (optional)
      Specify number of parallel processes to use. Set to 0 to use the default value.
      • Type: int
    • hostKeyChecking (optional)
      • Type: boolean
    • sudo (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.
      • Type: boolean
    • sudoUser (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.
      • Type: String
    • unbufferedOutput (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.
      • Type: boolean
    • vaultCredentialsId (optional)
      Select the credentials for vault encrypted vars. Only secret file and secret text are supported.
      • Type: String

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

    • playbook
      Path to the ansible playbook file. The path can be absolute or relative to the job workspace.
      • Type: String
    • inventory
        Nested Choice of Objects
      • $class: 'InventoryContent'
        • content
          • Type: String
        • dynamic
          Check this box if a dynamic inventory is used. For more details see the ansible documentation for Dynamic Inventory
          • Type: boolean
      • $class: 'InventoryDoNotSpecify'
        • $class: 'InventoryPath'
          • path
            Specify the inventory host path or a comma separated host list
            • Type: String
      • additionalParameters (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.
        • Type: String
      • ansibleName (optional)
        • Type: String
      • becomeUser (optional)
        Desired become user. "root" is used when this field is empty.
        • Type: String
      • colorizedOutput (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.
        • Type: boolean
      • credentialsId (optional)
        Select the credentials for the SSH connections. Only private key authentication is supported.
        • Type: String
      • disableHostKeyChecking (optional)
        Check this box if you really want to disable the validation of the hosts SSH server keys.
        • Type: boolean
      • extraVars (optional)
          Array/List
          Nested Object
        • hidden (optional)
          • Type: boolean
        • key (optional)
          • Type: String
        • value (optional)
          • Type: String
      • forks (optional)
        Specify number of parallel processes to use. Set to 0 to use the default value.
        • Type: int
      • hostKeyChecking (optional)
        • Type: boolean
      • limit (optional)
        Further limit selected hosts to an additional pattern.
        • Type: String
      • skippedTags (optional)
        only run plays and tasks whose tags do not match these values.
        • Type: String
      • startAtTask (optional)
        Start the playbook at the task matching this name.
        • Type: String
      • sudo (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.
        • Type: boolean
      • sudoUser (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.
        • Type: String
      • tags (optional)
        Only run plays and tasks tagged with these values.
        • Type: String
      • unbufferedOutput (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.
        • Type: boolean
      • vaultCredentialsId (optional)
        Select the credentials for vault encrypted vars. Only secret file and secret text are supported.
        • Type: String

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

      • action (optional)
        Desired vault action.
        • Type: String
      • ansibleName (optional)
        • Type: String
      • content (optional)
        Desired encrypted content.
        • Type: String
      • input (optional)
        Desired input file to encrypt.
        • Type: String
      • newVaultCredentialsId (optional)
        Select the credentials for rekeying vault encrypted files. Only Jenkins secret file and secret text are supported.
        • Type: String
      • output (optional)
        Desired output file for encrypted content.
        • Type: String
      • vaultCredentialsId (optional)
        Select the credentials for vault encrypted vars. Only Jenkins secret file and secret text are supported.
        • Type: String

      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.