Revert "Fix net_put module text file issue (#66065)" (#66328)

This PR didn't properly run testing for network jobs. As a result it has
broken jobs for ios and junos.

This reverts commit fa66813696.
This commit is contained in:
Paul Belanger 2020-01-09 21:51:59 -05:00 committed by GitHub
parent 7ed00a1560
commit 7a7f70612a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 7 deletions

View file

@ -1,2 +0,0 @@
bugfixes:
- Fix net_put module to handle text based files (https://github.com/ansible/ansible/issues/66059)

View file

@ -25,14 +25,14 @@ import hashlib
from ansible.errors import AnsibleError from ansible.errors import AnsibleError
from ansible.module_utils._text import to_text, to_bytes from ansible.module_utils._text import to_text, to_bytes
from ansible.module_utils.connection import Connection, ConnectionError from ansible.module_utils.connection import Connection, ConnectionError
from ansible.plugins.action.network import ActionModule as ActionNetworkModule from ansible.plugins.action import ActionBase
from ansible.module_utils.six.moves.urllib.parse import urlsplit from ansible.module_utils.six.moves.urllib.parse import urlsplit
from ansible.utils.display import Display from ansible.utils.display import Display
display = Display() display = Display()
class ActionModule(ActionNetworkModule): class ActionModule(ActionBase):
def run(self, tmp=None, task_vars=None): def run(self, tmp=None, task_vars=None):
socket_path = None socket_path = None

View file

@ -24,14 +24,14 @@ import hashlib
from ansible.errors import AnsibleError from ansible.errors import AnsibleError
from ansible.module_utils._text import to_text, to_bytes from ansible.module_utils._text import to_text, to_bytes
from ansible.module_utils.connection import Connection, ConnectionError from ansible.module_utils.connection import Connection, ConnectionError
from ansible.plugins.action.network import ActionModule as ActionNetworkModule from ansible.plugins.action import ActionBase
from ansible.module_utils.six.moves.urllib.parse import urlsplit from ansible.module_utils.six.moves.urllib.parse import urlsplit
from ansible.utils.display import Display from ansible.utils.display import Display
display = Display() display = Display()
class ActionModule(ActionNetworkModule): class ActionModule(ActionBase):
def run(self, tmp=None, task_vars=None): def run(self, tmp=None, task_vars=None):
socket_path = None socket_path = None
@ -69,7 +69,7 @@ class ActionModule(ActionNetworkModule):
if mode == 'text': if mode == 'text':
try: try:
self._handle_src_option(convert_data=False) self._handle_template(convert_data=False)
except ValueError as exc: except ValueError as exc:
return dict(failed=True, msg=to_text(exc)) return dict(failed=True, msg=to_text(exc))