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

Some final output is missing in Jenkins Pipeline when using the Ansible Plugin

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When using the Ansible Plugin with jenkins Pipeline,
      I can't see the entire log on Jenkins PIpeline build output - Some output is missing at the end of the Ansible play.
      The output looks fine on a terminal - if I'll SSH to the server and run the ansible-playbook command from the command line.

      • This issue started about a month ago..

      Here is a screenshot of how the output look like now:
      https://imgur.com/waX7XcM

      Ansible Plugin:
      https://jenkins.io/doc/pipeline/steps/ansible/

      This is the Pipeline code that uses the Ansible Pipeline Plugin:

              stage('running something') {
                  steps {
                      script {
                          dir('my/path/here') {
                              ansiblePlaybook([
                                      inventory   : 'hosts',
                                      playbook    : 'main.yml',
                                      installation: 'ansible',
                                      sudoUser    : null,
                                      colorized   : true,
                                      extraVars   : [
                                              blah   : "${params.blah}",
                                              some_var       : "${params.some_var}"
                                      ]
                              ])
                          }
                      }
                  }
              }
      

        Attachments

          Issue Links

            Activity

            nimitack Adam Delarosa created issue -
            nimitack Adam Delarosa made changes -
            Field Original Value New Value
            Description When using the Ansible Plugin with jenkins Pipeline
            I can't see the entire log (I could see the entire log if I'll SSH to the server and run the command from the command line).
            This issue started about a month ago..

            Here is a screenshot of how the output look like now:
            [https://imgur.com/waX7XcM]

            Ansible Plugin:
            https://jenkins.io/doc/pipeline/steps/ansible/
            When using the Ansible Plugin with jenkins Pipeline
             I can't see the entire log (I could see the entire log if I'll SSH to the server and run the command from the command line).
             This issue started about a month ago..

            Here is a screenshot of how the output look like now:
             [https://imgur.com/waX7XcM]

            Ansible Plugin:
             [https://jenkins.io/doc/pipeline/steps/ansible/]

            This is the Pipeline code that uses the Ansible Pipeline Plugin:


            {code:java}
                    stage('running something') {
                        steps {
                            script {
                                dir('my/path/here') {
                                    ansiblePlaybook([
                                            inventory : 'hosts',
                                            playbook : 'main.yml',
                                            installation: 'ansible',
                                            sudoUser : null,
                                            colorized : true,
                                            extraVars : [
                                                    blah : "${params.blah}",
                                                    some_var : "${params.some_var}"
                                            ]
                                    ])
                                }
                            }
                        }
                    }
            {code}
            nimitack Adam Delarosa made changes -
            Description When using the Ansible Plugin with jenkins Pipeline
             I can't see the entire log (I could see the entire log if I'll SSH to the server and run the command from the command line).
             This issue started about a month ago..

            Here is a screenshot of how the output look like now:
             [https://imgur.com/waX7XcM]

            Ansible Plugin:
             [https://jenkins.io/doc/pipeline/steps/ansible/]

            This is the Pipeline code that uses the Ansible Pipeline Plugin:


            {code:java}
                    stage('running something') {
                        steps {
                            script {
                                dir('my/path/here') {
                                    ansiblePlaybook([
                                            inventory : 'hosts',
                                            playbook : 'main.yml',
                                            installation: 'ansible',
                                            sudoUser : null,
                                            colorized : true,
                                            extraVars : [
                                                    blah : "${params.blah}",
                                                    some_var : "${params.some_var}"
                                            ]
                                    ])
                                }
                            }
                        }
                    }
            {code}
            When using the Ansible Plugin with jenkins Pipeline
             I can't see the entire log in the terminal if I'll SSH to the server and run the command from the command line.
             This issue started about a month ago..

            Here is a screenshot of how the output look like now:
             [https://imgur.com/waX7XcM]

            Ansible Plugin:
             [https://jenkins.io/doc/pipeline/steps/ansible/]

            This is the Pipeline code that uses the Ansible Pipeline Plugin:
            {code:java}
                    stage('running something') {
                        steps {
                            script {
                                dir('my/path/here') {
                                    ansiblePlaybook([
                                            inventory : 'hosts',
                                            playbook : 'main.yml',
                                            installation: 'ansible',
                                            sudoUser : null,
                                            colorized : true,
                                            extraVars : [
                                                    blah : "${params.blah}",
                                                    some_var : "${params.some_var}"
                                            ]
                                    ])
                                }
                            }
                        }
                    }
            {code}
            nimitack Adam Delarosa made changes -
            Description When using the Ansible Plugin with jenkins Pipeline
             I can't see the entire log in the terminal if I'll SSH to the server and run the command from the command line.
             This issue started about a month ago..

            Here is a screenshot of how the output look like now:
             [https://imgur.com/waX7XcM]

            Ansible Plugin:
             [https://jenkins.io/doc/pipeline/steps/ansible/]

            This is the Pipeline code that uses the Ansible Pipeline Plugin:
            {code:java}
                    stage('running something') {
                        steps {
                            script {
                                dir('my/path/here') {
                                    ansiblePlaybook([
                                            inventory : 'hosts',
                                            playbook : 'main.yml',
                                            installation: 'ansible',
                                            sudoUser : null,
                                            colorized : true,
                                            extraVars : [
                                                    blah : "${params.blah}",
                                                    some_var : "${params.some_var}"
                                            ]
                                    ])
                                }
                            }
                        }
                    }
            {code}
            When using the Ansible Plugin with jenkins Pipeline,
            I can't see the entire log on Jenkins PIpeline build output - Some output is missing at the end of the Ansible play.
            The output looks fine on a terminal - if I'll SSH to the server and run the ansible-playbook command from the command line.

            * This issue started about a month ago..

            Here is a screenshot of how the output look like now:
             [https://imgur.com/waX7XcM]

            Ansible Plugin:
             [https://jenkins.io/doc/pipeline/steps/ansible/]

            This is the Pipeline code that uses the Ansible Pipeline Plugin:
            {code:java}
                    stage('running something') {
                        steps {
                            script {
                                dir('my/path/here') {
                                    ansiblePlaybook([
                                            inventory : 'hosts',
                                            playbook : 'main.yml',
                                            installation: 'ansible',
                                            sudoUser : null,
                                            colorized : true,
                                            extraVars : [
                                                    blah : "${params.blah}",
                                                    some_var : "${params.some_var}"
                                            ]
                                    ])
                                }
                            }
                        }
                    }
            {code}
            bspecht Ben Specht made changes -
            bspecht Ben Specht made changes -
            Issue Type Task [ 3 ] Bug [ 1 ]
            vivek Vivek Pandey made changes -
            Labels ansible ansible-plugin jenkins pipeline playbook ansible ansible-plugin jenkins pipeline pipeline-triaged playbook
            adghdev Andrei Gheorghiu made changes -
            Attachment ansible-plugin-blue-ocean.PNG [ 45571 ]
            adghdev Andrei Gheorghiu made changes -
            Attachment ansible-plugin.PNG [ 45572 ]
            adghdev Andrei Gheorghiu made changes -
            Attachment ansible-plugin-moved-output.PNG [ 45573 ]
            maneken Ruslan Bondarau made changes -
            Attachment Selection_026.jpg [ 45583 ]
            trowdark Benjamin Debotte made changes -
            Attachment image-2019-01-07-13-55-02-950.png [ 45586 ]
            trowdark Benjamin Debotte made changes -
            Attachment image-2019-01-07-13-55-28-725.png [ 45587 ]
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-52729 [ JENKINS-52729 ]
            jglick Jesse Glick made changes -
            Component/s pipeline [ 21692 ]
            Labels ansible ansible-plugin jenkins pipeline pipeline-triaged playbook pipeline pipeline-triaged playbook
            adghdev Andrei Gheorghiu made changes -
            Attachment ansible-plugin-blue-ocean.PNG [ 45571 ]
            adghdev Andrei Gheorghiu made changes -
            Attachment ansible-plugin.PNG [ 45572 ]
            adghdev Andrei Gheorghiu made changes -
            Attachment ansible-plugin-moved-output.PNG [ 45573 ]
            adghdev Andrei Gheorghiu made changes -
            Comment [ I also have the same issue, but only in the standard console, the Blue Ocean UI displays everything properly. Also, this behavior is strictly related to the plugin, as the same command called from Jenkins shell  works as expected. 

             
            {quote}Running via ansible plugin[Pipeline] ansiblePlaybook[retry-test] $ ansible-playbook looping-with-parameters.yml -i inventory --extra-vars '\{"commands_list": [ls, pwd, date, whoami]}'

            PLAY [target] ******************************************************************

            TASK [Gathering Facts] *********************************************************
            ok: [eltf-qemu01]

            TASK [Run test(s)] *************************************************************
            changed: [eltf-qemu01] => (item=ls)
            changed: [eltf-qemu01] => (item=pwd)
            changed: [eltf-qemu01] => (item=date)[Pipeline] echoRunning from jenkins shell[Pipeline] sh+ ansible-playbook looping-with-parameters.yml -i inventory --extra-vars \{"commands_list": [ls, pwd, date, whoami]}changed: [eltf-qemu01] => (item=whoami)

            PLAY RECAP *********************************************************************
            eltf-qemu01 : ok=2 changed=1 unreachable=0 failed=0 PLAY [target] ******************************************************************

            TASK [Gathering Facts] *********************************************************
            ok: [eltf-qemu01]

            TASK [Run test(s)] *************************************************************
            changed: [eltf-qemu01] => (item=ls)
            changed: [eltf-qemu01] => (item=pwd)
            changed: [eltf-qemu01] => (item=date)
            changed: [eltf-qemu01] => (item=whoami)

            PLAY RECAP *********************************************************************
            eltf-qemu01 : ok=2 changed=1 unreachable=0 failed=0 {quote}
            !ansible-plugin-blue-ocean.PNG!

            System info:
             Ansible Pipeline plugin Version 1.0
             Jenkins version 2.150.1
             Pipeline version 2.6

            Blue Ocean 1.10.1 ]

              People

              Assignee:
              sirot Jean-Christophe Sirot
              Reporter:
              nimitack Adam Delarosa
              Votes:
              14 Vote for this issue
              Watchers:
              20 Start watching this issue

                Dates

                Created:
                Updated: