mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-12-06 01:40:19 +00:00
refactor(cli): decouple invokable discovery from Ansible filter plugins
Switch cli.meta.applications.invokable to call module_utils.invokable.list_invokable_app_ids directly instead of using filter_plugins.get_all_invokable_apps. This removes the Ansible filter dependency from the CLI, making invokable discovery pure-Python, deterministic, and easier to test. https://chatgpt.com/share/698b225f-2c2c-800f-bd0e-624e82e5460a
This commit is contained in:
1 file changed
+2
-2
@@ -10,7 +10,7 @@ from pathlib import Path
|
||||
REPO_ROOT = Path(__file__).resolve().parents[4]
|
||||
sys.path.insert(0, str(REPO_ROOT))
|
||||
|
||||
from filter_plugins.get_all_invokable_apps import get_all_invokable_apps # noqa: E402
|
||||
from module_utils.invokable import list_invokable_app_ids # noqa: E402
|
||||
|
||||
|
||||
def main() -> None:
|
||||
@@ -27,7 +27,7 @@ def main() -> None:
|
||||
args = parser.parse_args()
|
||||
|
||||
try:
|
||||
result = get_all_invokable_apps()
|
||||
result = list_invokable_app_ids()
|
||||
except Exception as e:
|
||||
sys.stderr.write(f"Error: {e}\n")
|
||||
sys.exit(1)
|
||||
|
||||
Reference in new issue
Block a user