ansible.plugins package

ansible.plugins.get_all_plugin_loaders()[source]
class ansible.plugins.PluginLoader(class_name, package, config, subdir, aliases={}, required_base_class=None)[source]

Bases: object

PluginLoader loads plugins from the configured plugin directories.

It searches for plugins by iterating through the combined list of play basedirs, configured paths, and the python path. The first match is used.

__setstate__(data)[source]

Deserializer.

__getstate__()[source]

Serializer.

print_paths()[source]

Returns a string suitable for printing of the search path

add_directory(directory, with_subdir=False)[source]

Adds an additional directory to the search path

find_plugin(name, mod_type='')[source]

Find a plugin named name

has_plugin(name)[source]

Checks if a plugin named name exists

__contains__(name)

Checks if a plugin named name exists

get(name, *args, **kwargs)[source]

instantiates a plugin of the given name using arguments

all(*args, **kwargs)[source]

instantiates all plugins with the same arguments

Subpackages