Skip to content

Conversation

jriouovh
Copy link

SUMMARY

We deploy AWX inside a secure environment where every HTTP call has to go through a gateway responsible for authenticating every micro service, even if the software behind has its own authentication mechanism. In order to authenticate against this gateway, we need to provide additional non-conflicting HTTP headers. This pull request allows to provide an arbitrary list of HTTP headers to every requests made by the Ansible collection, that we use to configure AWX. By default, no custom header is provided.

ISSUE TYPE
  • New or Enhanced Feature
COMPONENT NAME
  • Collection

Example of usage:

- name: Configure execution environments
  awx.awx.execution_environment:
    http_headers:
      X-Gateway-Source: "{{ awx_gw_uservice.id }}"
      X-Gateway-Token: "{{ awx_gw_uservice.secret }}"
      X-Gateway-Region: "{{ awx_gw_uservice.region }}"
      X-Gateway-Service-Name: "awx"
    name: "{{ item.value.name }}"
    image: "{{ item.value.image }}:{{ item.value.image_tag }}"
    validate_certs: "{{ awx_validate_cert | default('yes') }}"
  loop: "{{ lookup('dict', awx_common_ee | combine(awx_specific_ee | default({})), wantlist=True) }}"
  tags: ['ee', 'execution_environment']

@github-actions github-actions bot added component:awx_collection issues related to the collection for controlling AWX community labels May 15, 2025
@tvo318
Copy link
Member

tvo318 commented May 15, 2025

@jriouovh - thank you for contributing this PR. Would you mind re-basing your branch?

Add arbitrary HTTP headers to every request.

Signed-off-by: Julien Riou <[email protected]>
@jriouovh
Copy link
Author

@jriouovh - thank you for contributing this PR. Would you mind re-basing your branch?

Rebased

Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community component:awx_collection issues related to the collection for controlling AWX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants