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

hudson.AbortException: Ansible playbook execution failed

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Faild always

      Jenkins ver. 2.60.1 under Windows
      jenkins agent under linux:

      ansible 2.7.0
        config file = /etc/ansible/ansible.cfg
        configured module search path = [u'/etc/ansible/my_modules']
        ansible python module location = /usr/lib/python2.7/site-packages/ansible
        executable location = /usr/bin/ansible
        python version = 2.7.5 (default, Aug  4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]
      

       

      run from jenkins:

       

      // code placeholder
      $ /usr/bin/ansible-playbook /etc/ansible/playbooks/tools/Check_hostname.yml -i host -f 5
      PLAY [all] *********************************************************************
      TASK [Gathering Facts] ********************************************************
      .......
      TASK [Comprobando nombre equipo] ***********************************************
      .....
      PLAY RECAP *********************************************************************
      .......
      w********p           : ok=0    changed=0    unreachable=1    failed=0   
      FATAL: command execution failedhudson.AbortException: Ansible playbook execution failed at org.jenkinsci.plugins.ansible.AnsiblePlaybookBuilder.perform(AnsiblePlaybookBuilder.java:236) at org.jenkinsci.plugins.ansible.AnsiblePlaybookBuilder.perform(AnsiblePlaybookBuilder.java:207) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:735) at hudson.model.Build$BuildExecution.build(Build.java:206) at hudson.model.Build$BuildExecution.doRun(Build.java:163) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:490) at hudson.model.Run.execute(Run.java:1735) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:405)
      ERROR: Ansible playbook execution failed
       Archiving artifacts
       Recording test results
       Finished: FAILURE
      

       

       Run in host:

       

      // code placeholder
      $ /usr/bin/ansible-playbook /etc/ansible/playbooks/tools/Check_hostname.yml -i host -f 5
      PLAY [all] *********************************************************************
      TASK [Gathering Facts] ********************************************************
      .......
      TASK [Comprobando nombre equipo] ***********************************************
      .....
      PLAY RECAP *********************************************************************
      .......
      w********p           : ok=0    changed=0    unreachable=1    failed=0   
      #
      

       

       

        Attachments

          Activity

          Hide
          jchr Jui Chandwaskar added a comment -

          Hello,

          We are using Jenkins Version: 2.138.2 running on Ubuntu 16.04

          Ansible plugin version: 1.0

          Ansible version: 2.7.9

          We have the same issue. It appears on different task sporadically.
          like once trying to run a bash script with command module and the other time with ansible template module.

          • name: Run script
            become: yes
            shell: ./test_script.sh
            args:
            chdir: "{{ jenkins_home }}"
          • name: Create new configuration
            become: yes
            template: src={{ config_template }}.j2 dest={{ user_home }}/{{ config_template }} backup=yes

          Error while running task for template module:
          TASK [configure_test_jenkins : Create new configuration] ***********************16:28:10 FATAL: command execution failed*16:28:10* hudson.AbortException: Ansible playbook execution failed*16:28:10* at org.jenkinsci.plugins.ansible.AnsiblePlaybookBuilder.perform(AnsiblePlaybookBuilder.java:262)16:28:10 at org.jenkinsci.plugins.ansible.workflow.AnsiblePlaybookStep$AnsiblePlaybookExecution.run(AnsiblePlaybookStep.java:400)16:28:10 at org.jenkinsci.plugins.ansible.workflow.AnsiblePlaybookStep$AnsiblePlaybookExecution.run(AnsiblePlaybookStep.java:321)16:28:10 at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)16:28:10 at hudson.security.ACL.impersonate(ACL.java:290)16:28:10 at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)16:28:10 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)16:28:10 at java.util.concurrent.FutureTask.run(FutureTask.java:266)16:28:10 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)16:28:10 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)16:28:10 at java.lang.Thread.run(Thread.java:748)

          Show
          jchr Jui Chandwaskar added a comment - Hello, We are using Jenkins Version: 2.138.2 running on Ubuntu 16.04 Ansible plugin version: 1.0 Ansible version: 2.7.9 We have the same issue. It appears on different task sporadically. like once trying to run a bash script with command module and the other time with ansible template module. name: Run script become: yes shell: ./test_script.sh args: chdir: "{{ jenkins_home }}" name: Create new configuration become: yes template: src={{ config_template }}.j2 dest={{ user_home }}/{{ config_template }} backup=yes Error while running task for template module: TASK [configure_test_jenkins : Create new configuration] *********************** 16:28:10 FATAL: command execution failed*16:28:10* hudson.AbortException: Ansible playbook execution failed*16:28:10* at org.jenkinsci.plugins.ansible.AnsiblePlaybookBuilder.perform(AnsiblePlaybookBuilder.java:262) 16:28:10 at org.jenkinsci.plugins.ansible.workflow.AnsiblePlaybookStep$AnsiblePlaybookExecution.run(AnsiblePlaybookStep.java:400) 16:28:10 at org.jenkinsci.plugins.ansible.workflow.AnsiblePlaybookStep$AnsiblePlaybookExecution.run(AnsiblePlaybookStep.java:321) 16:28:10 at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47) 16:28:10 at hudson.security.ACL.impersonate(ACL.java:290) 16:28:10 at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44) 16:28:10 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 16:28:10 at java.util.concurrent.FutureTask.run(FutureTask.java:266) 16:28:10 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 16:28:10 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 16:28:10 at java.lang.Thread.run(Thread.java:748)
          Hide
          mksmith Matthew Smith added a comment -

          We also see this issue.

          Ansible Plugin version 1.0

          Jenkins Version: 2.164.1

          Surprisingly, downgrading the Ansible Plugin to version 0.6.2 didn't even fix the issue. 

          Show
          mksmith Matthew Smith added a comment - We also see this issue. Ansible Plugin version 1.0 Jenkins Version: 2.164.1 Surprisingly, downgrading the Ansible Plugin to version 0.6.2 didn't even fix the issue. 
          Hide
          dchsueh Daniel Hsueh added a comment -

          I'm seeing this as well.  Strikes at different places during the playbook execution.

           

          jenkins-2.164

          ansible-1.0

           

          Show
          dchsueh Daniel Hsueh added a comment - I'm seeing this as well.  Strikes at different places during the playbook execution.   jenkins-2.164 ansible-1.0  
          Hide
          tvanderhaegen Thibaut V added a comment -

          I also have this issue

          Jenkins ver. 2.153

          Ansible plugin 1.0

          Show
          tvanderhaegen Thibaut V added a comment - I also have this issue Jenkins ver. 2.153 Ansible plugin 1.0
          Hide
          rocking80 Roc King added a comment - - edited

          I got the same issue. The same playbook command can run successfully in command line. But failed in Jenkins.

          Jenkins version: 2.164.1

          Ansible plugin 1.0

          Jean-Christophe Sirot, this is a sev 1 issue, could you please help to investigate this? Thanks.

           

          Show
          rocking80 Roc King added a comment - - edited I got the same issue. The same playbook command can run successfully in command line. But failed in Jenkins. Jenkins version: 2.164.1 Ansible plugin 1.0 Jean-Christophe Sirot , this is a sev 1 issue, could you please help to investigate this? Thanks.  

            People

            • Assignee:
              sirot Jean-Christophe Sirot
              Reporter:
              wowberk Josu Rodriguez
            • Votes:
              19 Vote for this issue
              Watchers:
              25 Start watching this issue

              Dates

              • Created:
                Updated: