Fix pyproject.toml version parsing to not require community.general collection

Replace community.general.toml lookup with regex_search on file lookup.
This fixes "lookup plugin (community.general.toml) not found" error on macOS
where the collection may not be available during early bootstrap.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Dan Guido 2025-08-05 15:58:11 -07:00
parent 4b00b8ae5d
commit 2efaa25c56

View file

@ -24,7 +24,7 @@
- name: Extract ansible version from pyproject.toml
set_fact:
ansible_requirement: "{{ lookup('community.general.toml', 'pyproject.toml', 'project.dependencies') | select('match', '^ansible.*') | first }}"
ansible_requirement: "{{ lookup('file', 'pyproject.toml') | regex_search('ansible==[0-9]+\\.[0-9]+\\.[0-9]+') }}"
- name: Parse ansible version requirement
set_fact: