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
+1 -1
View File
@@ -550,7 +550,7 @@ class ServicesManager(BaseComposeManager):
return True
def cmd_stop(self):
# Since 'docker compose stop' **always** claims its stopping containers, even if they are already
# Since 'docker compose stop' **always** claims it is stopping containers, even if they are already
# stopped, we have to do this a bit more complicated.
result = dict()
+2 -2
View File
@@ -298,7 +298,7 @@ class ConfigManager(DockerBaseClass):
def create_config(self):
''' Create a new config '''
config_id = None
# We can't see the data after creation, so adding a label we can use for idempotency check
# We ca not see the data after creation, so adding a label we can use for idempotency check
labels = {
'ansible_key': self.data_key
}
@@ -350,7 +350,7 @@ class ConfigManager(DockerBaseClass):
if not self.force:
self.client.module.warn("'ansible_key' label not found. Config will not be changed unless the force parameter is set to 'true'")
# template_driver has changed if it was set in the previous config
# and now it differs, or if it wasn't set but now it is.
# and now it differs, or if it was not set but now it is.
if attrs.get('Templating', {}).get('Name'):
if attrs['Templating']['Name'] != self.template_driver:
template_driver_changed = True
@@ -371,7 +371,7 @@ def is_binary(content):
if b'\x00' in content:
return True
# TODO: better detection
# (ansible-core also just checks for 0x00, and even just sticks to the first 8k, so this isn't too bad...)
# (ansible-core also just checks for 0x00, and even just sticks to the first 8k, so this is not too bad...)
return False
@@ -450,7 +450,7 @@ def is_file_idempotent(client, container, managed_path, container_path, follow_l
diff['after_header'] = managed_path
diff['after'] = to_text(content)
# When forcing and we're not following links in the container, go!
# When forcing and we are not following links in the container, go!
if force and not follow_links:
retrieve_diff(client, container, container_path, follow_links, diff, max_file_size_for_diff)
return container_path, mode, False
@@ -467,7 +467,7 @@ def is_file_idempotent(client, container, managed_path, container_path, follow_l
if follow_links:
container_path = real_container_path
# If the file wasn't found, continue
# If the file was not found, continue
if regular_stat is None:
if diff is not None:
diff['before_header'] = container_path
@@ -617,7 +617,7 @@ def is_content_idempotent(client, container, content, container_path, follow_lin
diff['after_header'] = 'dynamically generated'
diff['after'] = to_text(content)
# When forcing and we're not following links in the container, go!
# When forcing and we are not following links in the container, go!
if force and not follow_links:
retrieve_diff(client, container, container_path, follow_links, diff, max_file_size_for_diff)
return container_path, mode, False
@@ -634,7 +634,7 @@ def is_content_idempotent(client, container, content, container_path, follow_lin
if follow_links:
container_path = real_container_path
# If the file wasn't found, continue
# If the file was not found, continue
if regular_stat is None:
if diff is not None:
diff['before_header'] = container_path
+3 -3
View File
@@ -587,7 +587,7 @@ class ImageManager(DockerBaseClass):
try:
self.client.delete_json('/images/{0}', name, params={'force': self.force_absent})
except NotFound:
# If the image vanished while we were trying to remove it, don't fail
# If the image vanished while we were trying to remove it, do not fail
pass
except Exception as exc:
self.fail("Error removing image %s - %s" % (name, to_native(exc)))
@@ -758,7 +758,7 @@ class ImageManager(DockerBaseClass):
:param name: name of the image. required.
:param tag: image tag.
:param repository: path to the repository. required.
:param push: bool. push the image once it's tagged.
:param push: bool. push the image once it is tagged.
:return: None
'''
repo, repo_tag = parse_repository_tag(repository)
@@ -780,7 +780,7 @@ class ImageManager(DockerBaseClass):
if not self.check_mode:
try:
# Finding the image does not always work, especially running a localhost registry. In those
# cases, if we don't set force=True, it errors.
# cases, if we do not set force=True, it errors.
params = {
'tag': repo_tag,
'repo': repo,
+1 -1
View File
@@ -190,7 +190,7 @@ class ImageRemover(DockerBaseClass):
try:
res = self.client.delete_json('/images/{0}', name, params={'force': self.force, 'noprune': not self.prune})
except NotFound:
# If the image vanished while we were trying to remove it, don't fail
# If the image vanished while we were trying to remove it, do not fail
res = []
except Exception as exc:
self.fail("Error removing image %s - %s" % (name, to_native(exc)))
+1 -1
View File
@@ -320,7 +320,7 @@ class LoginManager(DockerBaseClass):
# If user is already logged in, then response contains password for user
if 'password' in response:
# This returns correct password if user is logged in and wrong password is given.
# So if it returns another password as we passed, and the user didn't request to
# So if it returns another password as we passed, and the user did not request to
# reauthorize, still do it.
if not self.reauthorize and response['password'] != self.password:
try:
+1 -1
View File
@@ -289,7 +289,7 @@ class SecretManager(DockerBaseClass):
def create_secret(self):
''' Create a new secret '''
secret_id = None
# We can't see the data after creation, so adding a label we can use for idempotency check
# We cannot see the data after creation, so adding a label we can use for idempotency check
labels = {
'ansible_key': self.data_key
}
+4 -4
View File
@@ -38,13 +38,13 @@ options:
the port number from the listen address is used.
- If O(advertise_addr) is not specified, it will be automatically
detected when possible.
- Only used when swarm is initialised or joined. Because of this it's not
- Only used when swarm is initialised or joined. Because of this it is not
considered for idempotency checking.
type: str
default_addr_pool:
description:
- Default address pool in CIDR format.
- Only used when swarm is initialised. Because of this it's not considered
- Only used when swarm is initialised. Because of this it is not considered
for idempotency checking.
- Requires API version >= 1.39.
type: list
@@ -52,7 +52,7 @@ options:
subnet_size:
description:
- Default address pool subnet mask length.
- Only used when swarm is initialised. Because of this it's not considered
- Only used when swarm is initialised. Because of this it is not considered
for idempotency checking.
- Requires API version >= 1.39.
type: int
@@ -64,7 +64,7 @@ options:
like V(eth0:4567).
- If the port number is omitted, the default swarm listening port
is used.
- Only used when swarm is initialised or joined. Because of this it's not
- Only used when swarm is initialised or joined. Because of this it is not
considered for idempotency checking.
type: str
default: 0.0.0.0:2377