ansible/lib
Serge van Ginderachter 173586b871 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.py
2013-08-12 22:17:53 +02:00
..
ansible Ensure plugin_loader.all() only loads one instance 2013-08-12 22:17:53 +02:00