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

ansible plugin doesn't work with general build step of pipeline in 0.62 version

XMLWordPrintable

      ansible plugin doesn't work with general build step of pipeline  in 0.62 version

      node {
          step([$class: 'AnsiblePlaybookBuilder',
              additionalParameters: '-e port=8081',
              ansibleName: 'ansible',
              credentialsId: '',
              inventory: [$class: 'InventoryContent',
              content: '''[tomcat]
      192.168.10.10''',
              dynamic: false],
              limit: '',
              playbook: '/opt/ansible/tomcat.yml',
              skippedTags: '',
              startAtTask: '',
              sudoUser: '',
              tags: ''])
      }

      This codes return error

      ERROR: The ansible playbook build step requires to be launched on a node

       

      node {
          ansiblePlaybook(
              colorized: true,
              extras: '-e port=8081',
              installation: 'ansible',
              inventory: '/opt/ansible/hosts',
              playbook: '/opt/ansible/tomcat.yml',
              sudoUser: null)
      }

      This codes work fine

       

            escoem Emilio Escobar
            xpflying xu peng
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: