-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Blocker
-
Component/s: ansible-plugin
-
Environment:Jenkins Version - 2.46.1
Ansible plugin - 0.62
Ansible - 2.2.20
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
Â
- blocks
-
JENKINS-49056 Pipeline Support for Ansible Adhoc Commands
-
- Resolved
-
- is duplicated by
-
JENKINS-34633 ansible-plugin with pipeline groovy multiple misbehaviours
-
- Open
-