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

Job Tags don't pass to Ansible Tower/AWX

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • ansible-tower-plugin
    • None
    • Ansible Tower Plugin version 0.5.3
      Ansible AWX version 1.0.1

    Description

      Typing in single Job Tags or comma-separated multiple Job Tags in the Job Tags field of the Plugin don't pass through to the corresponding AWX/Ansible Tower Job Template.  The other fields like limits and extra vars, however, have been tested to work okay.

      Expected Results:

      Tasks should be limited to run based on their specific job tags.

      Actual Results:

      The entire playbook is running, with the job unaware of job tags being specified.

      Note: Job Tags specified directly in AWX Job Templates will run the tasks as expected.

      Attachments

        Activity

          tokiwong Alvin Wong added a comment -

          johnwestcottiv Well this is embarrassing, it turns out I didn't have "prompt on launch" on anything for my test jobs, so it was my issue of negligence and I can confirm that values are being passed now.  However, looking at my logs, messages didn't show up in regards to detecting unpassed values. 

          Currently working with AWX v1.0.1.203

          tokiwong Alvin Wong added a comment - johnwestcottiv Well this is embarrassing, it turns out I didn't have "prompt on launch" on anything for my test jobs, so it was my issue of negligence and I can confirm that values are being passed now.  However, looking at my logs, messages didn't show up in regards to detecting unpassed values.  Currently working with AWX v1.0.1.203
          tokiwong Alvin Wong added a comment -

          The Issue was user error of forgetting to check "prompt on launch" for values to be passed from Jenkins to AWX.

          tokiwong Alvin Wong added a comment - The Issue was user error of forgetting to check "prompt on launch" for values to be passed from Jenkins to AWX.
          johnwestcottiv John Westcott added a comment -

          Alvin, I'm not sure why but it took quite a while for the new plugin to propagate out to the Jenkins Plugin Center. Can you see if you now see the updated version (5.4)? If so, can you install it and see if you can now get it to produce the warning messages if an input is defined but prompt on launch is not set for the job?

          johnwestcottiv John Westcott added a comment - Alvin, I'm not sure why but it took quite a while for the new plugin to propagate out to the Jenkins Plugin Center. Can you see if you now see the updated version (5.4)? If so, can you install it and see if you can now get it to produce the warning messages if an input is defined but prompt on launch is not set for the job?
          tokiwong Alvin Wong added a comment -

          John, I downloaded 5.4 and re-ran my test jobs without "Prompt On Launch".  Where am I supposed to be seeing these warning messages? I've checked the console output for the individual builds and /var/log/jenkins/jenkins.log, but they both just indicate a Build Failure instead of showing warning messages that the Tower Jobs don't have "prompt on launch" set.

          tokiwong Alvin Wong added a comment - John, I downloaded 5.4 and re-ran my test jobs without "Prompt On Launch".  Where am I supposed to be seeing these warning messages? I've checked the console output for the individual builds and /var/log/jenkins/jenkins.log, but they both just indicate a Build Failure instead of showing warning messages that the Tower Jobs don't have "prompt on launch" set.
          johnwestcottiv John Westcott added a comment -

          They should show up in the console log at the beginning of the Tower run:
          Beginning Ansible Tower Run on Prod Tower
          [WARNING]: Job Tags defined but prompt for tags on launch is not set in tower job
          Requesting tower to run job template Simple Test

          johnwestcottiv John Westcott added a comment - They should show up in the console log at the beginning of the Tower run: Beginning Ansible Tower Run on Prod Tower [WARNING] : Job Tags defined but prompt for tags on launch is not set in tower job Requesting tower to run job template Simple Test

          People

            tokiwong Alvin Wong
            tokiwong Alvin Wong
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: