Improve language.

This commit is contained in:
Felix Fontein
2024-12-28 14:30:49 +01:00
parent 04c97728dc
commit f69536ef3b
34 changed files with 89 additions and 89 deletions
+9 -9
View File
@@ -86,7 +86,7 @@ options:
# - key: extra_env
# section: docker_connection
# ansible-core's config manager does NOT support converting JSON strings (or other things) to dictionaries,
# it only accepts actual dictionaries (which don't happen to come from env and ini vars). So there's no way
# it only accepts actual dictionaries (which do not happen to come from env and ini vars). So there's no way
# to actually provide this parameter from env and ini sources... :-(
vars:
- name: ansible_docker_extra_env
@@ -153,7 +153,7 @@ class Connection(ConnectionBase):
# Note: docker supports running as non-root in some configurations.
# (For instance, setting the UNIX socket file to be readable and
# writable by a specific UNIX group and then putting users into that
# group). Therefore we don't check that the user is root when using
# group). Therefore we do not check that the user is root when using
# this connection. But if the user is getting a permission denied
# error it probably means that docker on their system is only
# configured to be connected to by root and they are not running as
@@ -333,9 +333,9 @@ class Connection(ConnectionBase):
.format(self.docker_version, self.actual_user or u'?'))
return actual_user
elif self._display.verbosity > 2:
# Since we're not setting the actual_user, look it up so we have it for logging later
# Since we are not setting the actual_user, look it up so we have it for logging later
# Only do this if display verbosity is high enough that we'll need the value
# This saves overhead from calling into docker when we don't need to.
# This saves overhead from calling into docker when we do not need to.
return self._get_docker_remote_user()
else:
return None
@@ -418,11 +418,11 @@ class Connection(ConnectionBase):
''' Make sure that we put files into a standard path
If a path is relative, then we need to choose where to put it.
ssh chooses $HOME but we aren't guaranteed that a home dir will
exist in any given chroot. So for now we're choosing "/" instead.
ssh chooses $HOME but we are not guaranteed that a home dir will
exist in any given chroot. So for now we are choosing "/" instead.
This also happens to be the former default.
Can revisit using $HOME instead if it's a problem
Can revisit using $HOME instead if it is a problem
'''
if getattr(self._shell, "_IS_WINDOWS", False):
import ntpath
@@ -444,7 +444,7 @@ class Connection(ConnectionBase):
"file or module does not exist: %s" % to_native(in_path))
out_path = shlex_quote(out_path)
# Older docker doesn't have native support for copying files into
# Older docker does not have native support for copying files into
# running containers, so we use docker exec to implement this
# Although docker version 1.8 and later provide support, the
# owner and group of the files are always set to root
@@ -490,7 +490,7 @@ class Connection(ConnectionBase):
actual_out_path = os.path.join(out_dir, os.path.basename(in_path))
if p.returncode != 0:
# Older docker doesn't have native support for fetching files command `cp`
# Older docker does not have native support for fetching files command `cp`
# If `cp` fails, try to use `dd` instead
args = self._build_exec_cmd([self._play_context.executable, "-c", "dd if=%s bs=%s" % (in_path, BUFSIZE)])
args = [to_bytes(i, errors='surrogate_or_strict') for i in args]
+6 -6
View File
@@ -79,7 +79,7 @@ options:
# - key: extra_env
# section: docker_connection
# ansible-core's config manager does NOT support converting JSON strings (or other things) to dictionaries,
# it only accepts actual dictionaries (which don't happen to come from env and ini vars). So there's no way
# it only accepts actual dictionaries (which do not happen to come from env and ini vars). So there's no way
# to actually provide this parameter from env and ini sources... :-(
vars:
- name: ansible_docker_extra_env
@@ -205,9 +205,9 @@ class Connection(ConnectionBase):
self._connected = True
if self.actual_user is None and display.verbosity > 2:
# Since we're not setting the actual_user, look it up so we have it for logging later
# Since we are not setting the actual_user, look it up so we have it for logging later
# Only do this if display verbosity is high enough that we'll need the value
# This saves overhead from calling into docker when we don't need to
# This saves overhead from calling into docker when we do not need to
display.vvv(u"Trying to determine actual user")
result = self._call_client(lambda: self.client.get_json('/containers/{0}/json', self.get_option('remote_addr')))
if result.get('Config'):
@@ -319,11 +319,11 @@ class Connection(ConnectionBase):
''' Make sure that we put files into a standard path
If a path is relative, then we need to choose where to put it.
ssh chooses $HOME but we aren't guaranteed that a home dir will
exist in any given chroot. So for now we're choosing "/" instead.
ssh chooses $HOME but we are not guaranteed that a home dir will
exist in any given chroot. So for now we are choosing "/" instead.
This also happens to be the former default.
Can revisit using $HOME instead if it's a problem
Can revisit using $HOME instead if it is a problem
'''
if getattr(self._shell, "_IS_WINDOWS", False):
import ntpath