Fix UnboundLocalError on net_put (#71086)

pull/71166/head
Nathaniel Case 6 years ago committed by GitHub
parent e859a2b4e5
commit f8e4c103e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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)

@ -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]

Loading…
Cancel
Save