Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix inventory.basedir is not absolute path when hostfile is startswith "./" #3814

Merged
merged 1 commit into from
Aug 11, 2013

Conversation

ftao
Copy link
Contributor

@ftao ftao commented Aug 11, 2013

Fix a problem when
ansible.cfg looks like

[defaults]
hostfile = ./ansible_hosts

The inventory_dir is set to '.', not the absolute path .

That cause problem when I try to use lookup plugin like following:
some vars file

somevar: "{{ lookup('file', inventory_dir + '/cred/server.crt') }}"

inventory_dir is resovled to '.', the playbook will try to look for cred/server.crt int the role dir , not in inventory_dir .

mpdehaan added a commit that referenced this pull request Aug 11, 2013
fix inventory.basedir is not absolute path when hostfile is startswith "./"
@mpdehaan mpdehaan merged commit 17aa0d1 into ansible:devel Aug 11, 2013
@mpdehaan
Copy link
Contributor

merged, thanks!

@ansible ansible locked and limited conversation to collaborators Apr 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants