From 27e3cd6e05c7c6d7e58aaa5f79578d9308e02d14 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Mon, 25 Jun 2018 12:41:46 -0400 Subject: [PATCH] options should be settable multiple times --- lib/ansible/plugins/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/ansible/plugins/__init__.py b/lib/ansible/plugins/__init__.py index dc629effb7..92e99c39e4 100644 --- a/lib/ansible/plugins/__init__.py +++ b/lib/ansible/plugins/__init__.py @@ -70,11 +70,10 @@ class AnsiblePlugin(with_metaclass(ABCMeta, object)): :arg var_options: Dict with either 'conneciton variables' :arg direct: Dict with 'direct assignment' ''' + self._options = C.config.get_plugin_options(get_plugin_class(self), self._load_name, keys=task_keys, variables=var_options, direct=direct) - if not self._options: - # load config options if we have not done so already, if vars provided we should be mostly done - self._options = C.config.get_plugin_options(get_plugin_class(self), self._load_name, keys=task_keys, variables=var_options, direct=direct) # allow extras/wildcards from vars that are not directly consumed in configuration + # this is needed to support things like winrm that can have extended protocol options we don't direclty handle if self.allow_extras and var_options and '_extras' in var_options: self.set_option('_extras', var_options['_extras'])