Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-66075

ansiblePlaybook in PostBuildScript steps not working with PostBuildScript plugin 3.0.0

XMLWordPrintable

      ansiblePlaybook doesn't work in postbuildscript plugin with job-dsl.

      Jenkins version: 2.289
      Job dsl plugin version: 1.77
      PostBuildScript  plugin version: 3.0.0

      Example:

      publishers {
                  postBuildScripts {
                     onlyIfBuildFails(true)
                     onlyIfBuildSucceeds(true)
                     steps {
                        ansiblePlaybook("myplaybook.yml") {
                           ansibleName('ansible')
                           inventoryPath("myinventory")
                           credentialsId('6666')
                           additionalParameters("--vault-password-file=~/ansible_vault_pass.txt")
                           colorizedOutput(true)
                           extraVars {
                              extraVar("foo", "present", false)
                           }
                        }
                     }
                  }
       

      When ansiblePlaybook postbuildscript is created manually, the config.xml looks very different from the result created by the job dsl plugin.

            jamietanna Jamie Tanna
            christian_kasper Christian
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: