Debian Codegraph @

lib/ansible/plugins/doc_fragments/checksum_common.py

raw
1 # Copyright (c) 2024 ShIRann Chen <[email protected]>
2 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
3 from __future__ import annotations
4
5
6 class ModuleDocFragment(object):
7
8 DOCUMENTATION = r"""
9 options:
10 checksum_algorithm:
11 description:
12 - Algorithm to determine checksum of file.
13 - Will throw an error if the host is unable to use specified algorithm.
14 - The remote host has to support the hashing method specified, V(md5)
15 can be unavailable if the host is FIPS-140 compliant.
16 - Availability might be restricted by the target system, for example FIPS systems won't allow md5 use
17 type: str
18 choices: [ md5, sha1, sha224, sha256, sha384, sha512 ]
19 default: sha1
20 aliases: [ checksum, checksum_algo ]
21 version_added: "2.0"
22 get_checksum:
23 description:
24 - Whether to return a checksum of the file.
25 type: bool
26 default: yes
27 """