Fix UnboundLocalError on net_put (#71086)

This commit is contained in:
Nathaniel Case
2020-08-07 16:38:18 -04:00
committed by GitHub
parent e859a2b4e5
commit f8e4c103e9
2 changed files with 5 additions and 0 deletions

View File

@ -0,0 +1,4 @@
---
bugfixes:
- net_put - Fixed UnboundLocalError when there is no change
This is a backport from U(https://github.com/ansible-collections/ansible.netcommon/pull/6)

View File

@ -35,6 +35,7 @@ display = Display()
class ActionModule(ActionBase):
def run(self, tmp=None, task_vars=None):
changed = False
socket_path = None
network_os = self._get_network_os(task_vars).split('.')[-1]
persistent_connection = self._play_context.connection.split('.')[-1]