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

Ansible Tower Plugin not compatible with Ansible Automation Platform 2.5

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • ansible-tower-plugin
    • None
    • Jenkins 2.492.1
      Ansible Tower Plugin 0.17.0
      Ansible Automation Platform 2.5

      I am testing our Jenkins instance with an updated version of Ansible Automation Platform (AAP), and the new version of AAP is using a new API endpoint. I am receiving an 'item not found' when testing access to AAP from Jenkins using the Ansible Tower Plugin. I believe this is because the plugin is using the API endpoint '/api/v2/' when the endpoint is now /api/ansible_component/v2/ (e.g. ansible_component = 'gateway'). Is this something your team is aware of? Is there something I'm missing?

          [JENKINS-75426] Ansible Tower Plugin not compatible with Ansible Automation Platform 2.5

          Rainer Montag added a comment - - edited

          Same issue on our side after the Automation Platform was updated from 2.4 to 2.5
          Unfortunately it looks like that the whole authentication mechanism has changed, so that token-based authentication on the controller is no longer supported in favor of a centralized authentication on the gateway.
          https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.5/html/release_notes/aap-2.5-deprecated-features#deprecated_api_endpoints  

          UPDATE:
          I tested with Postman and triggering a job launch is possible on the "new" controller API using the OAuth token

          POST https://{{instance_fqdn}}/api/controller/v2/job_templates/278/launch/
          201
          699 ms
          Warning: Unable to verify the first certificate
          POST /api/controller/v2/job_templates/278/launch/ HTTP/1.1
          Authorization: Bearer MY_PERSONAL_OAUTH_TOKEN
          User-Agent: PostmanRuntime/7.43.3
          Accept: */*
          Cache-Control: no-cache
          ...
          Accept-Encoding: gzip, deflate, br
          Connection: keep-alive
          Content-Length: 0
          
          HTTP/1.1 201 Created
          server: envoy
          date: Wed, 23 Apr 2025 15:09:29 GMT
          content-type: application/json
          content-length: 3323
          location: /api/controller/v2/jobs/97122/
          vary: Accept, Accept-Language, origin, Cookie
          allow: GET, POST, HEAD, OPTIONS
          ...
          content-language: en
          x-api-total-time: 0.490s
          x-api-request-id: f013c4c63ee746c19c2cbaaaeb8fa18b
          access-control-expose-headers: X-API-Request-Id
          strict-transport-security: max-age=63072000
          x-frame-options: DENY
          x-content-type-options: nosniff
          cache-control: no-cache, no-store, must-revalidate
          expires: 0
          pragma: no-cache
          x-envoy-upstream-service-time: 492
          
          {"job":97122," ...} 

          The token-based endpoints are now at /api/gateway/v2/. But I have not found all of them that are currently used in https://github.com/jenkinsci/ansible-tower-plugin/blob/master/src/main/java/org/jenkinsci/plugins/ansible_tower/util/TowerConnector.java

          Rainer Montag added a comment - - edited Same issue on our side after the Automation Platform was updated from 2.4 to 2.5 Unfortunately it looks like that the whole authentication mechanism has changed, so that token-based authentication on the controller is no longer supported in favor of a centralized authentication on the gateway . https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.5/html/release_notes/aap-2.5-deprecated-features#deprecated_api_endpoints   UPDATE: I tested with Postman and triggering a job launch is possible on the "new" controller API using the OAuth token POST https: //{{instance_fqdn}}/api/controller/v2/job_templates/278/launch/ 201 699 ms Warning: Unable to verify the first certificate POST /api/controller/v2/job_templates/278/launch/ HTTP/1.1 Authorization: Bearer MY_PERSONAL_OAUTH_TOKEN User-Agent: PostmanRuntime/7.43.3 Accept: */* Cache-Control: no-cache ... Accept-Encoding: gzip, deflate, br Connection: keep-alive Content-Length: 0 HTTP/1.1 201 Created server: envoy date: Wed, 23 Apr 2025 15:09:29 GMT content-type: application/json content-length: 3323 location: /api/controller/v2/jobs/97122/ vary: Accept, Accept-Language, origin, Cookie allow: GET, POST, HEAD, OPTIONS ... content-language: en x-api-total-time: 0.490s x-api-request-id: f013c4c63ee746c19c2cbaaaeb8fa18b access-control-expose-headers: X-API-Request-Id strict-transport-security: max-age=63072000 x-frame-options: DENY x-content-type-options: nosniff cache-control: no-cache, no-store, must-revalidate expires: 0 pragma: no-cache x-envoy-upstream-service-time: 492 { "job" :97122," ...} The token-based endpoints are now at /api/gateway/v2/. But I have not found all of them that are currently used in https://github.com/jenkinsci/ansible-tower-plugin/blob/master/src/main/java/org/jenkinsci/plugins/ansible_tower/util/TowerConnector.java

            johnwestcottiv John Westcott
            chasty2 Cody
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: