mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-05 07:49:10 -07:00
h*.py: normalize docs (#9394)
* h*.py: normalize docs * Apply suggestions from code review Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
3048d5305d
commit
912065ad0e
26 changed files with 2272 additions and 2513 deletions
|
@ -9,7 +9,7 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
DOCUMENTATION = r"""
|
||||
module: htpasswd
|
||||
short_description: Manage user files for basic authentication
|
||||
description:
|
||||
|
@ -24,13 +24,13 @@ options:
|
|||
path:
|
||||
type: path
|
||||
required: true
|
||||
aliases: [ dest, destfile ]
|
||||
aliases: [dest, destfile]
|
||||
description:
|
||||
- Path to the file that contains the usernames and passwords.
|
||||
name:
|
||||
type: str
|
||||
required: true
|
||||
aliases: [ username ]
|
||||
aliases: [username]
|
||||
description:
|
||||
- User name to add or remove.
|
||||
password:
|
||||
|
@ -44,19 +44,17 @@ options:
|
|||
required: false
|
||||
default: "apr_md5_crypt"
|
||||
description:
|
||||
- Hashing scheme to be used. As well as the four choices listed
|
||||
here, you can also use any other hash supported by passlib, such as
|
||||
V(portable_apache22) and V(host_apache24); or V(md5_crypt) and V(sha256_crypt),
|
||||
which are Linux passwd hashes. Only some schemes in addition to
|
||||
the four choices below will be compatible with Apache or Nginx, and
|
||||
supported schemes depend on passlib version and its dependencies.
|
||||
- Hashing scheme to be used. As well as the four choices listed here, you can also use any other hash supported by passlib,
|
||||
such as V(portable_apache22) and V(host_apache24); or V(md5_crypt) and V(sha256_crypt), which are Linux passwd hashes.
|
||||
Only some schemes in addition to the four choices below will be compatible with Apache or Nginx, and supported schemes
|
||||
depend on passlib version and its dependencies.
|
||||
- See U(https://passlib.readthedocs.io/en/stable/lib/passlib.apache.html#passlib.apache.HtpasswdFile) parameter C(default_scheme).
|
||||
- 'Some of the available choices might be: V(apr_md5_crypt), V(des_crypt), V(ldap_sha1), V(plaintext).'
|
||||
aliases: [crypt_scheme]
|
||||
state:
|
||||
type: str
|
||||
required: false
|
||||
choices: [ present, absent ]
|
||||
choices: [present, absent]
|
||||
default: "present"
|
||||
description:
|
||||
- Whether the user entry should be present or not.
|
||||
|
@ -65,22 +63,21 @@ options:
|
|||
type: bool
|
||||
default: true
|
||||
description:
|
||||
- Used with O(state=present). If V(true), the file will be created
|
||||
if it does not exist. Conversely, if set to V(false) and the file
|
||||
does not exist it will fail.
|
||||
- Used with O(state=present). If V(true), the file will be created if it does not exist. Conversely, if set to V(false)
|
||||
and the file does not exist it will fail.
|
||||
notes:
|
||||
- "This module depends on the C(passlib) Python library, which needs to be installed on all target systems."
|
||||
- "On Debian < 11, Ubuntu <= 20.04, or Fedora: install C(python-passlib)."
|
||||
- "On Debian, Ubuntu: install C(python3-passlib)."
|
||||
- "On RHEL or CentOS: Enable EPEL, then install C(python-passlib)."
|
||||
requirements: [ passlib>=1.6 ]
|
||||
- This module depends on the C(passlib) Python library, which needs to be installed on all target systems.
|
||||
- 'On Debian < 11, Ubuntu <= 20.04, or Fedora: install C(python-passlib).'
|
||||
- 'On Debian, Ubuntu: install C(python3-passlib).'
|
||||
- 'On RHEL or CentOS: Enable EPEL, then install C(python-passlib).'
|
||||
requirements: [passlib>=1.6]
|
||||
author: "Ansible Core Team"
|
||||
extends_documentation_fragment:
|
||||
- files
|
||||
- community.general.attributes
|
||||
'''
|
||||
"""
|
||||
|
||||
EXAMPLES = """
|
||||
EXAMPLES = r"""
|
||||
- name: Add a user to a password file and ensure permissions are set
|
||||
community.general.htpasswd:
|
||||
path: /etc/nginx/passwdfile
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue