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

Can't run any playbook with roles

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Not A Defect
    • Component/s: ansible-plugin
    • Labels:
      None
    • Environment:
      Jenkins ver. 2.32.3
      Ansible plugin v0.6.2
      ansible 1.7.2
    • Similar Issues:

      Description

      Maybe this is a known issue, but I can't run any playbook that uses roles.

      It seems like the plugin is somehow finding the role task file and is trying to construct an incorrect path to execute it, instead of the main playbook file.

      Here is a simple reproduction: https://github.com/orzarchi/ansible-plugin-repro

      Here is the pipeline to use with the reproduction: https://raw.githubusercontent.com/orzarchi/ansible-plugin-repro/master/pipeline.txt

      Running it results in the following error:
      [Deploy service] $ ansible-playbook repro.yml -i inventory.ini
      ERROR: file could not read: /var/jenkins_home/workspace/Deploy service/'/var/jenkins_home/workspace/Deploy service/roles/testrole/tasks/main.yml'
      FATAL: command execution failed

        Attachments

          Activity

          orzar or zarchi created issue -
          orzar or zarchi made changes -
          Field Original Value New Value
          Priority Major [ 3 ] Minor [ 4 ]
          orzar or zarchi made changes -
          Description Maybe this is a known issue, but I can't run any playbook that uses roles.

          It seems like the plugin is somehow finding the role task file and is trying to construct an incorrect path to execute it, instead of the main playbook file.

          Here is a simple reproduction: [https://github.com/orzarchi/ansible-plugin-repro]

          Here is the pipeline to use with the reproduction.

          Running it results in the following error:
          [Deploy service] $ ansible-playbook repro.yml -i inventory.ini
          ERROR: file could not read: /var/jenkins_home/workspace/Deploy service/'/var/jenkins_home/workspace/Deploy service/roles/testrole/tasks/main.yml'
          FATAL: command execution failed
          Maybe this is a known issue, but I can't run any playbook that uses roles.

          It seems like the plugin is somehow finding the role task file and is trying to construct an incorrect path to execute it, instead of the main playbook file.

          Here is a simple reproduction: [https://github.com/orzarchi/ansible-plugin-repro]

          Here is the pipeline to use with the reproduction: https://raw.githubusercontent.com/orzarchi/ansible-plugin-repro/master/pipeline.txt

          Running it results in the following error:
           [Deploy service] $ ansible-playbook repro.yml -i inventory.ini
           ERROR: file could not read: /var/jenkins_home/workspace/Deploy service/'/var/jenkins_home/workspace/Deploy service/roles/testrole/tasks/main.yml'
           FATAL: command execution failed
          orzar or zarchi made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Not A Defect [ 7 ]

            People

            • Assignee:
              sirot Jean-Christophe Sirot
              Reporter:
              orzar or zarchi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: