Skip to content

Conversation

OscarBell
Copy link
Contributor

Updated utils.is_playbook function to support the fqcn version of import_playbook to detect a valid playbook file.

@OscarBell
Copy link
Contributor Author

This PR will solve issue: #4578

@OscarBell
Copy link
Contributor Author

Alternatively if the playbooks_keys needs to be unadjusted we could change below line
if not isinstance(item, Mapping) or not playbooks_keys.intersection( item.keys() ):
into
if not isinstance(item, Mapping) or not playbooks_keys.intersection( {item.split('.')[-1] for item in item.keys()} ):
With above solution all keys found in the play will be changed into the non-fqcn variant and can be compared against the playbook_keys

@ssbarnea ssbarnea changed the title 4578: utils.is_playbook support fqcn import_playbook Make utils.is_playbook support fqcn import_playbook Jun 13, 2025
@ssbarnea ssbarnea added this pull request to the merge queue Jun 13, 2025
Merged via the queue into ansible:main with commit b38d067 Jun 13, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants