Docs: fix its vs. it's (#9442)
* Fix its vs. it's. * Improvements from review. Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> * Improve formulations. Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --------- Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>pull/9452/head
parent
2f82bd8ece
commit
ec585392e5
|
@ -15,7 +15,7 @@ DOCUMENTATION = '''
|
|||
become_user:
|
||||
description:
|
||||
- User you 'become' to execute the task.
|
||||
- This plugin ignores this setting as pfexec uses it's own C(exec_attr) to figure this out,
|
||||
- This plugin ignores this setting as pfexec uses its own C(exec_attr) to figure this out,
|
||||
but it is supplied here for Ansible to make decisions needed for the task execution, like file permissions.
|
||||
type: string
|
||||
default: root
|
||||
|
|
|
@ -243,7 +243,7 @@ class CallbackModule(CallbackModule_default):
|
|||
|
||||
def _handle_exceptions(self, result):
|
||||
if 'exception' in result:
|
||||
# Remove the exception from the result so it's not shown every time
|
||||
# Remove the exception from the result so it is not shown every time
|
||||
del result['exception']
|
||||
|
||||
if self._display.verbosity == 1:
|
||||
|
|
|
@ -126,7 +126,7 @@ class Connection(ConnectionBase):
|
|||
# Want to check for a usable bourne shell inside the chroot.
|
||||
# is_executable() == True is sufficient. For symlinks it
|
||||
# gets really complicated really fast. So we punt on finding that
|
||||
# out. As long as it's a symlink we assume that it will work
|
||||
# out. As long as it is a symlink we assume that it will work
|
||||
if not (is_executable(chrootsh) or (os.path.lexists(chrootsh) and os.path.islink(chrootsh))):
|
||||
raise AnsibleError(f"{self.chroot} does not look like a chrootable dir (/bin/sh missing)")
|
||||
|
||||
|
@ -186,7 +186,7 @@ class Connection(ConnectionBase):
|
|||
exist in any given chroot. So for now we're 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 not remote_path.startswith(os.path.sep):
|
||||
remote_path = os.path.join(os.path.sep, remote_path)
|
||||
|
|
|
@ -144,7 +144,7 @@ class Connection(ConnectionBase):
|
|||
exist in any given chroot. So for now we're 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 not remote_path.startswith(os.path.sep):
|
||||
remote_path = os.path.join(os.path.sep, remote_path)
|
||||
|
|
|
@ -140,7 +140,7 @@ class Connection(ConnectionBase):
|
|||
exist in any given chroot. So for now we're 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 not remote_path.startswith(os.path.sep):
|
||||
remote_path = os.path.join(os.path.sep, remote_path)
|
||||
|
|
|
@ -20,7 +20,7 @@ DOCUMENTATION = '''
|
|||
- inventory_cache
|
||||
options:
|
||||
plugin:
|
||||
description: The name of this plugin, it should always be set to V(community.general.cobbler) for this plugin to recognize it as it's own.
|
||||
description: The name of this plugin, it should always be set to V(community.general.cobbler) for this plugin to recognize it as its own.
|
||||
type: string
|
||||
required: true
|
||||
choices: [ 'cobbler', 'community.general.cobbler' ]
|
||||
|
|
|
@ -22,7 +22,7 @@ DOCUMENTATION = '''
|
|||
- Uses a YAML configuration file gitlab_runners.[yml|yaml].
|
||||
options:
|
||||
plugin:
|
||||
description: The name of this plugin, it should always be set to 'gitlab_runners' for this plugin to recognize it as it's own.
|
||||
description: The name of this plugin, it should always be set to 'gitlab_runners' for this plugin to recognize it as its own.
|
||||
type: str
|
||||
required: true
|
||||
choices:
|
||||
|
|
|
@ -25,7 +25,7 @@ DOCUMENTATION = '''
|
|||
- inventory_cache
|
||||
options:
|
||||
plugin:
|
||||
description: The name of this plugin, it should always be set to V(community.general.proxmox) for this plugin to recognize it as it's own.
|
||||
description: The name of this plugin, it should always be set to V(community.general.proxmox) for this plugin to recognize it as its own.
|
||||
required: true
|
||||
choices: ['community.general.proxmox']
|
||||
type: str
|
||||
|
@ -403,7 +403,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
|||
if "error" in ifaces:
|
||||
if "class" in ifaces["error"]:
|
||||
# This happens on Windows, even though qemu agent is running, the IP address
|
||||
# cannot be fetched, as it's unsupported, also a command disabled can happen.
|
||||
# cannot be fetched, as it is unsupported, also a command disabled can happen.
|
||||
errorClass = ifaces["error"]["class"]
|
||||
if errorClass in ["Unsupported"]:
|
||||
self.display.v("Retrieving network interfaces from guest agents on windows with older qemu-guest-agents is not supported")
|
||||
|
|
|
@ -257,7 +257,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
|||
def _handle_vboxmanage_group_string(self, vboxmanage_group, current_host, cacheable_results):
|
||||
'''Handles parsing the VM's Group assignment from VBoxManage according to VirtualBox documentation.'''
|
||||
# Per the VirtualBox documentation, a VM can be part of many groups,
|
||||
# and it's possible to have nested groups.
|
||||
# and it is possible to have nested groups.
|
||||
# Many groups are separated by commas ",", and nested groups use
|
||||
# slash "/".
|
||||
# https://www.virtualbox.org/manual/UserManual.html#gui-vmgroups
|
||||
|
|
|
@ -78,7 +78,7 @@ class LookupModule(LookupBase):
|
|||
term = term2
|
||||
|
||||
if isinstance(term, list):
|
||||
# if it's a list, check recursively for items that are a list
|
||||
# if it is a list, check recursively for items that are a list
|
||||
term = self._do_flatten(term, variables)
|
||||
ret.extend(term)
|
||||
else:
|
||||
|
|
|
@ -46,8 +46,8 @@ class FileLock:
|
|||
'''
|
||||
Create a lock file based on path with flock to prevent other processes
|
||||
using given path.
|
||||
Please note that currently file locking only works when it's executed by
|
||||
the same user, I.E single user scenarios
|
||||
Please note that currently file locking only works when it is executed by
|
||||
the same user, for example single user scenarios
|
||||
|
||||
:kw path: Path (file) to lock
|
||||
:kw tmpdir: Path where to place the temporary .lock file
|
||||
|
|
|
@ -1160,8 +1160,8 @@ class KeycloakAPI(object):
|
|||
# prefer an exception since this is almost certainly a programming error in the module itself.
|
||||
raise Exception("Unable to delete group - one of group ID or name must be provided.")
|
||||
|
||||
# only lookup the name if cid isn't provided.
|
||||
# in the case that both are provided, prefer the ID, since it's one
|
||||
# only lookup the name if cid is not provided.
|
||||
# in the case that both are provided, prefer the ID, since it is one
|
||||
# less lookup.
|
||||
if cid is None and name is not None:
|
||||
for clientscope in self.get_clientscopes(realm=realm):
|
||||
|
@ -1719,7 +1719,7 @@ class KeycloakAPI(object):
|
|||
raise Exception("Unable to delete group - one of group ID or name must be provided.")
|
||||
|
||||
# only lookup the name if groupid isn't provided.
|
||||
# in the case that both are provided, prefer the ID, since it's one
|
||||
# in the case that both are provided, prefer the ID, since it is one
|
||||
# less lookup.
|
||||
if groupid is None and name is not None:
|
||||
for group in self.get_groups(realm=realm):
|
||||
|
@ -2071,7 +2071,7 @@ class KeycloakAPI(object):
|
|||
|
||||
def get_authentication_flow_by_alias(self, alias, realm='master'):
|
||||
"""
|
||||
Get an authentication flow by it's alias
|
||||
Get an authentication flow by its alias
|
||||
:param alias: Alias of the authentication flow to get.
|
||||
:param realm: Realm.
|
||||
:return: Authentication flow representation.
|
||||
|
|
|
@ -61,7 +61,7 @@ def keycloak_clientsecret_module_resolve_params(module, kc):
|
|||
client_id = module.params.get('client_id')
|
||||
|
||||
# only lookup the client_id if id isn't provided.
|
||||
# in the case that both are provided, prefer the ID, since it's one
|
||||
# in the case that both are provided, prefer the ID, since it is one
|
||||
# less lookup.
|
||||
if id is None:
|
||||
# Due to the required_one_of spec, client_id is guaranteed to not be None
|
||||
|
|
|
@ -119,7 +119,7 @@ class RedfishUtils(object):
|
|||
|
||||
# Note: This is also a fallthrough for properties that are
|
||||
# arrays of objects. Some services erroneously omit properties
|
||||
# within arrays of objects when not configured, and it's
|
||||
# within arrays of objects when not configured, and it is
|
||||
# expecting the client to provide them anyway.
|
||||
|
||||
if req_pyld[prop] != cur_pyld[prop]:
|
||||
|
@ -1177,7 +1177,7 @@ class RedfishUtils(object):
|
|||
return response
|
||||
|
||||
# If requested to wait for the service to be available again, block
|
||||
# until it's ready
|
||||
# until it is ready
|
||||
if wait:
|
||||
elapsed_time = 0
|
||||
start_time = time.time()
|
||||
|
@ -1190,7 +1190,7 @@ class RedfishUtils(object):
|
|||
while elapsed_time <= wait_timeout:
|
||||
status = self.check_service_availability()
|
||||
if status['available']:
|
||||
# It's available; we're done
|
||||
# It is available; we are done
|
||||
break
|
||||
time.sleep(5)
|
||||
elapsed_time = time.time() - start_time
|
||||
|
@ -1813,7 +1813,7 @@ class RedfishUtils(object):
|
|||
operation_results['status'] = data.get('TaskState', data.get('JobState'))
|
||||
operation_results['messages'] = data.get('Messages', [])
|
||||
else:
|
||||
# Error response body, which is a bit of a misnomer since it's used in successful action responses
|
||||
# Error response body, which is a bit of a misnomer since it is used in successful action responses
|
||||
operation_results['status'] = 'Completed'
|
||||
if response.status >= 400:
|
||||
operation_results['status'] = 'Exception'
|
||||
|
|
|
@ -92,7 +92,7 @@ class CapabilitiesModule(object):
|
|||
if self.module.check_mode:
|
||||
self.module.exit_json(changed=True, msg='capabilities changed')
|
||||
else:
|
||||
# remove from current cap list if it's already set (but op/flags differ)
|
||||
# remove from current cap list if it is already set (but op/flags differ)
|
||||
current = list(filter(lambda x: x[0] != self.capability_tup[0], current))
|
||||
# add new cap with correct op/flags
|
||||
current.append(self.capability_tup)
|
||||
|
|
|
@ -804,7 +804,7 @@ class ClcServer:
|
|||
@staticmethod
|
||||
def _validate_name(module):
|
||||
"""
|
||||
Validate that name is the correct length if provided, fail if it's not
|
||||
Validate that name is the correct length if provided, fail if it is not
|
||||
:param module: the module to validate
|
||||
:return: none
|
||||
"""
|
||||
|
|
|
@ -486,7 +486,7 @@ class DME2(object):
|
|||
return self.query(self.record_url, 'GET')['data']
|
||||
|
||||
def _instMap(self, type):
|
||||
# @TODO cache this call so it's executed only once per ansible execution
|
||||
# @TODO cache this call so it is executed only once per ansible execution
|
||||
map = {}
|
||||
results = {}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ description:
|
|||
- A diversion is for C(dpkg) the knowledge that only a given package (or the local administrator) is allowed to install
|
||||
a file at a given location. Other packages shipping their own version of this file will be forced to O(divert) it, that
|
||||
is to install it at another location. It allows one to keep changes in a file provided by a debian package by preventing
|
||||
its overwrite at package upgrade.
|
||||
it being overwritten on package upgrade.
|
||||
- This module manages diversions of debian packages files using the C(dpkg-divert) commandline tool. It can either create
|
||||
or remove a diversion for a given file, but also update an existing diversion to modify its O(holder) and/or its O(divert)
|
||||
location.
|
||||
|
|
|
@ -348,7 +348,7 @@ def native_python_main(this_gitlab, purge, requested_labels, state, module):
|
|||
item.pop('description_html')
|
||||
item.pop('text_color')
|
||||
item.pop('subscribed')
|
||||
# field present only when it's a project's label
|
||||
# field present only when it is a project's label
|
||||
if 'is_project_label' in item:
|
||||
item.pop('is_project_label')
|
||||
item['new_name'] = None
|
||||
|
@ -472,7 +472,7 @@ def main():
|
|||
if state == 'present':
|
||||
_existing_labels = [x.asdict()['name'] for x in this_gitlab.list_all_labels()]
|
||||
|
||||
# color is mandatory when creating label, but it's optional when changing name or updating other fields
|
||||
# color is mandatory when creating label, but it is optional when changing name or updating other fields
|
||||
if any(x['color'] is None and x['new_name'] is None and x['name'] not in _existing_labels for x in label_list):
|
||||
module.fail_json(msg='color parameter is required for new labels')
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ class Hg(object):
|
|||
if the desired changeset is already the current changeset.
|
||||
"""
|
||||
if self.revision is None or len(self.revision) < 7:
|
||||
# Assume it's a rev number, tag, or branch
|
||||
# Assume it is a rev number, tag, or branch
|
||||
return False
|
||||
(rc, out, err) = self._command(['--debug', 'id', '-i', '-R', self.dest])
|
||||
if rc != 0:
|
||||
|
|
|
@ -59,7 +59,7 @@ options:
|
|||
default: false
|
||||
shard_group_duration:
|
||||
description:
|
||||
- Determines the time range covered by a shard group. If specified it must be at least one hour. If none, it's determined
|
||||
- Determines the time range covered by a shard group. If specified it must be at least one hour. If not provided, it is determined
|
||||
by InfluxDB by the rentention policy's duration. Supports complex duration expressions with multiple units.
|
||||
type: str
|
||||
version_added: '2.0.0'
|
||||
|
|
|
@ -46,7 +46,7 @@ options:
|
|||
type: str
|
||||
description:
|
||||
- If O(option) is not presented for the O(iface) and O(state) is V(present) option will be added. If O(option) already
|
||||
exists and is not V(pre-up), V(up), V(post-up) or V(down), it's value will be updated. V(pre-up), V(up), V(post-up)
|
||||
exists and is not V(pre-up), V(up), V(post-up) or V(down), its value will be updated. V(pre-up), V(up), V(post-up)
|
||||
and V(down) options cannot be updated, only adding new options, removing existing ones or cleaning the whole option
|
||||
set are supported.
|
||||
backup:
|
||||
|
|
|
@ -268,7 +268,7 @@ def get_user_diff(client, ipa_user, module_user):
|
|||
if 'sshpubkeyfp' in ipa_user and ipa_user['sshpubkeyfp'][0][:7].upper() == 'SHA256:':
|
||||
hash_algo = 'sha256'
|
||||
module_user['sshpubkeyfp'] = [get_ssh_key_fingerprint(pubkey, hash_algo) for pubkey in module_user['ipasshpubkey']]
|
||||
# Remove the ipasshpubkey element as it is not returned from IPA but save it's value to be used later on
|
||||
# Remove the ipasshpubkey element as it is not returned from IPA but save its value to be used later on
|
||||
sshpubkey = module_user['ipasshpubkey']
|
||||
del module_user['ipasshpubkey']
|
||||
|
||||
|
|
|
@ -278,7 +278,7 @@ def _get_first_certificate_from_x509_file(module, pem_certificate_file, pem_cert
|
|||
(extract_rc, dummy, extract_stderr) = module.run_command(extract_cmd, check_rc=False)
|
||||
|
||||
if extract_rc != 0:
|
||||
# this time it's a real failure
|
||||
# this time it is a real failure
|
||||
module.fail_json(msg="Internal module failure, cannot extract certificate, error: %s" % extract_stderr,
|
||||
rc=extract_rc, cmd=extract_cmd)
|
||||
|
||||
|
|
|
@ -210,8 +210,8 @@ def get_jobs(module):
|
|||
jobs = all_jobs
|
||||
# python-jenkins includes the internal Jenkins class used for each job
|
||||
# in its return value; we strip that out because the leading underscore
|
||||
# (and the fact that it's not documented in the python-jenkins docs)
|
||||
# indicates that it's not part of the dependable public interface.
|
||||
# (and the fact that it is not documented in the python-jenkins docs)
|
||||
# indicates that it is not part of the dependable public interface.
|
||||
for job in jobs:
|
||||
if "_class" in job:
|
||||
del job["_class"]
|
||||
|
|
|
@ -61,8 +61,8 @@ options:
|
|||
description:
|
||||
- A dict of key-value pairs used in formatting the script using string.Template (see https://docs.python.org/2/library/string.html#template-strings).
|
||||
notes:
|
||||
- Since the script can do anything this does not report on changes. Knowing the script is being run it's important to set
|
||||
changed_when for the ansible output to be clear on any alterations made.
|
||||
- Since the script can do anything this does not report on changes. Knowing the script is being run it is important to set
|
||||
C(changed_when) for the ansible output to be clear on any alterations made.
|
||||
"""
|
||||
|
||||
EXAMPLES = r"""
|
||||
|
|
|
@ -246,7 +246,7 @@ def create_or_update_executions(kc, config, realm='master'):
|
|||
"""
|
||||
Create or update executions for an authentication flow.
|
||||
:param kc: Keycloak API access.
|
||||
:param config: Representation of the authentication flow including it's executions.
|
||||
:param config: Representation of the authentication flow including its executions.
|
||||
:param realm: Realm
|
||||
:return: tuple (changed, dict(before, after)
|
||||
WHERE
|
||||
|
|
|
@ -159,7 +159,7 @@ options:
|
|||
|
||||
rdnLDAPAttribute:
|
||||
description:
|
||||
- Name of LDAP attribute, which is used as RDN (top attribute) of typical user DN. Usually it's the same as Username LDAP attribute,
|
||||
- Name of LDAP attribute, which is used as RDN (top attribute) of typical user DN. Usually it is the same as Username LDAP attribute,
|
||||
however it is not required. For example for Active directory, it is common to use V(cn) as RDN attribute when username attribute might
|
||||
be V(sAMAccountName).
|
||||
type: str
|
||||
|
|
|
@ -424,7 +424,7 @@ def remove_null_values(data):
|
|||
# Recursively remove null values from lists
|
||||
return [remove_null_values(item) for item in data if item is not None]
|
||||
else:
|
||||
# Return the data if it's neither a dictionary nor a list
|
||||
# Return the data if it is neither a dictionary nor a list
|
||||
return data
|
||||
|
||||
|
||||
|
@ -436,7 +436,7 @@ def camel_recursive(data):
|
|||
# Apply camelCase conversion to each item in the list
|
||||
return [camel_recursive(item) for item in data]
|
||||
else:
|
||||
# Return the data as is if it's not a dict or list
|
||||
# Return the data as-is if it is not a dict or list
|
||||
return data
|
||||
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ options:
|
|||
url:
|
||||
description:
|
||||
- Set exact URL to download the plugin from.
|
||||
- For local file, prefix its absolute path with file://.
|
||||
- For local file, prefix its absolute path with C(file://).
|
||||
type: str
|
||||
timeout:
|
||||
description:
|
||||
|
|
|
@ -61,7 +61,7 @@ options:
|
|||
default: ''
|
||||
state:
|
||||
description:
|
||||
- Control if the volume group exists and it's state.
|
||||
- Control if the volume group exists and its state.
|
||||
- The states V(active) and V(inactive) implies V(present) state. Added in 7.1.0.
|
||||
- If V(active) or V(inactive), the module manages the VG's logical volumes current state. The module also handles the VG's autoactivation
|
||||
state if supported unless when creating a volume group and the autoactivation option specified in O(vg_options).
|
||||
|
|
|
@ -255,14 +255,14 @@ EXAMPLES = r"""
|
|||
ansible.builtin.debug:
|
||||
var: lvm_container_info
|
||||
|
||||
- name: Run a command in a container and ensure its in a "stopped" state.
|
||||
- name: Run a command in a container and ensure it is in a "stopped" state.
|
||||
community.general.lxc_container:
|
||||
name: test-container-started
|
||||
state: stopped
|
||||
container_command: |
|
||||
echo 'hello world.' | tee /opt/stopped
|
||||
|
||||
- name: Run a command in a container and ensure its it in a "frozen" state.
|
||||
- name: Run a command in a container and ensure it is in a "frozen" state.
|
||||
community.general.lxc_container:
|
||||
name: test-container-stopped
|
||||
state: frozen
|
||||
|
@ -681,7 +681,7 @@ class LxcContainerManagement(object):
|
|||
"""Configure an LXC container.
|
||||
|
||||
Write new configuration values to the lxc config file. This will
|
||||
stop the container if it's running write the new options and then
|
||||
stop the container if it is running write the new options and then
|
||||
restart the container upon completion.
|
||||
"""
|
||||
|
||||
|
|
|
@ -221,7 +221,7 @@ def install_ports(module, port_path, ports, variant, stdout, stderr):
|
|||
|
||||
|
||||
def activate_ports(module, port_path, ports, stdout, stderr):
|
||||
""" Activate a port if it's inactive. """
|
||||
""" Activate a port if it is inactive. """
|
||||
|
||||
activate_c = 0
|
||||
|
||||
|
@ -248,7 +248,7 @@ def activate_ports(module, port_path, ports, stdout, stderr):
|
|||
|
||||
|
||||
def deactivate_ports(module, port_path, ports, stdout, stderr):
|
||||
""" Deactivate a port if it's active. """
|
||||
""" Deactivate a port if it is active. """
|
||||
|
||||
deactivated_c = 0
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ class ManageIQAlert(object):
|
|||
self.miq_expression = alert['miq_expression']
|
||||
if 'exp' in self.miq_expression:
|
||||
# miq_expression is a field that needs a special case, because
|
||||
# it's returned surrounded by a dict named exp even though we don't
|
||||
# it is returned surrounded by a dict named exp even though we don't
|
||||
# send it with that dict.
|
||||
self.miq_expression = self.miq_expression['exp']
|
||||
|
||||
|
|
|
@ -253,7 +253,7 @@ def main():
|
|||
retvals = create_or_delete_domain(args)
|
||||
|
||||
# we would need to populate the return values with the API's response
|
||||
# in several places so it's easier to do it at the end instead.
|
||||
# in several places so it is easier to do it at the end instead.
|
||||
if not retvals['failed']:
|
||||
if args['state'] == 'present' and not module.check_mode:
|
||||
payload = dict()
|
||||
|
|
|
@ -216,7 +216,7 @@ class Monit(object):
|
|||
return running_status
|
||||
|
||||
def wait_for_monit_to_stop_pending(self, current_status=None):
|
||||
"""Fails this run if there is no status or it's pending/initializing for timeout"""
|
||||
"""Fails this run if there is no status or it is pending/initializing for timeout"""
|
||||
timeout_time = time.time() + self.timeout
|
||||
|
||||
if not current_status:
|
||||
|
|
|
@ -29,12 +29,12 @@ options:
|
|||
with O(vcn_id).
|
||||
type: str
|
||||
display_name:
|
||||
description: A user-friendly name. Does not have to be unique, and it's changeable.
|
||||
description: A user-friendly name. Does not have to be unique, and it is changeable.
|
||||
type: str
|
||||
aliases: ['name']
|
||||
dns_label:
|
||||
description: A DNS label for the VCN, used in conjunction with the VNIC's hostname and subnet's DNS label to form a fully qualified domain
|
||||
name (FQDN) for each VNIC within this subnet (for example, V(bminstance-1.subnet123.vcn1.oraclevcn.com)). Not required to be unique, but it's
|
||||
name (FQDN) for each VNIC within this subnet (for example, V(bminstance-1.subnet123.vcn1.oraclevcn.com)). Not required to be unique, but it is
|
||||
a best practice to set unique DNS labels for VCNs in your tenancy. Must be an alphanumeric string that begins with a letter. The value cannot
|
||||
be changed.
|
||||
type: str
|
||||
|
|
|
@ -90,7 +90,7 @@ options:
|
|||
description:
|
||||
- A dictionary of key/value attributes to add to new instances, or for setting C(state) of instances with these attributes.
|
||||
- Keys are case insensitive and OpenNebula automatically converts them to upper case.
|
||||
- Be aware V(NAME) is a special attribute which sets the name of the VM when it's deployed.
|
||||
- Be aware V(NAME) is a special attribute which sets the name of the VM when it is deployed.
|
||||
- C(#) character(s) can be appended to the C(NAME) and the module will automatically add indexes to the names of VMs.
|
||||
- 'For example: V(NAME: foo-###) would create VMs with names V(foo-000), V(foo-001),...'
|
||||
- When used with O(count_attributes) and O(exact_count) the module will match the base name without the index part.
|
||||
|
|
|
@ -517,7 +517,7 @@ def startstop_server(module, oneandone_conn):
|
|||
# Resolve server
|
||||
server = get_server(oneandone_conn, server_id, True)
|
||||
if server:
|
||||
# Attempt to change the server state, only if it's not already there
|
||||
# Attempt to change the server state, only if it is not already there
|
||||
# or on its way.
|
||||
try:
|
||||
if state == 'stopped' and server['status']['state'] == 'POWERED_ON':
|
||||
|
|
|
@ -119,7 +119,7 @@ EXAMPLES = r"""
|
|||
name: '*'
|
||||
state: latest
|
||||
|
||||
- name: Purge a package and it's configuration files
|
||||
- name: Purge a package and its configuration files
|
||||
community.general.openbsd_pkg:
|
||||
name: mpd
|
||||
clean: true
|
||||
|
|
|
@ -158,7 +158,7 @@ def waitForTaskDone(client, name, taskId, timeout):
|
|||
task = client.get('/ip/{0}/task/{1}'.format(quote_plus(name), taskId))
|
||||
if task['status'] == 'done':
|
||||
return True
|
||||
time.sleep(5) # Delay for 5 sec because it's long to wait completion, do not harass the API
|
||||
time.sleep(5) # Delay for 5 sec to not harass the API
|
||||
currentTimeout -= 5
|
||||
if currentTimeout < 0:
|
||||
return False
|
||||
|
|
|
@ -173,7 +173,7 @@ EXAMPLES = r"""
|
|||
plan: baremetal_0
|
||||
facility: sjc1
|
||||
|
||||
# Create the same device and wait until it is in state "active", (when it's
|
||||
# Create the same device and wait until it is in state "active", (when it is
|
||||
# ready for other API operations). Fail if the device is not "active" in
|
||||
# 10 minutes.
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ options:
|
|||
- With O(state=present), you must specify either O(hostname) or O(device_id). Subnet with given CIDR will then be assigned to the specified
|
||||
device.
|
||||
- With O(state=absent), you can specify either O(hostname) or O(device_id). The subnet will be removed from specified devices.
|
||||
- If you leave both O(hostname) and O(device_id) empty, the subnet will be removed from any device it's assigned to.
|
||||
- If you leave both O(hostname) and O(device_id) empty, the subnet will be removed from any device it is assigned to.
|
||||
choices: ['present', 'absent']
|
||||
default: 'present'
|
||||
type: str
|
||||
|
|
|
@ -224,7 +224,7 @@ def install_packages(module, state, packages, prompts):
|
|||
# Preparing prompts answer according to item type
|
||||
tmp_prompts = []
|
||||
for _item in prompts:
|
||||
# If the current item is a dict then we expect it's key to be the prompt regex and it's value to be the answer
|
||||
# If the current item is a dict then we expect its key to be the prompt regex and its value to be the answer
|
||||
# We also expect here that the dict only has ONE key and the first key will be taken
|
||||
if isinstance(_item, dict):
|
||||
key = list(_item.keys())[0]
|
||||
|
|
|
@ -50,7 +50,7 @@ options:
|
|||
type: str
|
||||
update_cache:
|
||||
description:
|
||||
- Update repository database. Can be run with other steps or on it's own.
|
||||
- Update repository database. Can be run with other steps or on its own.
|
||||
type: bool
|
||||
default: false
|
||||
upgrade:
|
||||
|
|
|
@ -55,7 +55,7 @@ options:
|
|||
choices: [absent, installed, latest, present, removed]
|
||||
update_catalog:
|
||||
description:
|
||||
- If you always want to refresh your catalog from the mirror, even when it's not stale, set this to V(true).
|
||||
- If you always want to refresh your catalog from the mirror, even when it is not stale, set this to V(true).
|
||||
type: bool
|
||||
default: false
|
||||
force:
|
||||
|
|
|
@ -534,7 +534,7 @@ class PersistentMemory(object):
|
|||
out = xmltodict.parse(goal, dict_constructor=dict)['ConfigGoalList']['ConfigGoal']
|
||||
for entry in out:
|
||||
|
||||
# Probably it's a bug of ipmctl to show the socket goal
|
||||
# Probably it is a bug of ipmctl to show the socket goal
|
||||
# which isn't specified by the -socket option.
|
||||
# Anyway, filter the noise out here:
|
||||
if skt and skt['id'] != int(entry['SocketID'], 16):
|
||||
|
|
|
@ -817,7 +817,7 @@ class ProxmoxLxcAnsible(ProxmoxAnsible):
|
|||
if new_value not in current_values:
|
||||
update_config = True
|
||||
break
|
||||
# if it's not a list (or string) just compare the current value
|
||||
# if it is not a list (or string) just compare the current value
|
||||
else:
|
||||
# some types don't match with the API, so forcing to string for comparison
|
||||
if str(value) != str(current_config[arg]):
|
||||
|
|
|
@ -1053,7 +1053,7 @@ class ProxmoxKvmAnsible(ProxmoxAnsible):
|
|||
if ('bios' not in kwargs) or ('ovmf' != kwargs['bios']):
|
||||
self.module.fail_json(msg='efidisk0 cannot be used if bios is not set to ovmf. ')
|
||||
|
||||
# Flatten efidisk0 option to a string so that it's a string which is what Proxmoxer and the API expect
|
||||
# Flatten efidisk0 option to a string so that it is a string which is what Proxmoxer and the API expect
|
||||
if 'efidisk0' in kwargs:
|
||||
efidisk0_str = ''
|
||||
# Regexp to catch underscores in keys name, to replace them after by hyphens
|
||||
|
@ -1068,7 +1068,7 @@ class ProxmoxKvmAnsible(ProxmoxAnsible):
|
|||
if 'storage' != k])
|
||||
kwargs['efidisk0'] = efidisk0_str
|
||||
|
||||
# Flatten tpmstate0 option to a string so that it's a string which is what Proxmoxer and the API expect
|
||||
# Flatten tpmstate0 option to a string so that it is a string which is what Proxmoxer and the API expect
|
||||
if 'tpmstate0' in kwargs:
|
||||
kwargs['tpmstate0'] = '{storage}:1,version=v{version}'.format(
|
||||
storage=kwargs['tpmstate0'].get('storage'),
|
||||
|
|
|
@ -275,7 +275,7 @@ def main():
|
|||
# success
|
||||
module.exit_json(rc=rc, changed=False, stdout=stdout, stderr=stderr)
|
||||
elif rc == 1:
|
||||
# rc==1 could be because it's disabled
|
||||
# rc==1 could be because it is disabled
|
||||
# rc==1 could also mean there was a compilation failure
|
||||
disabled = "administratively disabled" in stdout
|
||||
if disabled:
|
||||
|
|
|
@ -43,7 +43,7 @@ options:
|
|||
type: str
|
||||
description:
|
||||
- Sets the project which receive the ACL policy.
|
||||
- If unset, it's a system ACL policy.
|
||||
- If unset, it is a system ACL policy.
|
||||
policy:
|
||||
type: str
|
||||
description:
|
||||
|
@ -155,7 +155,7 @@ class RundeckACLManager:
|
|||
if info["status"] == 201:
|
||||
self.module.exit_json(changed=True, before={}, after=self.get_acl())
|
||||
elif info["status"] == 400:
|
||||
self.module.fail_json(msg="Unable to validate acl %s. Please ensure it's a valid ACL" %
|
||||
self.module.fail_json(msg="Unable to validate acl %s. Please ensure it is a valid ACL" %
|
||||
self.module.params["name"])
|
||||
elif info["status"] == 409:
|
||||
self.module.fail_json(msg="ACL %s already exists" % self.module.params["name"])
|
||||
|
@ -179,7 +179,7 @@ class RundeckACLManager:
|
|||
if info["status"] == 200:
|
||||
self.module.exit_json(changed=True, before=facts, after=self.get_acl())
|
||||
elif info["status"] == 400:
|
||||
self.module.fail_json(msg="Unable to validate acl %s. Please ensure it's a valid ACL" %
|
||||
self.module.fail_json(msg="Unable to validate acl %s. Please ensure it is a valid ACL" %
|
||||
self.module.params["name"])
|
||||
elif info["status"] == 404:
|
||||
self.module.fail_json(msg="ACL %s doesn't exists. Cannot update." % self.module.params["name"])
|
||||
|
|
|
@ -209,7 +209,7 @@ def main():
|
|||
module.fail_json(
|
||||
msg=msg.format(path=path, exception=str(e)))
|
||||
else:
|
||||
# Idempotency: it's okay if the file doesn't exist
|
||||
# Idempotency: it is okay if the file doesn't exist
|
||||
msg = '{path} already does not exist'.format(path=path)
|
||||
module.exit_json(msg=msg)
|
||||
|
||||
|
@ -228,7 +228,7 @@ def main():
|
|||
try:
|
||||
current_config = json.load(open(path, 'r'))
|
||||
except (IOError, ValueError):
|
||||
# File either doesn't exist or it's invalid JSON
|
||||
# File either doesn't exist or it is invalid JSON
|
||||
pass
|
||||
|
||||
if current_config is not None and current_config == config:
|
||||
|
|
|
@ -217,7 +217,7 @@ def main():
|
|||
module.fail_json(
|
||||
msg=msg.format(path=path, exception=str(e)))
|
||||
else:
|
||||
# Idempotency: it's okay if the file doesn't exist
|
||||
# Idempotency: it is okay if the file doesn't exist
|
||||
msg = '{path} already does not exist'.format(path=path)
|
||||
module.exit_json(msg=msg)
|
||||
|
||||
|
@ -236,7 +236,7 @@ def main():
|
|||
try:
|
||||
current_config = json.load(open(path, 'r'))
|
||||
except (IOError, ValueError):
|
||||
# File either doesn't exist or it's invalid JSON
|
||||
# File either doesn't exist or it is invalid JSON
|
||||
pass
|
||||
|
||||
if current_config is not None and current_config == config:
|
||||
|
|
|
@ -138,11 +138,11 @@ options:
|
|||
type: int
|
||||
public_vlan:
|
||||
description:
|
||||
- VLAN by its Id to be assigned to the public NIC.
|
||||
- VLAN by its ID to be assigned to the public NIC.
|
||||
type: str
|
||||
private_vlan:
|
||||
description:
|
||||
- VLAN by its Id to be assigned to the private NIC.
|
||||
- VLAN by its ID to be assigned to the private NIC.
|
||||
type: str
|
||||
ssh_keys:
|
||||
description:
|
||||
|
|
|
@ -34,7 +34,7 @@ options:
|
|||
- V(started), synonym for V(running).
|
||||
- V(stopped), shutdown a zone.
|
||||
- V(absent), destroy the zone.
|
||||
- V(configured), configure the ready so that it's to be attached.
|
||||
- V(configured), configure the ready so that it is to be attached.
|
||||
- V(attached), attach a zone, but do not boot it.
|
||||
- V(detached), shutdown and detach a zone.
|
||||
type: str
|
||||
|
|
|
@ -333,7 +333,7 @@ class NosystemdTimezone(Timezone):
|
|||
adjtime='/etc/adjtime'
|
||||
)
|
||||
|
||||
# It's fine if all tree config files don't exist
|
||||
# It is fine if all tree config files don't exist
|
||||
allow_no_file = dict(
|
||||
name=True,
|
||||
hwclock=True,
|
||||
|
@ -545,7 +545,7 @@ class NosystemdTimezone(Timezone):
|
|||
# to set, we need to return the TZ which the symlink points to.
|
||||
if os.path.exists('/etc/localtime'):
|
||||
# We use readlink() because on some distros zone files are symlinks
|
||||
# to other zone files, so it's hard to get which TZ is actually set
|
||||
# to other zone files, so it is hard to get which TZ is actually set
|
||||
# if we follow the symlink.
|
||||
path = os.readlink('/etc/localtime')
|
||||
# most linuxes has it in /usr/share/zoneinfo
|
||||
|
|
|
@ -125,7 +125,7 @@ options:
|
|||
sambaCustomSettings:
|
||||
default: []
|
||||
description:
|
||||
- Option name in smb.conf and its value.
|
||||
- Option name in C(smb.conf) and its value.
|
||||
type: list
|
||||
elements: dict
|
||||
aliases: [samba_custom_settings]
|
||||
|
|
|
@ -534,7 +534,7 @@ def run_module():
|
|||
# Check for differences between the playbook parameters and the
|
||||
# current parameters. This will need a comparison function;
|
||||
# since AnsibleModule params are all strings, compare them as
|
||||
# strings (but if it's None; skip).
|
||||
# strings (but if it is None; skip).
|
||||
for key in currentparams.keys():
|
||||
if module.params[key] is not None:
|
||||
if str(currentparams[key]) != module.params[key]:
|
||||
|
|
|
@ -432,7 +432,7 @@ def get_vm_uuid(module, alias):
|
|||
msg='Could not retrieve UUID of {0}'.format(alias), exception=stderr)
|
||||
|
||||
# If no VM was found matching the given alias, we get back an empty array.
|
||||
# That is not an error condition as we might be explicitly checking it's
|
||||
# That is not an error condition as we might be explicitly checking for its
|
||||
# absence.
|
||||
try:
|
||||
stdout_json = json.loads(stdout)
|
||||
|
@ -708,7 +708,7 @@ def main():
|
|||
|
||||
result = {'state': state}
|
||||
|
||||
# While it's possible to refer to a given VM by it's `alias`, it's easier
|
||||
# While it is possible to refer to a given VM by its `alias`, it is easier
|
||||
# to operate on VMs by their UUID. So if we're not given a `uuid`, look
|
||||
# it up.
|
||||
if not uuid:
|
||||
|
@ -733,12 +733,12 @@ def main():
|
|||
module.exit_json(**result)
|
||||
|
||||
# The general flow is as follows:
|
||||
# - first the current state of the VM is obtained by it's UUID.
|
||||
# - first the current state of the VM is obtained by its UUID.
|
||||
# - If the state was not found and the desired state is 'deleted', return.
|
||||
# - If the state was not found, it means the VM has to be created.
|
||||
# Subsequently the VM will be set to the desired state (i.e. stopped)
|
||||
# - Otherwise, it means the VM exists already and we operate on it's
|
||||
# state (i.e. reboot it.)
|
||||
# - Otherwise, it means the VM exists already and we operate on its
|
||||
# state (for example reboot it.)
|
||||
#
|
||||
# In the future it should be possible to query the VM for a particular
|
||||
# property as a valid state (i.e. queried) so the result can be
|
||||
|
|
|
@ -432,7 +432,7 @@ def is_attribute(tree, xpath, namespaces):
|
|||
|
||||
An xpath attribute search will only match one item"""
|
||||
|
||||
# lxml 5.1.1 removed etree._ElementStringResult, so we can no longer simply assume it's there
|
||||
# lxml 5.1.1 removed etree._ElementStringResult, so we can no longer simply assume it is there
|
||||
# (https://github.com/lxml/lxml/commit/eba79343d0e7ad1ce40169f60460cdd4caa29eb3)
|
||||
ElementStringResult = getattr(etree, '_ElementStringResult', None)
|
||||
|
||||
|
|
Loading…
Reference in New Issue