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

playbook管理界面,执行playbook的时候只能获取到定义到yaml文件中的主机名,无法获取到inventory主机组中的主机 #63

Closed
lculiuyanlong opened this issue Mar 6, 2020 · 1 comment

Comments

@lculiuyanlong
Copy link

playbook管理界面,执行playbook的时候只能获取到定义到yaml文件中的主机名,无法获取到inventory主机组中的主机,
看ansible源代码中
pb = Playbook.load(playbook_path, variable_manager=self._variable_manager, loader=self._loader)

FIXME: move out of inventory self._inventory.set_playbook_basedir(os.path.realpath(os.path.dirname(playbook_path)))

不知道self._inventory的值怎么传递进去???

@pythonzm
Copy link
Owner

我没太理解,一个playbook,不就是在指定主机上运行任务么?为啥要获取其他主机信息?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants