1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

[PR #5964/9de14548 backport][stable-6] Add attributes to various basic modules (#6021)

Add attributes to various basic modules (#5964)

* Add attributes to various basic modules.

* Check and diff mode for pam_limits was added in #830.

(cherry picked from commit 9de145482b)

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot] 2023-02-20 17:47:39 +01:00 committed by GitHub
parent ef09ea519c
commit e92908b66e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 280 additions and 34 deletions

View file

@ -22,6 +22,13 @@ author:
- Marius Rieder (@jiuka)
- David Wittman (@DavidWittman)
- Gabe Mulley (@mulby)
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: full
options:
name:
description:

View file

@ -14,11 +14,18 @@ DOCUMENTATION = r'''
---
module: archive
short_description: Creates a compressed archive of one or more files or trees
extends_documentation_fragment: files
extends_documentation_fragment:
- files
- community.general.attributes
description:
- Creates or extends an archive.
- The source and archive are on the remote host, and the archive I(is not) copied to the local host.
- Source files can be deleted after archival by specifying I(remove=True).
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
path:
description:

View file

@ -24,6 +24,13 @@ short_description: Manage variables in crontabs
description:
- Use this module to manage crontab variables.
- This module allows you to create, update, or delete cron variable definitions.
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: none
diff_mode:
support: none
options:
name:
description:

View file

@ -14,6 +14,13 @@ module: crypttab
short_description: Encrypted Linux block devices
description:
- Control Linux encrypted block devices that are set up during system boot in C(/etc/crypttab).
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
name:
description:

View file

@ -44,6 +44,13 @@ notes:
key is by making the configuration change in application affected by the
key, and then having a look at value set via commands C(dconf dump
/path/to/dir/) or C(dconf read /path/to/key).
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
key:
type: str

View file

@ -12,11 +12,18 @@ __metaclass__ = type
DOCUMENTATION = '''
module: gconftool2
author:
- Kenneth D. Evensen (@kevensen)
- Kenneth D. Evensen (@kevensen)
short_description: Edit GNOME Configurations
description:
- This module allows for the manipulation of GNOME 2 Configuration via
gconftool-2. Please see the gconftool-2(1) man pages for more details.
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
key:
type: str

View file

@ -17,6 +17,13 @@ short_description: Manage user accounts with systemd-homed
version_added: 4.4.0
description:
- Manages a user's home directory managed by systemd-homed.
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
name:
description:

View file

@ -15,14 +15,21 @@ DOCUMENTATION = r'''
---
module: ini_file
short_description: Tweak settings in INI files
extends_documentation_fragment: files
extends_documentation_fragment:
- files
- community.general.attributes
description:
- Manage (add, remove, change) individual settings in an INI-style file without having
to manage the file as a whole with, say, M(ansible.builtin.template) or M(ansible.builtin.assemble).
- Adds missing sections if they don't exist.
- Before Ansible 2.0, comments are discarded when the source file is read, and therefore will not show up in the destination file.
- Since Ansible 2.3, this module adds missing ending newlines to files to keep in line with the POSIX standard, even when
no other modifications need to be applied.
- Manage (add, remove, change) individual settings in an INI-style file without having
to manage the file as a whole with, say, M(ansible.builtin.template) or M(ansible.builtin.assemble).
- Adds missing sections if they don't exist.
- Before Ansible 2.0, comments are discarded when the source file is read, and therefore will not show up in the destination file.
- Since Ansible 2.3, this module adds missing ending newlines to files to keep in line with the POSIX standard, even when
no other modifications need to be applied.
attributes:
check_mode:
support: full
diff_mode:
support: full
options:
path:
description:

View file

@ -13,11 +13,18 @@ DOCUMENTATION = '''
---
module: interfaces_file
short_description: Tweak settings in /etc/network/interfaces files
extends_documentation_fragment: files
extends_documentation_fragment:
- ansible.builtin.files
- community.general.attributes
description:
- Manage (add, remove, change) individual interface options in an interfaces-style file without having
to manage the file as a whole with, say, M(ansible.builtin.template) or M(ansible.builtin.assemble). Interface has to be presented in a file.
- Read information about interfaces from interfaces-styled files
- Manage (add, remove, change) individual interface options in an interfaces-style file without having
to manage the file as a whole with, say, M(ansible.builtin.template) or M(ansible.builtin.assemble). Interface has to be presented in a file.
- Read information about interfaces from interfaces-styled files
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
dest:
type: path

View file

@ -16,6 +16,13 @@ short_description: Uses keytool to import/remove certificate to/from java keysto
description:
- This is a wrapper module around keytool, which can be used to import certificates
and optionally private keys to a given java keystore, or remove them from it.
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: full
options:
cert_url:
description:

View file

@ -16,6 +16,11 @@ module: java_keystore
short_description: Create a Java keystore in JKS format
description:
- Bundle a x509 certificate and its private key into a Java Keystore in JKS format.
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
name:
description:
@ -124,7 +129,8 @@ author:
- Guillaume Grossetie (@Mogztter)
- quidame (@quidame)
extends_documentation_fragment:
- files
- ansible.builtin.files
- community.general.attributes
seealso:
- module: community.crypto.openssl_pkcs12
- module: community.general.java_cert

View file

@ -13,10 +13,17 @@ DOCUMENTATION = '''
---
module: kernel_blacklist
author:
- Matthias Vogelgesang (@matze)
- Matthias Vogelgesang (@matze)
short_description: Blacklist kernel modules
description:
- Add or remove kernel modules from blacklist.
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: full
options:
name:
type: str

View file

@ -26,6 +26,13 @@ requirements:
- keyring (Python library)
- gnome-keyring (application - required for headless Gnome keyring access)
- dbus-run-session (application - required for headless Gnome keyring access)
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
service:
description: The name of the service.

View file

@ -12,11 +12,18 @@ DOCUMENTATION = r'''
---
module: launchd
author:
- Martin Migasiewicz (@martinm82)
- Martin Migasiewicz (@martinm82)
short_description: Manage macOS services
version_added: 1.0.0
description:
- Manage launchd services on target macOS hosts.
- Manage launchd services on target macOS hosts.
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
name:
description:

View file

@ -13,21 +13,28 @@ DOCUMENTATION = '''
module: locale_gen
short_description: Creates or removes locales
description:
- Manages locales by editing /etc/locale.gen and invoking locale-gen.
- Manages locales by editing /etc/locale.gen and invoking locale-gen.
author:
- Augustus Kling (@AugustusKling)
- Augustus Kling (@AugustusKling)
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
name:
type: str
description:
- Name and encoding of the locale, such as "en_GB.UTF-8".
- Name and encoding of the locale, such as "en_GB.UTF-8".
required: true
state:
type: str
description:
- Whether the locale shall be present.
choices: [ absent, present ]
default: present
type: str
description:
- Whether the locale shall be present.
choices: [ absent, present ]
default: present
'''
EXAMPLES = '''

View file

@ -13,10 +13,17 @@ DOCUMENTATION = r'''
module: make
short_description: Run targets in a Makefile
requirements:
- make
- make
author: Linus Unnebäck (@LinusU) <linus@folkdatorn.se>
description:
- Run targets in a Makefile.
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
target:
description:

View file

@ -17,6 +17,13 @@ module: mksysb
short_description: Generates AIX mksysb rootvg backups
description:
- This module manages a basic AIX mksysb (image) of rootvg.
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
backup_crypt_files:
description:

View file

@ -18,6 +18,13 @@ author:
- Matt Jeffery (@mattjeffery)
description:
- Load or unload kernel modules.
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
name:
type: str

View file

@ -13,16 +13,23 @@ DOCUMENTATION = r'''
---
module: nmcli
author:
- Chris Long (@alcamie101)
- Chris Long (@alcamie101)
short_description: Manage Networking
requirements:
- nmcli
- nmcli
extends_documentation_fragment:
- community.general.attributes
description:
- 'Manage the network devices. Create, modify and manage various connection and device type e.g., ethernet, teams, bonds, vlans etc.'
- 'On CentOS 8 and Fedora >=29 like systems, the requirements can be met by installing the following packages: NetworkManager.'
- 'On CentOS 7 and Fedora <=28 like systems, the requirements can be met by installing the following packages: NetworkManager-tui.'
- 'On Ubuntu and Debian like systems, the requirements can be met by installing the following packages: network-manager'
- 'On openSUSE, the requirements can be met by installing the following packages: NetworkManager.'
attributes:
check_mode:
support: full
diff_mode:
support: full
options:
state:
description:

View file

@ -22,6 +22,13 @@ description:
- macOS applications and other programs use the defaults system to record user preferences and other
information that must be maintained when the applications are not running (such as default font for new
documents, or the position of an Info panel).
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
domain:
description:

View file

@ -18,6 +18,15 @@ description:
- The C(pam_limits) module modifies PAM limits.
- The default file is C(/etc/security/limits.conf).
- For the full documentation, see C(man 5 limits.conf).
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
version_added: 2.0.0
diff_mode:
support: full
version_added: 2.0.0
options:
domain:
type: str

View file

@ -20,6 +20,13 @@ description:
module_path must match an existing rule. See man(5) pam.d for details.
notes:
- This module does not handle authselect profiles.
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
name:
description:

View file

@ -16,6 +16,13 @@ description:
- Read a CSV file and return a list or a dictionary, containing one dictionary per row.
author:
- Dag Wieers (@dagwieers)
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
path:
description:

View file

@ -13,8 +13,15 @@ DOCUMENTATION = r'''
module: sefcontext
short_description: Manages SELinux file context mapping definitions
description:
- Manages SELinux file context mapping definitions.
- Similar to the C(semanage fcontext) command.
- Manages SELinux file context mapping definitions.
- Similar to the C(semanage fcontext) command.
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: full
options:
target:
description:

View file

@ -15,6 +15,13 @@ module: selinux_permissive
short_description: Change permissive domain in SELinux policy
description:
- Add and remove a domain from the list of permissive domains.
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
domain:
description:

View file

@ -13,7 +13,14 @@ DOCUMENTATION = '''
module: selogin
short_description: Manages linux user to SELinux user mapping
description:
- Manages linux user to SELinux user mapping
- Manages linux user to SELinux user mapping
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
login:
type: str

View file

@ -14,6 +14,13 @@ module: seport
short_description: Manages SELinux network port type definitions
description:
- Manages SELinux network port type definitions.
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
ports:
description:

View file

@ -20,6 +20,13 @@ description:
author:
- Björn Andersson (@gaqzi)
- Abhijeet Kasurde (@Akasurde)
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
state:
description:
@ -95,8 +102,6 @@ options:
version_added: 6.1.0
requirements:
- StormSSH
notes:
- Supports check mode.
'''
EXAMPLES = r'''

View file

@ -19,6 +19,13 @@ description:
- This module allows for the manipulation of sudoers files.
author:
- "Jon Ellis (@JonEllis) <ellis.jp@gmail.com>"
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
commands:
description:

View file

@ -18,6 +18,13 @@ short_description: Manage FreeBSD using sysrc
version_added: '2.0.0'
description:
- Manages C(/etc/rc.conf) for FreeBSD.
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
name:
description:

View file

@ -26,6 +26,13 @@ description:
- As of Ansible 2.4 support was added for macOS.
- As of Ansible 2.9 support was added for AIX 6.1+
- Windows and HPUX are not supported, please let us know if you find any other OS/distro in which this fails.
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: full
options:
name:
description:

View file

@ -25,6 +25,13 @@ notes:
- See C(man ufw) for more examples.
requirements:
- C(ufw) package
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
state:
description:

View file

@ -16,6 +16,13 @@ description:
- Manages filesystem user defined extended attributes.
- Requires that extended attributes are enabled on the target filesystem
and that the setfattr/getfattr utilities are present.
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
options:
path:
description:

View file

@ -26,6 +26,15 @@ seealso:
description: XFCE documentation for the Xfconf configuration system.
link: 'https://docs.xfce.org/xfce/xfconf/start'
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: full
options:
channel:
description:

View file

@ -16,7 +16,14 @@ DOCUMENTATION = r'''
module: xml
short_description: Manage bits and pieces of XML files or strings
description:
- A CRUD-like interface to managing bits of XML files.
- A CRUD-like interface to managing bits of XML files.
extends_documentation_fragment:
- community.general.attributes
attributes:
check_mode:
support: full
diff_mode:
support: full
options:
path:
description: