[prox ... pyth]*: normalize docs (#9364)

* [prox ... pyth]*: normalize docs

* Apply suggestions from code review

Co-authored-by: IamLunchbox <56757745+IamLunchbox@users.noreply.github.com>

* Update plugins/modules/pushbullet.py

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

* Update plugins/modules/pushbullet.py

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

---------

Co-authored-by: IamLunchbox <56757745+IamLunchbox@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Alexei Znamensky 2024-12-26 20:24:16 +13:00 committed by GitHub
parent 9fc3092bb3
commit 6b7ea3443d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 633 additions and 729 deletions

View file

@ -10,8 +10,7 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: pulp_repo
author: "Joe Adams (@sysadmind)"
short_description: Add or remove Pulp repos from a remote host
@ -35,78 +34,68 @@ options:
type: str
force_basic_auth:
description:
- httplib2, the library used by the M(ansible.builtin.uri) module only sends
authentication information when a webservice responds to an initial
request with a 401 status. Since some basic auth services do not
properly send a 401, logins will fail. This option forces the sending of
the Basic authentication header upon initial request.
- C(httplib2), the library used by the M(ansible.builtin.uri) module only sends authentication information when a webservice responds to an
initial request with a 401 status. Since some basic auth services do not properly send a 401, logins will fail. This option forces the
sending of the Basic authentication header upon initial request.
type: bool
default: false
generate_sqlite:
description:
- Boolean flag to indicate whether sqlite files should be generated during
a repository publish.
- Boolean flag to indicate whether sqlite files should be generated during a repository publish.
required: false
type: bool
default: false
feed_ca_cert:
description:
- CA certificate string used to validate the feed source SSL certificate.
This can be the file content or the path to the file.
- CA certificate string used to validate the feed source SSL certificate. This can be the file content or the path to the file.
type: str
aliases: [ importer_ssl_ca_cert ]
aliases: [importer_ssl_ca_cert]
feed_client_cert:
description:
- Certificate used as the client certificate when synchronizing the
repository. This is used to communicate authentication information to
the feed source. The value to this option must be the full path to the
certificate. The specified file may be the certificate itself or a
single file containing both the certificate and private key. This can be
the file content or the path to the file.
- Certificate used as the client certificate when synchronizing the repository. This is used to communicate authentication information to
the feed source. The value to this option must be the full path to the certificate. The specified file may be the certificate itself or
a single file containing both the certificate and private key. This can be the file content or the path to the file.
type: str
aliases: [ importer_ssl_client_cert ]
aliases: [importer_ssl_client_cert]
feed_client_key:
description:
- Private key to the certificate specified in O(feed_client_cert),
assuming it is not included in the certificate file itself. This can be
the file content or the path to the file.
- Private key to the certificate specified in O(feed_client_cert), assuming it is not included in the certificate file itself. This can
be the file content or the path to the file.
type: str
aliases: [ importer_ssl_client_key ]
aliases: [importer_ssl_client_key]
name:
description:
- Name of the repo to add or remove. This correlates to repo-id in Pulp.
required: true
type: str
aliases: [ repo ]
aliases: [repo]
proxy_host:
description:
- Proxy url setting for the pulp repository importer. This is in the
format scheme://host.
- Proxy url setting for the pulp repository importer. This is in the format scheme://host.
required: false
default: null
default:
type: str
proxy_port:
description:
- Proxy port setting for the pulp repository importer.
required: false
default: null
default:
type: str
proxy_username:
description:
- Proxy username for the pulp repository importer.
required: false
default: null
default:
type: str
proxy_password:
description:
- Proxy password for the pulp repository importer.
required: false
default: null
default:
type: str
publish_distributor:
description:
- Distributor to use when O(state=publish). The default is to
publish all distributors.
- Distributor to use when O(state=publish). The default is to publish all distributors.
type: str
pulp_host:
description:
@ -124,8 +113,7 @@ options:
type: str
repoview:
description:
- Whether to generate repoview files for a published repository. Setting
this to V(true) automatically activates O(generate_sqlite).
- Whether to generate repoview files for a published repository. Setting this to V(true) automatically activates O(generate_sqlite).
required: false
type: bool
default: false
@ -141,24 +129,21 @@ options:
default: true
state:
description:
- The repo state. A state of V(sync) will queue a sync of the repo.
This is asynchronous but not delayed like a scheduled sync. A state of
V(publish) will use the repository's distributor to publish the content.
- The repo state. A state of V(sync) will queue a sync of the repo. This is asynchronous but not delayed like a scheduled sync. A state
of V(publish) will use the repository's distributor to publish the content.
default: present
choices: [ "present", "absent", "sync", "publish" ]
choices: ["present", "absent", "sync", "publish"]
type: str
url_password:
description:
- The password for use in HTTP basic authentication to the pulp API.
If the O(url_username) parameter is not specified, the O(url_password)
- The password for use in HTTP basic authentication to the pulp API. If the O(url_username) parameter is not specified, the O(url_password)
parameter will not be used.
url_username:
description:
- The username for use in HTTP basic authentication to the pulp API.
validate_certs:
description:
- If V(false), SSL certificates will not be validated. This should only be
used on personally controlled sites using self-signed certificates.
- If V(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates.
type: bool
default: true
wait_for_completion:
@ -167,14 +152,13 @@ options:
type: bool
default: false
notes:
- This module can currently only create distributors and importers on rpm
repositories. Contributions to support other repo types are welcome.
- This module can currently only create distributors and importers on rpm repositories. Contributions to support other repo types are welcome.
extends_documentation_fragment:
- ansible.builtin.url
- community.general.attributes
'''
"""
EXAMPLES = '''
EXAMPLES = r"""
- name: Create a new repo with name 'my_repo'
community.general.pulp_repo:
name: my_repo
@ -197,15 +181,15 @@ EXAMPLES = '''
name: my_old_repo
repo_type: rpm
state: absent
'''
"""
RETURN = '''
RETURN = r"""
repo:
description: Name of the repo that the action was performed on.
returned: success
type: str
sample: my_repo
'''
"""
import json
import os