1
0
Fork 0
mirror of https://github.com/containers/ansible-podman-collections.git synced 2026-02-04 07:11:49 +00:00

Run pause=false w/o message condition

This commit is contained in:
Sagi Shnaidman 2020-05-04 21:14:06 +03:00
parent b51f4996aa
commit 2d4018d227

View file

@ -166,15 +166,14 @@ class Connection(ConnectionBase):
"cp", [in_path, self._container_id + ":" + out_path], use_container_id=False
)
if rc != 0:
if 'cannot copy into running rootless container with pause set' in to_native(stderr):
rc, stdout, stderr = self._podman(
"cp", ["--pause=false", in_path, self._container_id + ":" + out_path], use_container_id=False
rc, stdout, stderr = self._podman(
"cp", ["--pause=false", in_path, self._container_id + ":" + out_path], use_container_id=False
)
if rc != 0:
raise AnsibleError(
"Failed to copy file from %s to %s in container %s\n%s" % (
in_path, out_path, self._container_id, stderr)
)
if rc != 0:
raise AnsibleError(
"Failed to copy file from %s to %s in container %s\n%s" % (
in_path, out_path, self._container_id, stderr)
)
else:
real_out_path = self._mount_point + to_bytes(out_path, errors='surrogate_or_strict')
shutil.copyfile(