Reformat documentation with 'andebox yaml-doc' (#1020)

* Reformat documentation with 'andebox yaml-doc'.

* Revert unwanted changes.

* Fix too long lines.

* Fix broken quotes.

* Forgot two line breaks.
This commit is contained in:
Felix Fontein
2024-12-28 16:40:50 +01:00
committed by GitHub
parent f69536ef3b
commit 769d15de63
46 changed files with 2017 additions and 2469 deletions
+16 -20
View File
@@ -8,19 +8,17 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: docker_secret
short_description: Manage docker secrets.
short_description: Manage docker secrets
description:
- Create and remove Docker secrets in a Swarm environment. Similar to C(docker secret create) and C(docker secret rm).
- Adds to the metadata of new secrets C(ansible_key), an encrypted hash representation of the data, which is then used
in future runs to test if a secret has changed. If C(ansible_key) is not present, then a secret will not be updated
unless the O(force) option is set.
- Adds to the metadata of new secrets C(ansible_key), an encrypted hash representation of the data, which is then used in
future runs to test if a secret has changed. If C(ansible_key) is not present, then a secret will not be updated unless
the O(force) option is set.
- Updates to secrets are performed by removing the secret and creating it again.
extends_documentation_fragment:
- community.docker.docker
- community.docker.docker.docker_py_2_documentation
@@ -41,10 +39,8 @@ options:
type: str
data_is_b64:
description:
- If set to V(true), the data is assumed to be Base64 encoded and will be
decoded before being used.
- To use binary O(data), it is better to keep it Base64 encoded and let it
be decoded by this option.
- If set to V(true), the data is assumed to be Base64 encoded and will be decoded before being used.
- To use binary O(data), it is better to keep it Base64 encoded and let it be decoded by this option.
type: bool
default: false
data_src:
@@ -55,8 +51,9 @@ options:
version_added: 1.10.0
labels:
description:
- "A map of key:value meta data, where both key and value are expected to be strings."
- If new meta data is provided, or existing meta data is modified, the secret will be updated by removing it and creating it again.
- A map of key:value meta data, where both key and value are expected to be strings.
- If new meta data is provided, or existing meta data is modified, the secret will be updated by removing it and creating
it again.
type: dict
force:
description:
@@ -99,10 +96,9 @@ requirements:
author:
- Chris Houseknecht (@chouseknecht)
'''
EXAMPLES = '''
"""
EXAMPLES = r"""
- name: Create secret foo (from a file on the control machine)
community.docker.docker_secret:
name: foo
@@ -154,7 +150,7 @@ EXAMPLES = '''
name: foo
data: Goodnight everyone!
labels:
bar: monkey # Changing a label will cause a remove/create of the secret
bar: monkey # Changing a label will cause a remove/create of the secret
one: '1'
state: present
@@ -169,9 +165,9 @@ EXAMPLES = '''
community.docker.docker_secret:
name: foo
state: absent
'''
"""
RETURN = '''
RETURN = r"""
secret_id:
description:
- The ID assigned by Docker to the secret object.
@@ -185,7 +181,7 @@ secret_name:
type: str
sample: 'awesome_secret'
version_added: 2.2.0
'''
"""
import base64
import hashlib