[PR #9421/2a2a9661 backport][stable-10] [ab]*.py: normalize docs (#9427)

[ab]*.py: normalize docs (#9421)

* [ab]*.py: normalize docs

* Update plugins/modules/atomic_image.py

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 2a2a9661d9)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2024-12-27 14:52:29 +01:00 committed by GitHub
parent 3db0a11148
commit 14038511a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 1931 additions and 2013 deletions

View file

@ -9,15 +9,13 @@ from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: aerospike_migrations
short_description: Check or wait for migrations between nodes
description:
- This can be used to check for migrations in a cluster.
This makes it easy to do a rolling upgrade/update on Aerospike nodes.
- If waiting for migrations is not desired, simply just poll until
port 3000 if available or asinfo -v status returns ok
- This can be used to check for migrations in a cluster. This makes it easy to do a rolling upgrade/update on Aerospike
nodes.
- If waiting for migrations is not desired, simply just poll until port 3000 if available or C(asinfo -v status) returns ok.
author: "Albert Autin (@Alb0t)"
extends_documentation_fragment:
- community.general.attributes
@ -27,92 +25,84 @@ attributes:
diff_mode:
support: none
options:
host:
description:
- Which host do we use as seed for info connection
required: false
type: str
default: localhost
port:
description:
- Which port to connect to Aerospike on (service port)
required: false
type: int
default: 3000
connect_timeout:
description:
- How long to try to connect before giving up (milliseconds)
required: false
type: int
default: 1000
consecutive_good_checks:
description:
- How many times should the cluster report "no migrations"
consecutively before returning OK back to ansible?
required: false
type: int
default: 3
sleep_between_checks:
description:
- How long to sleep between each check (seconds).
required: false
type: int
default: 60
tries_limit:
description:
- How many times do we poll before giving up and failing?
default: 300
required: false
type: int
local_only:
description:
- Do you wish to only check for migrations on the local node
before returning, or do you want all nodes in the cluster
to finish before returning?
required: true
type: bool
min_cluster_size:
description:
- Check will return bad until cluster size is met
or until tries is exhausted
required: false
type: int
default: 1
fail_on_cluster_change:
description:
- Fail if the cluster key changes
if something else is changing the cluster, we may want to fail
required: false
type: bool
default: true
migrate_tx_key:
description:
- The metric key used to determine if we have tx migrations
remaining. Changeable due to backwards compatibility.
required: false
type: str
default: migrate_tx_partitions_remaining
migrate_rx_key:
description:
- The metric key used to determine if we have rx migrations
remaining. Changeable due to backwards compatibility.
required: false
type: str
default: migrate_rx_partitions_remaining
target_cluster_size:
description:
- When all aerospike builds in the cluster are greater than
version 4.3, then the C(cluster-stable) info command will be used.
Inside this command, you can optionally specify what the target
cluster size is - but it is not necessary. You can still rely on
min_cluster_size if you don't want to use this option.
- If this option is specified on a cluster that has at least 1
host <4.3 then it will be ignored until the min version reaches
4.3.
required: false
type: int
'''
EXAMPLES = '''
host:
description:
- Which host do we use as seed for info connection.
required: false
type: str
default: localhost
port:
description:
- Which port to connect to Aerospike on (service port).
required: false
type: int
default: 3000
connect_timeout:
description:
- How long to try to connect before giving up (milliseconds).
required: false
type: int
default: 1000
consecutive_good_checks:
description:
- How many times should the cluster report "no migrations" consecutively before returning OK back to ansible?
required: false
type: int
default: 3
sleep_between_checks:
description:
- How long to sleep between each check (seconds).
required: false
type: int
default: 60
tries_limit:
description:
- How many times do we poll before giving up and failing?
default: 300
required: false
type: int
local_only:
description:
- Do you wish to only check for migrations on the local node before returning, or do you want all nodes in the cluster
to finish before returning?
required: true
type: bool
min_cluster_size:
description:
- Check will return bad until cluster size is met or until tries is exhausted.
required: false
type: int
default: 1
fail_on_cluster_change:
description:
- Fail if the cluster key changes if something else is changing the cluster, we may want to fail.
required: false
type: bool
default: true
migrate_tx_key:
description:
- The metric key used to determine if we have tx migrations remaining. Changeable due to backwards compatibility.
required: false
type: str
default: migrate_tx_partitions_remaining
migrate_rx_key:
description:
- The metric key used to determine if we have rx migrations remaining. Changeable due to backwards compatibility.
required: false
type: str
default: migrate_rx_partitions_remaining
target_cluster_size:
description:
- When all aerospike builds in the cluster are greater than version 4.3, then the C(cluster-stable) info command will
be used. Inside this command, you can optionally specify what the target cluster size is - but it is not necessary.
You can still rely on O(min_cluster_size) if you do not want to use this option.
- If this option is specified on a cluster that has at least one host <4.3 then it will be ignored until the min version
reaches 4.3.
required: false
type: int
"""
EXAMPLES = r"""
# check for migrations on local node
- name: Wait for migrations on local node before proceeding
community.general.aerospike_migrations:
@ -132,13 +122,13 @@ EXAMPLES = '''
- name: Install dependencies
ansible.builtin.apt:
name:
- python
- python-pip
- python-setuptools
- python
- python-pip
- python-setuptools
state: latest
- name: Setup aerospike
ansible.builtin.pip:
name: aerospike
name: aerospike
# check for migrations every (sleep_between_checks)
# If at least (consecutive_good_checks) checks come back OK in a row, then return OK.
# Will exit if any exception, which can be caused by bad nodes,
@ -147,13 +137,13 @@ EXAMPLES = '''
# Tries Limit * Sleep Between Checks * delay * retries
- name: Wait for aerospike migrations
community.general.aerospike_migrations:
local_only: true
sleep_between_checks: 1
tries_limit: 5
consecutive_good_checks: 3
fail_on_cluster_change: true
min_cluster_size: 3
target_cluster_size: 4
local_only: true
sleep_between_checks: 1
tries_limit: 5
consecutive_good_checks: 3
fail_on_cluster_change: true
min_cluster_size: 3
target_cluster_size: 4
register: migrations_check
until: migrations_check is succeeded
changed_when: false
@ -161,14 +151,14 @@ EXAMPLES = '''
retries: 120
- name: Another thing
ansible.builtin.shell: |
echo foo
echo foo
- name: Reboot
ansible.builtin.reboot:
'''
"""
RETURN = '''
RETURN = r"""
# Returns only a success/failure result. Changed is always false.
'''
"""
import traceback