mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix unsupported regexp parameter in assemble
This commit is contained in:
parent
05eb6aacec
commit
488aec3936
2 changed files with 8 additions and 1 deletions
|
@ -153,6 +153,7 @@ FILE_COMMON_ARGUMENTS=dict(
|
|||
backup = dict(),
|
||||
force = dict(),
|
||||
remote_src = dict(), # used by assemble
|
||||
regexp = dict(), # used by assemble
|
||||
delimiter = dict(), # used by assemble
|
||||
directory_mode = dict(), # used by copy
|
||||
)
|
||||
|
|
|
@ -22,6 +22,7 @@ import pipes
|
|||
import shutil
|
||||
import tempfile
|
||||
import base64
|
||||
import re
|
||||
from ansible import utils
|
||||
from ansible.runner.return_data import ReturnData
|
||||
|
||||
|
@ -85,6 +86,7 @@ class ActionModule(object):
|
|||
dest = options.get('dest', None)
|
||||
delimiter = options.get('delimiter', None)
|
||||
remote_src = utils.boolean(options.get('remote_src', 'yes'))
|
||||
regexp = options.get('regexp', None)
|
||||
|
||||
|
||||
if src is None or dest is None:
|
||||
|
@ -99,8 +101,12 @@ class ActionModule(object):
|
|||
# the source is local, so expand it here
|
||||
src = os.path.expanduser(src)
|
||||
|
||||
_re = None
|
||||
if regexp is not None:
|
||||
_re = re.compile(regexp)
|
||||
|
||||
# Does all work assembling the file
|
||||
path = self._assemble_from_fragments(src, delimiter)
|
||||
path = self._assemble_from_fragments(src, delimiter, _re)
|
||||
|
||||
pathmd5 = utils.md5s(path)
|
||||
remote_md5 = self.runner._remote_md5(conn, tmp, dest)
|
||||
|
|
Loading…
Reference in a new issue