New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vos_config collection fix using FQCN #60446
Conversation
Build succeeded (third-party-check pipeline).
|
lib/ansible/plugins/action/vyos.py
Outdated
@@ -38,7 +38,7 @@ class ActionModule(ActionNetworkModule): | |||
def run(self, tmp=None, task_vars=None): | |||
del tmp # tmp no longer has any effect | |||
|
|||
self._config_module = True if self._task.action == 'vyos_config' else False | |||
self._config_module = True if 'vyos_config' in self._task.action else False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather see something like
self._config_module = True if 'vyos_config' in self._task.action else False | |
module_name = self._task.action.split('.')[-1] | |
self._config_module = True if module_name == 'vyos_config' else False |
So that we're checking the whole module name. Otherwise if someone has a custom module named, e.g. vyos_configuration
, unexpected things might happen.
This deals with hardcoded vos_config in our vyos action plugin. Needed for when we move to collections. Signed-off-by: Paul Belanger <pabelanger@redhat.com>
Pull-request updated, HEAD is now f2660af |
cb0849f
to
f2660af
Compare
Build succeeded (third-party-check pipeline).
|
This deals with hardcoded vos_config in our vyos action plugin. Needed for when we move to collections. Signed-off-by: Paul Belanger <pabelanger@redhat.com>
SUMMARY
Do not merge, testing collections
ISSUE TYPE
COMPONENT NAME
ADDITIONAL INFORMATION