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

Can't check "Disable the host SSH key check" in Ansible plugin through JobDSL

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • ansible-plugin
    • None
    • Jenkins 2.164.1, Job DSL 1.72, Ansible plugin 1.0. Jenkins runs on Linux Redhat.

      Given a Jenkins installation with the latest Job DSL and Ansible plugin, as far as I understand the following DSL code should generate a Jenkins job with two 'Invoke Ansible Playbook' build steps. But it doesn't: it creates the two steps just fine, but the 'Invoke Ansible Playbook' checkbox remains disabled for both generated steps.

      Note that all other supported chechboxes and fields work just fine.

      job('reproducer-job') {
        description('Reproducer dsl seed job')
        steps {
          ansiblePlaybook('test-host-key-checking-false.yml') {
            inventoryPath('test-inventory.ini')
            hostKeyChecking(false)
          }
          ansiblePlaybook('test-host-key-checking-true.yml') {
            inventoryPath('test-inventory.ini')
            hostKeyChecking(true)
          }
        }
      }

       

            sirot Jean-Christophe Sirot
            sadbunny bouke b
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: