diff --git a/changelogs/fragments/network_cli_enable_fix.yml b/changelogs/fragments/network_cli_enable_fix.yml new file mode 100644 index 00000000000..c0a6fd466b8 --- /dev/null +++ b/changelogs/fragments/network_cli_enable_fix.yml @@ -0,0 +1,2 @@ +bugfixes: +- Fix for network_cli become method to be compatible with collections diff --git a/lib/ansible/plugins/connection/network_cli.py b/lib/ansible/plugins/connection/network_cli.py index 88ce1a1aa7f..1a0d38a4d04 100644 --- a/lib/ansible/plugins/connection/network_cli.py +++ b/lib/ansible/plugins/connection/network_cli.py @@ -451,7 +451,7 @@ class Connection(NetworkConnectionBase): self.queue_message('vvvv', 'firing event: on_open_shell()') self._terminal.on_open_shell() - if self._play_context.become and self._play_context.become_method == 'enable': + if self._play_context.become: self.queue_message('vvvv', 'firing event: on_become') auth_pass = self._play_context.become_pass self._terminal.on_become(passwd=auth_pass)