diff --git a/changelogs/fragments/135-docker_plugin-config.yml b/changelogs/fragments/135-docker_plugin-config.yml new file mode 100644 index 00000000..a840e9f0 --- /dev/null +++ b/changelogs/fragments/135-docker_plugin-config.yml @@ -0,0 +1,2 @@ +bugfixes: +- "docker_plugin - also configure plugin after installing (https://github.com/ansible-collections/community.docker/issues/118, https://github.com/ansible-collections/community.docker/pull/135)." diff --git a/plugins/modules/docker_plugin.py b/plugins/modules/docker_plugin.py index c08bb16c..bf9c53ec 100644 --- a/plugins/modules/docker_plugin.py +++ b/plugins/modules/docker_plugin.py @@ -226,6 +226,8 @@ class DockerPluginManager(object): if not self.check_mode: try: self.existing_plugin = self.dclient.plugins.install(self.parameters.plugin_name, None) + if self.parameters.plugin_options: + self.existing_plugin.configure(prepare_options(self.parameters.plugin_options)) except APIError as e: self.client.fail(to_native(e))