diff --git a/src/ansible_link.py b/src/ansible_link.py index 4e6a00d..ee664e2 100644 --- a/src/ansible_link.py +++ b/src/ansible_link.py @@ -84,12 +84,13 @@ def validate_playbook_request(data, config): if 'inventory' in data: inventory_path = Path(data['inventory']) - if not inventory_path.is_file(): - errors.append(f"Inventory file not found: {inventory_path}") + if not inventory_path.is_absolute(): + inventory_path = Path(config['playbook_dir']) / inventory_path else: inventory_path = Path(config['inventory_file']) - if not inventory_path.is_file(): - errors.append(f"Default inventory file not found: {inventory_path}") + + if not inventory_path.is_file(): + errors.append(f"Inventory file not found: {inventory_path}") data['inventory_path'] = str(inventory_path) if 'vars' in data and not isinstance(data['vars'], dict): diff --git a/src/version.py b/src/version.py index 4dac3a9..2e60b82 100644 --- a/src/version.py +++ b/src/version.py @@ -1,4 +1,4 @@ -VERSION = "2.0.0" +VERSION = "2.0.2" def get_version(): return VERSION \ No newline at end of file