diff --git a/CHANGELOG.md b/CHANGELOG.md index a46fae9ada6..d1a0d11936a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,6 +88,7 @@ Ansible Changes By Release * Fix removal of newlines when writing SELinux config (https://github.com/ansible/ansible/issues/30618) * clarified extension requirement for constructed inv plugin * really turn off inventory caching, toggle will be added in 2.5 +* for inventory sources, dont follow symlinks to calculate base directory, used for group/host_vars diff --git a/lib/ansible/cli/__init__.py b/lib/ansible/cli/__init__.py index 7d285740642..3660e4bf15d 100644 --- a/lib/ansible/cli/__init__.py +++ b/lib/ansible/cli/__init__.py @@ -615,7 +615,7 @@ class CLI(with_metaclass(ABCMeta, object)): self.options.inventory = [self.options.inventory] # Ensure full paths when needed - self.options.inventory = [unfrackpath(opt) if ',' not in opt else opt for opt in self.options.inventory] + self.options.inventory = [unfrackpath(opt, follow=False) if ',' not in opt else opt for opt in self.options.inventory] else: self.options.inventory = C.DEFAULT_HOST_LIST