mirror of https://github.com/ansible/ansible.git
Ensure plugin_loader.all() only loads one instance
by ensuring all basedirs, plugin paths and extra paths are handled as absolute paths and are checked to not add any doubles. This fixes the corner case where e.g. the user has an additional plugin path configured to a dir relative to his playbooks or inventory location, which also matches the _plugin subdir relative to one of the basedirs in the play. For most plugins this doesn't show as an obvious issue except for callback_plugins, which might fire more than once. Other plugins (inventory and template plugins) might unnecessarily be ran twice. e.g. ansible.cfg has callback_plugins = ./plays/callback_plugins and plays/ contains a playbook file: . ├── ansible.cfg ├── inventory └── plays ├── callback_plugins │ └── timestamp.py └── site.yml modified: lib/ansible/utils/plugins.pypull/3828/head
parent
3e32654f9d
commit
173586b871
Loading…
Reference in New Issue