mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 05:40:23 -07:00
Fixed modules using Popen (#24558)
* Fixed modules using Popen * Reverted change in mysql_db, Popen is required to pipe compressed archives to mysql
This commit is contained in:
parent
495a809f46
commit
921bc0599b
3 changed files with 8 additions and 21 deletions
|
@ -104,12 +104,10 @@ RETURN = '''
|
|||
...
|
||||
'''
|
||||
|
||||
from subprocess import Popen, PIPE
|
||||
from ansible.module_utils.basic import AnsibleModule, BOOLEANS_TRUE
|
||||
from ansible.module_utils.pycompat24 import get_exception
|
||||
|
||||
|
||||
|
||||
class GConf2Preference(object):
|
||||
def __init__(self, ansible, key, value_type, value,
|
||||
direct=False, config_source=""):
|
||||
|
@ -158,11 +156,7 @@ class GConf2Preference(object):
|
|||
cmd += "--unset {0}".format(self.key)
|
||||
|
||||
# Start external command
|
||||
process = Popen([cmd], stdout=PIPE, stderr=PIPE, shell=True)
|
||||
|
||||
# In either case, we will capture the output
|
||||
out = process.stdout.read()
|
||||
err = process.stderr.read()
|
||||
rc, out, err = self.ansible.run_command(cmd, use_unsafe_shell=True)
|
||||
|
||||
if len(err) > 0:
|
||||
if fail_onerr:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue