Skip to content

Fix ATTACK_RANGE_LOCAL_ROLES: stage local roles by copying instead of ansible-galaxy - #1456

Open
stacypurcell-collab wants to merge 2 commits into
splunk:developfrom
stacypurcell-collab:fix-local-roles
Open

stacypurcell-collab wants to merge 2 commits into
splunk:developfrom
stacypurcell-collab:fix-local-roles

Conversation

@stacypurcell-collab

Copy link
Copy Markdown

Fixes #1455

ansible-galaxy install "," can't install from a local directory, so every local role override failed. For local overrides, this calls the existing _stage_role_copy() instead. It validates the role and copies it into terraform/ansible/roles/, replacing any existing copy. Galaxy installs for roles without an override are unchanged.

Tested: a full splunk_ad_gcp build on GCP with three local role overrides. Each role logs "Staged local role", and the build completes with failed=0.

Updated tests/test_ansible_manager_local_roles.py: the local-override test now checks that the role is copied and ansible-galaxy isn't called, and I added tests for replacing a stale copy and rejecting an invalid role. All 13 tests pass. The two main tests fail on the old code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ATTACK_RANGE_LOCAL_ROLES fails to install roles; GCP Windows hostnames collide and break domain join

1 participant