debops / debops-tools

Your Debian-based data center in a box
https://debops.org/
GNU General Public License v3.0
1.07k stars 116 forks source link

wrong pathes for lookup_plugins in ansible.cfg #198

Open jankowa opened 6 years ago

jankowa commented 6 years ago

Hi all, for me after generating the ansible.conf through debops the pathes generated for several plugins are wrong.

[defaults]
filter_plugins = /home/user/debops0/ansible/filter_plugins:/home/user/.local/share/debops/debops/ansible/plugins/filter_plugins:/home/user/.local/share/debops/debops/ansible/filter_plugins:/nonexistent/filter_plugins:/usr/share/ansible/filter_plugins
connection_plugins = /home/user/debops0/ansible/connection_plugins:/home/user/.local/share/debops/debops/ansible/plugins/connection_plugins:/home/user/.local/share/debops/debops/ansible/connection_plugins:/nonexistent/connection_plugins:/usr/share/ansible/connection_plugins
roles_path = /home/user/debops0/roles:/home/user/debops0/ansible/roles:/home/user/.local/share/debops/debops/ansible/roles:/nonexistent/../roles:/nonexistent/roles:/etc/ansible/roles
display_skipped_hosts = False
retry_files_enabled = False
library = /home/user/debops0/ansible/library:/home/user/.local/share/debops/debops/ansible/plugins/library:/home/user/.local/share/debops/debops/ansible/library:/nonexistent/library:/usr/share/ansible/library
vars_plugins = /home/user/debops0/ansible/vars_plugins:/home/user/.local/share/debops/debops/ansible/plugins/vars_plugins:/home/user/.local/share/debops/debops/ansible/vars_plugins:/nonexistent/vars_plugins:/usr/share/ansible/vars_plugins
ansible_managed = This file is managed remotely, all changes will be lost
inventory = /home/user/debops0/ansible/inventory
action_plugins = /home/user/debops0/ansible/action_plugins:/home/user/.local/share/debops/debops/ansible/plugins/action_plugins:/home/user/.local/share/debops/debops/ansible/action_plugins:/nonexistent/action_plugins:/usr/share/ansible/action_plugins
callback_plugins = /home/user/debops0/ansible/callback_plugins:/home/user/.local/share/debops/debops/ansible/plugins/callback_plugins:/home/user/.local/share/debops/debops/ansible/callback_plugins:/nonexistent/callback_plugins:/usr/share/ansible/callback_plugins
lookup_plugins = /home/user/debops0/ansible/lookup_plugins:/home/user/.local/share/debops/debops/ansible/plugins/lookup_plugins:/home/user/.local/share/debops/debops/ansible/lookup_plugins:/nonexistent/lookup_plugins:/usr/share/ansible/lookup_plugins

But the lookup plugin e.g. are in:

/home/user/.local/share/debops/debops/ansible/playbooks/playbooks/lookup_plugins

What's going wrong?

drybjed commented 6 years ago

Hello,

It seems that you updated that debops scripts from PyPI to v0.6.0 version? I recently merged the DebOps playbooks, roles and scripts into a single repository, debops/debops. To make use of that repository easier, I updated the debops-tools repository and the application on PyPI to install and use the new "monorepo" style repository. The old version of the playbooks and roles still should be supported, but it hasn't been detected for some reason.

Try removing everything from the ~/.local/share/debops/ directory and running the debops-update commaand; it should install the new repository in ~/.local/share/debops/debops/. After that, the debops script should generate the correct paths. Let me know if that works.

For future reference, you should create any new issues and pull requests against the new repository. In the future I plan to update the separate repositories by exporting parts of the code from the "monorepo", but this will be strictly one way, to allow installation of the roles via Ansible Galaxy as it's possible currently. The main development will be done in the monorepo.

jankowa commented 6 years ago

Hi, thanks for answer.

Unfortunately updating debops with debops-update (and before cleaning .local/share/debops) doesn't solve the issue for me. Its also the same on a fresh new pip install.

The wrong path is not the double debops/debops. But my lookup_plugins are under

.local/share/debops/debops/ansible/playbooks/playbooks/lookup_plugins

but the generated path is

.local/share/debops/debops/ansible/plugins/lookup_plugins:.local/share/debops/debops/ansible/lookup_plugins

drybjed commented 6 years ago

OK, I see the issue now. I thought that Ansible would be clever enough to include the *_plugins/ in the playbook directory in addition to the directories specified in the configuration, but I was mistaken. I'll release the new version of the debops-tools ASAP to fix that issue. Thanks for he bug report.

drybjed commented 6 years ago

This issue should be solved by https://github.com/debops/debops/pull/18. I released the v0.6.1 version of debops-tools on PyPI, @jankowa can you upgrade your installation and check if everything works as expected?

jankowa commented 6 years ago

Perfectly. It's working now for me. Thanks a lot for for quick fix.