Skip to content

[ANSTRAT-1640] fix: replace uri verification with role_team_assignmen… - #161

Open
rohitthakur2590 wants to merge 6 commits into
stable-2.7from
fix_2.7_ci_br
Open

[ANSTRAT-1640] fix: replace uri verification with role_team_assignmen…#161
rohitthakur2590 wants to merge 6 commits into
stable-2.7from
fix_2.7_ci_br

Conversation

@rohitthakur2590

Copy link
Copy Markdown
Collaborator

…t state:exists

Replace ansible.builtin.uri + ansible.builtin.assert verification pair with a single ansible.platform.role_team_assignment task using state:exists.

The uri module cannot run over the ansible.platform.http connection (http-direct / http-persistent modes) because it raises NotImplementedError for exec_command. Using the native module with state:exists works correctly across all three connection modes and is the idiomatic approach.

Description

  • What is being changed?
  • Why is this change needed?
  • How does this change address the issue?

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Test update
  • Refactoring (no functional changes)
  • Development environment change
  • Configuration change

Self-Review Checklist

  • I have performed a self-review of my code
  • I have added relevant comments to complex code sections
  • I have updated documentation where needed
  • I have considered the security impact of these changes
  • I have considered performance implications
  • I have thought about error handling and edge cases
  • I have tested the changes in my local environment

Testing Instructions

Prerequisites

Steps to Test

Expected Results

Additional Context

Required Actions

  • Requires documentation updates
  • Requires downstream repository changes
  • Requires infrastructure/deployment changes
  • Requires coordination with other teams
  • Blocked by PR/MR: #XXX

Screenshots/Logs

…t state:exists

Replace ansible.builtin.uri + ansible.builtin.assert verification pair
with a single ansible.platform.role_team_assignment task using state:exists.

The uri module cannot run over the ansible.platform.http connection
(http-direct / http-persistent modes) because it raises NotImplementedError
for exec_command. Using the native module with state:exists works correctly
across all three connection modes and is the idiomatic approach.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Regression test that verifies all 2.6-style flat result key access patterns
still work when running against 2.7.

The 2.7 base_action.py spreads flat keys via **validated_output alongside
the new nested result.<module_name>.<field> structure. This test
explicitly asserts 2.6 patterns like:
  - org.id (not org.organization.id)
  - joe.id / joe.username (not joe.user.id)
  - team1.id (not team1.team.id)
  - auth.id (not auth.authenticator.id)
  - custom_role.id (not custom_role.role_definition.id)
  - rta.id / rua.id (role assignment flat keys)
  - app.id / app.client_id (not app.application.id)
  - tok.token / tok.description (token flat keys)
  - gateway_hostname/gateway_username connection param aliases

Covers 9 modules. Runs as part of all 3 connection modes in CI.
Added to tests_to_ignore in test_integration_check.py since it is
not a per-module test.
Signed-off-by: Rohit <rothakur1210@gmail.com>
Signed-off-by: Rohit <rothakur1210@gmail.com>
Signed-off-by: Rohit <rothakur1210@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test PR is safe to run integration tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant