fix(vpn-node-config): resolve ansible-lint violations
OpenVPN Ansible / Deploy VPN Networking and OpenVPN (push) Canceled after 0s
OpenVPN Ansible / Generate SBOM (push) Canceled after 0s
OpenVPN Ansible / Scan SBOM with Trivy (push) Canceled after 0s
OpenVPN Ansible / Ansible Syntax Check (push) Canceled after 38s
OpenVPN Ansible / Ansible Lint (push) Canceled after 40s
OpenVPN Ansible / Deploy VPN Networking and OpenVPN (push) Canceled after 0s
OpenVPN Ansible / Generate SBOM (push) Canceled after 0s
OpenVPN Ansible / Scan SBOM with Trivy (push) Canceled after 0s
OpenVPN Ansible / Ansible Syntax Check (push) Canceled after 38s
OpenVPN Ansible / Ansible Lint (push) Canceled after 40s
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
skip_list:
|
||||
# Ignore rules that make no sense:
|
||||
- galaxy[tags]
|
||||
- galaxy[version-incorrect]
|
||||
- meta-runtime[unsupported-version]
|
||||
- no-changed-when
|
||||
- sanity[cannot-ignore] # some of the rules you cannot ignore actually MUST be ignored, like yamllint:unparsable-with-libyaml
|
||||
- yaml # we're using yamllint ourselves
|
||||
- var-naming[no-role-prefix]
|
||||
|
||||
# To be checked and maybe fixed:
|
||||
- args
|
||||
- command-instead-of-module
|
||||
- complexity
|
||||
- galaxy
|
||||
- ignore-errors
|
||||
- jinja
|
||||
- key-order
|
||||
- latest
|
||||
- literal-compare
|
||||
- name
|
||||
- no-handler
|
||||
- package-latest
|
||||
- risky-file-permissions
|
||||
- risky-shell-pipe
|
||||
- schema
|
||||
- var-naming
|
||||
|
||||
exclude_paths:
|
||||
# Ansible-lint uses "ansible-playbook --syntax-check" as its "syntax check",
|
||||
# which bails out on roles it cannot find. The following playbooks are 100% valid,
|
||||
# but we need to skip them due to ansible-lint's syntax check's deficiencies...
|
||||
- tests/integration/targets/filter_hashids/runme.yml
|
||||
- tests/integration/targets/filter_jc/runme.yml
|
||||
- tests/integration/targets/filter_json_patch/runme.yml
|
||||
- tests/integration/targets/filter_json_query/runme.yml
|
||||
- tests/integration/targets/lookup_consul_kv/dependencies.yml
|
||||
- tests/integration/targets/lookup_consul_kv/test_lookup_consul_kv.yml
|
||||
- tests/integration/targets/lookup_etcd3/dependencies.yml
|
||||
- tests/integration/targets/lookup_etcd3/test_lookup_etcd3.yml
|
||||
- tests/integration/targets/test_fqdn_valid/runme.yml
|
||||
@@ -0,0 +1,9 @@
|
||||
<!--
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
|
||||
## Azure Pipelines Configuration
|
||||
|
||||
Please see the [Documentation](https://github.com/ansible/community/wiki/Testing:-Azure-Pipelines) for more information.
|
||||
+438
@@ -0,0 +1,438 @@
|
||||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
trigger:
|
||||
batch: true
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
- stable-*
|
||||
|
||||
pr:
|
||||
autoCancel: true
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
- stable-*
|
||||
|
||||
schedules:
|
||||
- cron: 0 8 * * *
|
||||
displayName: Nightly (main)
|
||||
always: true
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
- cron: 0 10 * * *
|
||||
displayName: Nightly (active stable branches)
|
||||
always: true
|
||||
branches:
|
||||
include:
|
||||
- stable-14
|
||||
- stable-13
|
||||
- cron: 0 11 * * 0
|
||||
displayName: Weekly (old stable branches)
|
||||
always: true
|
||||
branches:
|
||||
include:
|
||||
- stable-12
|
||||
|
||||
variables:
|
||||
- name: checkoutPath
|
||||
value: ansible_collections/community/general
|
||||
- name: coverageBranches
|
||||
value: main
|
||||
- name: entryPoint
|
||||
value: tests/utils/shippable/nox.sh
|
||||
- name: prepareEntryPoint
|
||||
value: tests/utils/shippable/nox-prepare.sh
|
||||
- name: fetchDepth
|
||||
value: 0
|
||||
|
||||
resources:
|
||||
containers:
|
||||
- container: default
|
||||
image: quay.io/ansible/azure-pipelines-test-container:8.0.0
|
||||
|
||||
pool: Standard
|
||||
|
||||
stages:
|
||||
- stage: sanity
|
||||
displayName: Sanity
|
||||
dependsOn: []
|
||||
variables:
|
||||
entryPoint: tests/utils/shippable/nox.sh
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
targets:
|
||||
- name: ansible-core 2.20
|
||||
test: ansible-test-sanity-2.20
|
||||
- name: ansible-core 2.21
|
||||
test: ansible-test-sanity-2.21
|
||||
- name: ansible-core 2.22
|
||||
test: ansible-test-sanity-2.22
|
||||
- name: ansible-core devel
|
||||
test: ansible-test-sanity-devel
|
||||
- name: Extra sanity tests
|
||||
test: extra-sanity-tests
|
||||
|
||||
- stage: units_2_20
|
||||
displayName: Units 2.20
|
||||
dependsOn: []
|
||||
variables:
|
||||
entryPoint: tests/utils/shippable/nox.sh
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
targets:
|
||||
- name: Python 3.9
|
||||
test: ansible-test-units-2.20-3.9
|
||||
- name: Python 3.12
|
||||
test: ansible-test-units-2.20-3.12
|
||||
- name: Python 3.14
|
||||
test: ansible-test-units-2.20-3.14
|
||||
|
||||
- stage: units_2_21
|
||||
displayName: Units 2.21
|
||||
dependsOn: []
|
||||
variables:
|
||||
entryPoint: tests/utils/shippable/nox.sh
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
targets:
|
||||
- name: Python 3.9
|
||||
test: ansible-test-units-2.21-3.9
|
||||
- name: Python 3.12
|
||||
test: ansible-test-units-2.21-3.12
|
||||
- name: Python 3.14
|
||||
test: ansible-test-units-2.21-3.14
|
||||
|
||||
- stage: units_2_22
|
||||
displayName: Units 2.22
|
||||
dependsOn: []
|
||||
variables:
|
||||
entryPoint: tests/utils/shippable/nox.sh
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
targets:
|
||||
- name: Python 3.10
|
||||
test: ansible-test-units-2.22-3.10
|
||||
- name: Python 3.13
|
||||
test: ansible-test-units-2.22-3.13
|
||||
- name: Python 3.15
|
||||
test: ansible-test-units-2.22-3.15
|
||||
|
||||
- stage: units_devel
|
||||
displayName: Units devel
|
||||
dependsOn: []
|
||||
variables:
|
||||
entryPoint: tests/utils/shippable/nox.sh
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
targets:
|
||||
- name: Python 3.10
|
||||
test: ansible-test-units-devel-3.10
|
||||
- name: Python 3.11
|
||||
test: ansible-test-units-devel-3.11
|
||||
- name: Python 3.12
|
||||
test: ansible-test-units-devel-3.12
|
||||
- name: Python 3.13
|
||||
test: ansible-test-units-devel-3.13
|
||||
- name: Python 3.14
|
||||
test: ansible-test-units-devel-3.14
|
||||
- name: Python 3.15
|
||||
test: ansible-test-units-devel-3.15
|
||||
|
||||
- stage: docker_2_20
|
||||
displayName: Docker 2.20
|
||||
dependsOn: []
|
||||
variables:
|
||||
entryPoint: tests/utils/shippable/nox.sh
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
targets:
|
||||
- name: Alpine 3.22 + group 1
|
||||
test: ansible-test-integration-2.20-alpine322-azp-posix-1
|
||||
- name: Alpine 3.22 + group 2
|
||||
test: ansible-test-integration-2.20-alpine322-azp-posix-2
|
||||
- name: Alpine 3.22 + group 3
|
||||
test: ansible-test-integration-2.20-alpine322-azp-posix-3
|
||||
- name: Generic + py3.10 + generic group 1
|
||||
test: ansible-test-integration-2.20-default-3.10-azp-generic-1
|
||||
- name: Generic + py3.14 + generic group 1
|
||||
test: ansible-test-integration-2.20-default-3.14-azp-generic-1
|
||||
- name: Fedora 42 + group 1
|
||||
test: ansible-test-integration-2.20-fedora42-azp-posix-1
|
||||
- name: Fedora 42 + group 2
|
||||
test: ansible-test-integration-2.20-fedora42-azp-posix-2
|
||||
- name: Fedora 42 + group 3
|
||||
test: ansible-test-integration-2.20-fedora42-azp-posix-3
|
||||
|
||||
- stage: docker_2_21
|
||||
displayName: Docker 2.21
|
||||
dependsOn: []
|
||||
variables:
|
||||
entryPoint: tests/utils/shippable/nox.sh
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
targets:
|
||||
- name: Alpine 3.23 + group 1
|
||||
test: ansible-test-integration-2.21-alpine323-azp-posix-1
|
||||
- name: Alpine 3.23 + group 2
|
||||
test: ansible-test-integration-2.21-alpine323-azp-posix-2
|
||||
- name: Alpine 3.23 + group 3
|
||||
test: ansible-test-integration-2.21-alpine323-azp-posix-3
|
||||
- name: Generic + py3.12 + generic group 1
|
||||
test: ansible-test-integration-2.21-default-3.12-azp-generic-1
|
||||
- name: Generic + py3.14 + generic group 1
|
||||
test: ansible-test-integration-2.21-default-3.14-azp-generic-1
|
||||
- name: Generic + py3.9 + generic group 1
|
||||
test: ansible-test-integration-2.21-default-3.9-azp-generic-1
|
||||
- name: Fedora 43 + group 1
|
||||
test: ansible-test-integration-2.21-fedora43-azp-posix-1
|
||||
- name: Fedora 43 + group 2
|
||||
test: ansible-test-integration-2.21-fedora43-azp-posix-2
|
||||
- name: Fedora 43 + group 3
|
||||
test: ansible-test-integration-2.21-fedora43-azp-posix-3
|
||||
- name: Ubuntu 22.04 + group 1
|
||||
test: ansible-test-integration-2.21-ubuntu2204-azp-posix-1
|
||||
- name: Ubuntu 22.04 + group 2
|
||||
test: ansible-test-integration-2.21-ubuntu2204-azp-posix-2
|
||||
- name: Ubuntu 22.04 + group 3
|
||||
test: ansible-test-integration-2.21-ubuntu2204-azp-posix-3
|
||||
- name: Ubuntu 24.04 + group 1
|
||||
test: ansible-test-integration-2.21-ubuntu2404-azp-posix-1
|
||||
- name: Ubuntu 24.04 + group 2
|
||||
test: ansible-test-integration-2.21-ubuntu2404-azp-posix-2
|
||||
- name: Ubuntu 24.04 + group 3
|
||||
test: ansible-test-integration-2.21-ubuntu2404-azp-posix-3
|
||||
|
||||
- stage: docker_2_22
|
||||
displayName: Docker 2.22
|
||||
dependsOn: []
|
||||
variables:
|
||||
entryPoint: tests/utils/shippable/nox.sh
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
targets:
|
||||
- name: Generic + py3.13 + generic group 1
|
||||
test: ansible-test-integration-2.22-default-3.13-azp-generic-1
|
||||
- name: Generic + py3.15 + generic group 1
|
||||
test: ansible-test-integration-2.22-default-3.15-azp-generic-1
|
||||
- name: Generic + py3.9 + generic group 1
|
||||
test: ansible-test-integration-2.22-default-3.9-azp-generic-1
|
||||
- name: Fedora 44 + group 1
|
||||
test: ansible-test-integration-2.22-fedora44-azp-posix-1
|
||||
- name: Fedora 44 + group 2
|
||||
test: ansible-test-integration-2.22-fedora44-azp-posix-2
|
||||
- name: Fedora 44 + group 3
|
||||
test: ansible-test-integration-2.22-fedora44-azp-posix-3
|
||||
- name: Ubuntu 26.04 + group 1
|
||||
test: ansible-test-integration-2.22-ubuntu2604-azp-posix-1
|
||||
- name: Ubuntu 26.04 + group 2
|
||||
test: ansible-test-integration-2.22-ubuntu2604-azp-posix-2
|
||||
- name: Ubuntu 26.04 + group 3
|
||||
test: ansible-test-integration-2.22-ubuntu2604-azp-posix-3
|
||||
|
||||
- stage: docker_devel
|
||||
displayName: Docker devel
|
||||
dependsOn: []
|
||||
variables:
|
||||
entryPoint: tests/utils/shippable/nox.sh
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
targets:
|
||||
- name: Alpine 3.24 + group 1
|
||||
test: ansible-test-integration-devel-alpine324-azp-posix-1
|
||||
- name: Alpine 3.24 + group 2
|
||||
test: ansible-test-integration-devel-alpine324-azp-posix-2
|
||||
- name: Alpine 3.24 + group 3
|
||||
test: ansible-test-integration-devel-alpine324-azp-posix-3
|
||||
- name: Arch Linux + py3.14 + group 1
|
||||
test: ansible-test-integration-devel-archlinux-3.14-azp-posix-1
|
||||
- name: Arch Linux + py3.14 + group 2
|
||||
test: ansible-test-integration-devel-archlinux-3.14-azp-posix-2
|
||||
- name: Arch Linux + py3.14 + group 3
|
||||
test: ansible-test-integration-devel-archlinux-3.14-azp-posix-3
|
||||
- name: Debian 13 + py3.13 + group 1
|
||||
test: ansible-test-integration-devel-debian-13-trixie-3.13-azp-posix-1
|
||||
- name: Debian 13 + py3.13 + group 2
|
||||
test: ansible-test-integration-devel-debian-13-trixie-3.13-azp-posix-2
|
||||
- name: Debian 13 + py3.13 + group 3
|
||||
test: ansible-test-integration-devel-debian-13-trixie-3.13-azp-posix-3
|
||||
- name: Debian 12 + py3.11 + group 1
|
||||
test: ansible-test-integration-devel-debian-bookworm-3.11-azp-posix-1
|
||||
- name: Debian 12 + py3.11 + group 2
|
||||
test: ansible-test-integration-devel-debian-bookworm-3.11-azp-posix-2
|
||||
- name: Debian 12 + py3.11 + group 3
|
||||
test: ansible-test-integration-devel-debian-bookworm-3.11-azp-posix-3
|
||||
- name: Generic + py3.10 + generic group 1
|
||||
test: ansible-test-integration-devel-default-3.10-azp-generic-1
|
||||
- name: Generic + py3.13 + generic group 1
|
||||
test: ansible-test-integration-devel-default-3.13-azp-generic-1
|
||||
- name: Generic + py3.15 + generic group 1
|
||||
test: ansible-test-integration-devel-default-3.15-azp-generic-1
|
||||
- name: Fedora 44 + group 1
|
||||
test: ansible-test-integration-devel-fedora44-azp-posix-1
|
||||
- name: Fedora 44 + group 2
|
||||
test: ansible-test-integration-devel-fedora44-azp-posix-2
|
||||
- name: Fedora 44 + group 3
|
||||
test: ansible-test-integration-devel-fedora44-azp-posix-3
|
||||
- name: OpenSuSE Leap 16.0 + py3.13 + group 1
|
||||
test: ansible-test-integration-devel-opensuse-leap-16.0-3.13-azp-posix-1
|
||||
- name: OpenSuSE Leap 16.0 + py3.13 + group 2
|
||||
test: ansible-test-integration-devel-opensuse-leap-16.0-3.13-azp-posix-2
|
||||
- name: OpenSuSE Leap 16.0 + py3.13 + group 3
|
||||
test: ansible-test-integration-devel-opensuse-leap-16.0-3.13-azp-posix-3
|
||||
- name: OpenSuSE Tumbleweed + py3.13 + group 1
|
||||
test: ansible-test-integration-devel-opensuse-tumbleweed-3.13-azp-posix-1
|
||||
- name: OpenSuSE Tumbleweed + py3.13 + group 2
|
||||
test: ansible-test-integration-devel-opensuse-tumbleweed-3.13-azp-posix-2
|
||||
- name: OpenSuSE Tumbleweed + py3.13 + group 3
|
||||
test: ansible-test-integration-devel-opensuse-tumbleweed-3.13-azp-posix-3
|
||||
- name: Ubuntu 24.04 + group 1
|
||||
test: ansible-test-integration-devel-ubuntu2404-azp-posix-1
|
||||
- name: Ubuntu 24.04 + group 2
|
||||
test: ansible-test-integration-devel-ubuntu2404-azp-posix-2
|
||||
- name: Ubuntu 24.04 + group 3
|
||||
test: ansible-test-integration-devel-ubuntu2404-azp-posix-3
|
||||
- name: Ubuntu 26.04 + group 1
|
||||
test: ansible-test-integration-devel-ubuntu2604-azp-posix-1
|
||||
- name: Ubuntu 26.04 + group 2
|
||||
test: ansible-test-integration-devel-ubuntu2604-azp-posix-2
|
||||
- name: Ubuntu 26.04 + group 3
|
||||
test: ansible-test-integration-devel-ubuntu2604-azp-posix-3
|
||||
|
||||
- stage: remote_2_20
|
||||
displayName: Remote 2.20
|
||||
dependsOn: []
|
||||
variables:
|
||||
entryPoint: tests/utils/shippable/nox.sh
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
targets:
|
||||
- name: macOS 15.3 + group 1
|
||||
test: ansible-test-integration-2.20-macos-15.3-azp-posix-1
|
||||
- name: macOS 15.3 + group 2
|
||||
test: ansible-test-integration-2.20-macos-15.3-azp-posix-2
|
||||
- name: macOS 15.3 + group 3
|
||||
test: ansible-test-integration-2.20-macos-15.3-azp-posix-3
|
||||
- name: RHEL 10.2 + group 1
|
||||
test: ansible-test-integration-2.20-rhel-10.2-azp-posix-1
|
||||
- name: RHEL 10.2 + group 2
|
||||
test: ansible-test-integration-2.20-rhel-10.2-azp-posix-2
|
||||
- name: RHEL 10.2 + group 3
|
||||
test: ansible-test-integration-2.20-rhel-10.2-azp-posix-3
|
||||
|
||||
- stage: remote_2_21
|
||||
displayName: Remote 2.21
|
||||
dependsOn: []
|
||||
variables:
|
||||
entryPoint: tests/utils/shippable/nox.sh
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
targets:
|
||||
- name: RHEL 9.8 + group 1
|
||||
test: ansible-test-integration-2.21-rhel-9.8-azp-posix-1
|
||||
- name: RHEL 9.8 + group 2
|
||||
test: ansible-test-integration-2.21-rhel-9.8-azp-posix-2
|
||||
- name: RHEL 9.8 + group 3
|
||||
test: ansible-test-integration-2.21-rhel-9.8-azp-posix-3
|
||||
|
||||
- stage: remote_2_22
|
||||
displayName: Remote 2.22
|
||||
dependsOn: []
|
||||
variables:
|
||||
entryPoint: tests/utils/shippable/nox.sh
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
targets:
|
||||
- name: macOS 26.3 + group 1
|
||||
test: ansible-test-integration-2.22-macos-26.3-azp-posix-1
|
||||
- name: macOS 26.3 + group 2
|
||||
test: ansible-test-integration-2.22-macos-26.3-azp-posix-2
|
||||
- name: macOS 26.3 + group 3
|
||||
test: ansible-test-integration-2.22-macos-26.3-azp-posix-3
|
||||
- name: RHEL 10.2 + group 1
|
||||
test: ansible-test-integration-2.22-rhel-10.2-azp-posix-1
|
||||
- name: RHEL 10.2 + group 2
|
||||
test: ansible-test-integration-2.22-rhel-10.2-azp-posix-2
|
||||
- name: RHEL 10.2 + group 3
|
||||
test: ansible-test-integration-2.22-rhel-10.2-azp-posix-3
|
||||
|
||||
- stage: remote_devel
|
||||
displayName: Remote devel
|
||||
dependsOn: []
|
||||
variables:
|
||||
entryPoint: tests/utils/shippable/nox.sh
|
||||
jobs:
|
||||
- template: templates/matrix.yml
|
||||
parameters:
|
||||
targets:
|
||||
- name: Alpine 3.24 + extra VMs
|
||||
test: ansible-test-integration-devel-alpine-3.24-azp-posix-vm
|
||||
- name: FreeBSD 14.5 + group 1
|
||||
test: ansible-test-integration-devel-freebsd-14.5-azp-posix-1
|
||||
- name: FreeBSD 14.5 + group 2
|
||||
test: ansible-test-integration-devel-freebsd-14.5-azp-posix-2
|
||||
- name: FreeBSD 14.5 + group 3
|
||||
test: ansible-test-integration-devel-freebsd-14.5-azp-posix-3
|
||||
- name: FreeBSD 15.1 + group 1
|
||||
test: ansible-test-integration-devel-freebsd-15.1-azp-posix-1
|
||||
- name: FreeBSD 15.1 + group 2
|
||||
test: ansible-test-integration-devel-freebsd-15.1-azp-posix-2
|
||||
- name: FreeBSD 15.1 + group 3
|
||||
test: ansible-test-integration-devel-freebsd-15.1-azp-posix-3
|
||||
- name: macOS 26.3 + group 1
|
||||
test: ansible-test-integration-devel-macos-26.3-azp-posix-1
|
||||
- name: macOS 26.3 + group 2
|
||||
test: ansible-test-integration-devel-macos-26.3-azp-posix-2
|
||||
- name: macOS 26.3 + group 3
|
||||
test: ansible-test-integration-devel-macos-26.3-azp-posix-3
|
||||
- name: RHEL 10.2 + group 1
|
||||
test: ansible-test-integration-devel-rhel-10.2-azp-posix-1
|
||||
- name: RHEL 10.2 + group 2
|
||||
test: ansible-test-integration-devel-rhel-10.2-azp-posix-2
|
||||
- name: RHEL 10.2 + group 3
|
||||
test: ansible-test-integration-devel-rhel-10.2-azp-posix-3
|
||||
- name: RHEL 9.8 + group 1
|
||||
test: ansible-test-integration-devel-rhel-9.8-azp-posix-1
|
||||
- name: RHEL 9.8 + group 2
|
||||
test: ansible-test-integration-devel-rhel-9.8-azp-posix-2
|
||||
- name: RHEL 9.8 + group 3
|
||||
test: ansible-test-integration-devel-rhel-9.8-azp-posix-3
|
||||
- name: Ubuntu 24.04 + extra VMs
|
||||
test: ansible-test-integration-devel-ubuntu-24.04-azp-posix-vm
|
||||
- name: Ubuntu 26.04 + extra VMs
|
||||
test: ansible-test-integration-devel-ubuntu-26.04-azp-posix-vm
|
||||
|
||||
- stage: Summary
|
||||
condition: succeededOrFailed()
|
||||
dependsOn:
|
||||
- sanity
|
||||
- units_2_20
|
||||
- units_2_21
|
||||
- units_2_22
|
||||
- units_devel
|
||||
- docker_2_20
|
||||
- docker_2_21
|
||||
- docker_2_22
|
||||
- docker_devel
|
||||
- remote_2_20
|
||||
- remote_2_21
|
||||
- remote_2_22
|
||||
- remote_devel
|
||||
jobs:
|
||||
- template: templates/coverage.yml
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# Aggregate code coverage results for later processing.
|
||||
|
||||
set -o pipefail -eu
|
||||
|
||||
agent_temp_directory="$1"
|
||||
|
||||
PATH="${PWD}/bin:${PATH}"
|
||||
|
||||
mkdir "${agent_temp_directory}/coverage/"
|
||||
|
||||
options=(--venv --venv-system-site-packages --color -v)
|
||||
|
||||
ansible-test coverage combine --group-by command --export "${agent_temp_directory}/coverage/" "${options[@]}"
|
||||
|
||||
if ansible-test coverage analyze targets generate --help >/dev/null 2>&1; then
|
||||
# Only analyze coverage if the installed version of ansible-test supports it.
|
||||
# Doing so allows this script to work unmodified for multiple Ansible versions.
|
||||
ansible-test coverage analyze targets generate "${agent_temp_directory}/coverage/coverage-analyze-targets.json" "${options[@]}"
|
||||
fi
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
"""
|
||||
Combine coverage data from multiple jobs, keeping the data only from the most recent attempt from each job.
|
||||
Coverage artifacts must be named using the format: "Coverage $(System.JobAttempt) {StableUniqueNameForEachJob}"
|
||||
The recommended coverage artifact name format is: Coverage $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)
|
||||
Keep in mind that Azure Pipelines does not enforce unique job display names (only names).
|
||||
It is up to pipeline authors to avoid name collisions when deviating from the recommended format.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
"""Main program entry point."""
|
||||
source_directory = sys.argv[1]
|
||||
|
||||
if "/ansible_collections/" in os.getcwd():
|
||||
output_path = "tests/output"
|
||||
else:
|
||||
output_path = "test/results"
|
||||
|
||||
destination_directory = os.path.join(output_path, "coverage")
|
||||
|
||||
if not os.path.exists(destination_directory):
|
||||
os.makedirs(destination_directory)
|
||||
|
||||
jobs = {}
|
||||
count = 0
|
||||
|
||||
coverage_re = re.compile("^Coverage (?P<attempt>[0-9]+) (?P<label>.+)$")
|
||||
for name in os.listdir(source_directory):
|
||||
match = coverage_re.search(name)
|
||||
label = match.group("label")
|
||||
attempt = int(match.group("attempt"))
|
||||
jobs[label] = max(attempt, jobs.get(label, 0))
|
||||
|
||||
for label, attempt in jobs.items():
|
||||
name = f"Coverage {attempt} {label}"
|
||||
source = os.path.join(source_directory, name)
|
||||
source_files = os.listdir(source)
|
||||
|
||||
for source_file in source_files:
|
||||
source_path = os.path.join(source, source_file)
|
||||
destination_path = os.path.join(destination_directory, source_file + "." + label)
|
||||
print(f'"{source_path}" -> "{destination_path}"')
|
||||
shutil.copyfile(source_path, destination_path)
|
||||
count += 1
|
||||
|
||||
print(f"Coverage file count: {count}")
|
||||
print(f"##vso[task.setVariable variable=coverageFileCount]{count}")
|
||||
print(f"##vso[task.setVariable variable=outputPath]{output_path}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# Check the test results and set variables for use in later steps.
|
||||
|
||||
set -o pipefail -eu
|
||||
|
||||
if [[ "$PWD" =~ /ansible_collections/ ]]; then
|
||||
output_path="tests/output"
|
||||
else
|
||||
output_path="test/results"
|
||||
fi
|
||||
|
||||
echo "##vso[task.setVariable variable=outputPath]${output_path}"
|
||||
|
||||
if compgen -G "${output_path}"'/junit/*.xml' > /dev/null; then
|
||||
echo "##vso[task.setVariable variable=haveTestResults]true"
|
||||
fi
|
||||
|
||||
if compgen -G "${output_path}"'/bot/ansible-test-*.json' > /dev/null; then
|
||||
echo "##vso[task.setVariable variable=haveBotResults]true"
|
||||
fi
|
||||
|
||||
if compgen -G "${output_path}"'/coverage/*' > /dev/null; then
|
||||
echo "##vso[task.setVariable variable=haveCoverageData]true"
|
||||
fi
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
"""
|
||||
Upload code coverage reports to codecov.io.
|
||||
Multiple coverage files from multiple languages are accepted and aggregated after upload.
|
||||
Python coverage, as well as PowerShell and Python stubs can all be uploaded.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import dataclasses
|
||||
import pathlib
|
||||
import shutil
|
||||
import subprocess
|
||||
import tempfile
|
||||
import urllib.request
|
||||
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
class CoverageFile:
|
||||
name: str
|
||||
path: pathlib.Path
|
||||
flags: list[str]
|
||||
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
class Args:
|
||||
dry_run: bool
|
||||
path: pathlib.Path
|
||||
|
||||
|
||||
def parse_args() -> Args:
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("-n", "--dry-run", action="store_true")
|
||||
parser.add_argument("path", type=pathlib.Path)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
# Store arguments in a typed dataclass
|
||||
fields = dataclasses.fields(Args)
|
||||
kwargs = {field.name: getattr(args, field.name) for field in fields}
|
||||
|
||||
return Args(**kwargs)
|
||||
|
||||
|
||||
def process_files(directory: pathlib.Path) -> tuple[CoverageFile, ...]:
|
||||
processed = []
|
||||
for file in directory.joinpath("reports").glob("coverage*.xml"):
|
||||
name = file.stem.replace("coverage=", "")
|
||||
|
||||
# Get flags from name
|
||||
flags = name.replace("-powershell", "").split("=") # Drop '-powershell' suffix
|
||||
flags = [
|
||||
flag if not flag.startswith("stub") else flag.split("-")[0] for flag in flags
|
||||
] # Remove "-01" from stub files
|
||||
|
||||
processed.append(CoverageFile(name, file, flags))
|
||||
|
||||
return tuple(processed)
|
||||
|
||||
|
||||
def upload_files(codecov_bin: pathlib.Path, files: tuple[CoverageFile, ...], dry_run: bool = False) -> None:
|
||||
for file in files:
|
||||
cmd = [
|
||||
str(codecov_bin),
|
||||
"--name",
|
||||
file.name,
|
||||
"--file",
|
||||
str(file.path),
|
||||
]
|
||||
for flag in file.flags:
|
||||
cmd.extend(["--flags", flag])
|
||||
|
||||
if dry_run:
|
||||
print(f"DRY-RUN: Would run command: {cmd}")
|
||||
continue
|
||||
|
||||
subprocess.run(cmd, check=True)
|
||||
|
||||
|
||||
def download_file(url: str, dest: pathlib.Path, flags: int, dry_run: bool = False) -> None:
|
||||
if dry_run:
|
||||
print(f"DRY-RUN: Would download {url} to {dest} and set mode to {flags:o}")
|
||||
return
|
||||
|
||||
with urllib.request.urlopen(url) as resp:
|
||||
with dest.open("w+b") as f:
|
||||
# Read data in chunks rather than all at once
|
||||
shutil.copyfileobj(resp, f, 64 * 1024)
|
||||
|
||||
dest.chmod(flags)
|
||||
|
||||
|
||||
def main():
|
||||
args = parse_args()
|
||||
url = "https://ansible-ci-files.s3.amazonaws.com/codecov/linux/codecov"
|
||||
with tempfile.TemporaryDirectory(prefix="codecov-") as tmpdir:
|
||||
codecov_bin = pathlib.Path(tmpdir) / "codecov"
|
||||
download_file(url, codecov_bin, 0o755, args.dry_run)
|
||||
|
||||
files = process_files(args.path)
|
||||
upload_files(codecov_bin, files, args.dry_run)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# Generate code coverage reports for uploading to Azure Pipelines and codecov.io.
|
||||
|
||||
set -o pipefail -eu
|
||||
|
||||
PATH="${PWD}/bin:${PATH}"
|
||||
|
||||
if ! ansible-test --help >/dev/null 2>&1; then
|
||||
# Install the devel version of ansible-test for generating code coverage reports.
|
||||
# This is only used by Ansible Collections, which are typically tested against multiple Ansible versions (in separate jobs).
|
||||
# Since a version of ansible-test is required that can work the output from multiple older releases, the devel version is used.
|
||||
pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
|
||||
fi
|
||||
|
||||
ansible-test coverage xml --group-by command --stub --venv --venv-system-site-packages --color -v
|
||||
Executable
+40
@@ -0,0 +1,40 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# Configure the test environment and run the tests.
|
||||
|
||||
set -o pipefail -eu
|
||||
|
||||
entry_point="$1"
|
||||
test="$2"
|
||||
read -r -a coverage_branches <<< "$3" # space separated list of branches to run code coverage on for scheduled builds
|
||||
agent_temp_directory="$4"
|
||||
|
||||
export COMMIT_MESSAGE
|
||||
export COMPLETE
|
||||
export COVERAGE
|
||||
export IS_PULL_REQUEST
|
||||
export COVERAGE_DESTINATION_DIRECTORY="${agent_temp_directory}/coverage"
|
||||
|
||||
if [ "${SYSTEM_PULLREQUEST_TARGETBRANCH:-}" ]; then
|
||||
IS_PULL_REQUEST=true
|
||||
COMMIT_MESSAGE=$(git log --format=%B -n 1 HEAD^2)
|
||||
else
|
||||
IS_PULL_REQUEST=
|
||||
COMMIT_MESSAGE=$(git log --format=%B -n 1 HEAD)
|
||||
fi
|
||||
|
||||
COMPLETE=
|
||||
COVERAGE=
|
||||
|
||||
if [ "${BUILD_REASON}" = "Schedule" ]; then
|
||||
COMPLETE=yes
|
||||
|
||||
if printf '%s\n' "${coverage_branches[@]}" | grep -q "^${BUILD_SOURCEBRANCHNAME}$"; then
|
||||
COVERAGE=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
"${entry_point}" "${test}" 2>&1 | "$(dirname "$0")/time-command.py"
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
"""Prepends a relative timestamp to each input line from stdin and writes it to stdout."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
import time
|
||||
|
||||
|
||||
def main():
|
||||
"""Main program entry point."""
|
||||
start = time.time()
|
||||
|
||||
sys.stdin.reconfigure(errors="surrogateescape")
|
||||
sys.stdout.reconfigure(errors="surrogateescape")
|
||||
|
||||
for line in sys.stdin:
|
||||
seconds = int(time.time() - start)
|
||||
sys.stdout.write(f"{seconds // 60:02}:{seconds % 60:02} {line}")
|
||||
sys.stdout.flush()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# This template adds a job for processing code coverage data.
|
||||
# It will upload results to Azure Pipelines and codecov.io.
|
||||
# Use it from a job stage that completes after all other jobs have completed.
|
||||
# This can be done by placing it in a separate summary stage that runs after the test stage(s) have completed.
|
||||
|
||||
jobs:
|
||||
- job: Coverage
|
||||
displayName: Code Coverage
|
||||
container: default
|
||||
workspace:
|
||||
clean: all
|
||||
steps:
|
||||
- checkout: self
|
||||
fetchDepth: $(fetchDepth)
|
||||
path: $(checkoutPath)
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: Download Coverage Data
|
||||
inputs:
|
||||
path: coverage/
|
||||
patterns: "Coverage */*=coverage.combined"
|
||||
- bash: .azure-pipelines/scripts/combine-coverage.py coverage/
|
||||
displayName: Combine Coverage Data
|
||||
- bash: .azure-pipelines/scripts/report-coverage.sh
|
||||
displayName: Generate Coverage Report
|
||||
condition: gt(variables.coverageFileCount, 0)
|
||||
- bash: .azure-pipelines/scripts/publish-codecov.py "$(outputPath)"
|
||||
displayName: Publish to codecov.io
|
||||
condition: gt(variables.coverageFileCount, 0)
|
||||
continueOnError: true
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# This template uses the provided targets and optional groups to generate a matrix which is then passed to the test template.
|
||||
# If this matrix template does not provide the required functionality, consider using the test template directly instead.
|
||||
|
||||
parameters:
|
||||
# A required list of dictionaries, one per test target.
|
||||
# Each item in the list must contain a "test" or "name" key.
|
||||
# Both may be provided. If one is omitted, the other will be used.
|
||||
- name: targets
|
||||
type: object
|
||||
|
||||
# An optional list of values which will be used to multiply the targets list into a matrix.
|
||||
# Values can be strings or numbers.
|
||||
- name: groups
|
||||
type: object
|
||||
default: []
|
||||
|
||||
# An optional format string used to generate the job name.
|
||||
# - {0} is the name of an item in the targets list.
|
||||
- name: nameFormat
|
||||
type: string
|
||||
default: "{0}"
|
||||
|
||||
# An optional format string used to generate the test name.
|
||||
# - {0} is the name of an item in the targets list.
|
||||
- name: testFormat
|
||||
type: string
|
||||
default: "{0}"
|
||||
|
||||
# An optional format string used to add the group to the job name.
|
||||
# {0} is the formatted name of an item in the targets list.
|
||||
# {{1}} is the group -- be sure to include the double "{{" and "}}".
|
||||
- name: nameGroupFormat
|
||||
type: string
|
||||
default: "{0} - {{1}}"
|
||||
|
||||
# An optional format string used to add the group to the test name.
|
||||
# {0} is the formatted test of an item in the targets list.
|
||||
# {{1}} is the group -- be sure to include the double "{{" and "}}".
|
||||
- name: testGroupFormat
|
||||
type: string
|
||||
default: "{0}/{{1}}"
|
||||
|
||||
jobs:
|
||||
- template: test.yml
|
||||
parameters:
|
||||
jobs:
|
||||
- ${{ if eq(length(parameters.groups), 0) }}:
|
||||
- ${{ each target in parameters.targets }}:
|
||||
- name: ${{ format(parameters.nameFormat, coalesce(target.name, target.test)) }}
|
||||
test: ${{ format(parameters.testFormat, coalesce(target.test, target.name)) }}
|
||||
- ${{ if not(eq(length(parameters.groups), 0)) }}:
|
||||
- ${{ each group in parameters.groups }}:
|
||||
- ${{ each target in parameters.targets }}:
|
||||
- name: ${{ format(format(parameters.nameGroupFormat, parameters.nameFormat), coalesce(target.name, target.test), group) }}
|
||||
test: ${{ format(format(parameters.testGroupFormat, parameters.testFormat), coalesce(target.test, target.name), group) }}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# This template uses the provided list of jobs to create test one or more test jobs.
|
||||
# It can be used directly if needed, or through the matrix template.
|
||||
|
||||
parameters:
|
||||
# A required list of dictionaries, one per test job.
|
||||
# Each item in the list must contain a "job" and "name" key.
|
||||
- name: jobs
|
||||
type: object
|
||||
|
||||
jobs:
|
||||
- ${{ each job in parameters.jobs }}:
|
||||
- job: test_${{ replace(replace(replace(job.test, '/', '_'), '.', '_'), '-', '_') }}
|
||||
displayName: ${{ job.name }}
|
||||
container: default
|
||||
workspace:
|
||||
clean: all
|
||||
steps:
|
||||
- checkout: self
|
||||
fetchDepth: $(fetchDepth)
|
||||
path: $(checkoutPath)
|
||||
- bash: .azure-pipelines/scripts/run-tests.sh "$(prepareEntryPoint)" "${{ job.test }}" "$(coverageBranches)" "$(Agent.TempDirectory)"
|
||||
displayName: Prepare Tests
|
||||
- bash: .azure-pipelines/scripts/run-tests.sh "$(entryPoint)" "${{ job.test }}" "$(coverageBranches)" "$(Agent.TempDirectory)"
|
||||
displayName: Run Tests
|
||||
- bash: .azure-pipelines/scripts/process-results.sh
|
||||
condition: succeededOrFailed()
|
||||
displayName: Process Results
|
||||
# - bash: .azure-pipelines/scripts/aggregate-coverage.sh "$(Agent.TempDirectory)"
|
||||
# condition: eq(variables.haveCoverageData, 'true')
|
||||
# displayName: Aggregate Coverage Data
|
||||
- task: PublishTestResults@2
|
||||
condition: eq(variables.haveTestResults, 'true')
|
||||
inputs:
|
||||
testResultsFiles: "$(outputPath)/junit/*.xml"
|
||||
displayName: Publish Test Results
|
||||
- task: PublishPipelineArtifact@1
|
||||
condition: eq(variables.haveBotResults, 'true')
|
||||
displayName: Publish Bot Results
|
||||
inputs:
|
||||
targetPath: "$(outputPath)/bot/"
|
||||
artifactName: "Bot $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)"
|
||||
- task: PublishPipelineArtifact@1
|
||||
condition: eq(variables.haveCoverageData, 'true')
|
||||
displayName: Publish Coverage Data
|
||||
inputs:
|
||||
targetPath: "$(Agent.TempDirectory)/coverage/"
|
||||
artifactName: "Coverage $(System.JobAttempt) $(System.StageDisplayName) $(System.JobDisplayName)"
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "community.general devcontainer",
|
||||
"image": "mcr.microsoft.com/devcontainers/python:3.14-bookworm",
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
|
||||
},
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"settings": {
|
||||
"terminal.integrated.shell.linux": "/bin/bash",
|
||||
"python.pythonPath": "/usr/local/bin/python",
|
||||
"editor.defaultFormatter": "charliermarsh.ruff",
|
||||
"files.autoSave": "afterDelay",
|
||||
"files.eol": "\n",
|
||||
"files.insertFinalNewline": true,
|
||||
"files.trimFinalNewlines": true,
|
||||
"files.trimTrailingWhitespace": true
|
||||
},
|
||||
"extensions": [
|
||||
"charliermarsh.ruff",
|
||||
"ms-python.python",
|
||||
"ms-python.vscode-pylance",
|
||||
"redhat.ansible",
|
||||
"redhat.vscode-yaml",
|
||||
"trond-snekvik.simple-rst"
|
||||
]
|
||||
}
|
||||
},
|
||||
"remoteUser": "vscode",
|
||||
"postCreateCommand": ".devcontainer/setup.sh",
|
||||
"workspaceFolder": "/workspace/ansible_collections/community/general",
|
||||
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace/ansible_collections/community/general,type=bind"
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https: //www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
SPDX-FileCopyrightText: 2025 Alexei Znamensky <russoz@gmail.com>
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# SPDX-FileCopyrightText: 2025 Alexei Znamensky <russoz@gmail.com>
|
||||
|
||||
nox
|
||||
ruff
|
||||
antsibull-nox
|
||||
pre-commit
|
||||
ansible-core
|
||||
andebox
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
set -x
|
||||
sudo chown -R vscode:vscode /workspace/
|
||||
|
||||
pip install -U pip
|
||||
pip install -r .devcontainer/requirements-dev.txt
|
||||
pip install -r tests/unit/requirements.txt
|
||||
|
||||
export ANSIBLE_COLLECTIONS_PATH=/workspace:${ANSIBLE_COLLECTIONS_PATH}
|
||||
ansible-galaxy collection install -v -r tests/unit/requirements.yml
|
||||
ansible-galaxy collection install -v -r tests/integration/requirements.yml
|
||||
|
||||
pre-commit install
|
||||
@@ -0,0 +1,22 @@
|
||||
# Copyright (c) 2026, Alexei Znamensky (@russoz)
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
indent_style = space
|
||||
|
||||
[*.py]
|
||||
max_line_length = 160
|
||||
indent_size = 4
|
||||
|
||||
[*.{yaml,yml,json}]
|
||||
indent_size = 2
|
||||
|
||||
[*.md]
|
||||
indent_size = 2
|
||||
@@ -0,0 +1,15 @@
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# YAML reformatting
|
||||
d032de3b16eed11ea3a31cd3d96d78f7c46a2ee0
|
||||
e8f965fbf8154ea177c6622da149f2ae8533bd3c
|
||||
e938ca5f20651abc160ee6aba10014013d04dcc1
|
||||
eaa5e07b2866e05b6c7b5628ca92e9cb1142d008
|
||||
|
||||
# Code reformatting
|
||||
340ff8586d4f1cb6a0f3c934eb42589bcc29c0ea
|
||||
d549baa5e1be8ef8734df63096d18925e8071e80
|
||||
236b9c0e0473f064d421f8af74f058e5a8970379
|
||||
24098cd63896107434cc82e4e769d720570cbba6
|
||||
+1728
File diff suppressed because it is too large
Load Diff
Vendored
+153
@@ -0,0 +1,153 @@
|
||||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
name: Bug report
|
||||
description: Create a report to help us improve
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
⚠
|
||||
Verify first that your issue is not [already reported on GitHub][issue search].
|
||||
Also test if the latest release and devel branch are affected too.
|
||||
*Complete **all** sections as described, this form is processed automatically.*
|
||||
|
||||
[issue search]: https://github.com/ansible-collections/community.general/search?q=is%3Aissue&type=issues
|
||||
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Summary
|
||||
description: Explain the problem briefly below.
|
||||
placeholder: >-
|
||||
When I try to do X with the collection from the main branch on GitHub, Y
|
||||
breaks in a way Z under the env E. Here are all the details I know
|
||||
about this problem...
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Issue Type
|
||||
# FIXME: Once GitHub allows defining the default choice, update this
|
||||
options:
|
||||
- Bug Report
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
# For smaller collections we could use a multi-select and hardcode the list
|
||||
# May generate this list via GitHub action and walking files under https://github.com/ansible-collections/community.general/tree/main/plugins
|
||||
# Select from list, filter as you type (`mysql` would only show the 3 mysql components)
|
||||
# OR freeform - doesn't seem to be supported in adaptivecards
|
||||
label: Component Name
|
||||
description: >-
|
||||
Write the short name of the module, plugin, task or feature below,
|
||||
*use your best guess if unsure*. Do not include `community.general.`!
|
||||
placeholder: dnf, apt, yum, pip, user etc.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Ansible Version
|
||||
description: >-
|
||||
Paste verbatim output from `ansible --version` between
|
||||
tripple backticks.
|
||||
value: |
|
||||
```console (paste below)
|
||||
$ ansible --version
|
||||
|
||||
```
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Community.general Version
|
||||
description: >-
|
||||
Paste verbatim output from "ansible-galaxy collection list community.general"
|
||||
between tripple backticks.
|
||||
value: |
|
||||
```console (paste below)
|
||||
$ ansible-galaxy collection list community.general
|
||||
|
||||
```
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Configuration
|
||||
description: >-
|
||||
If this issue has an example piece of YAML that can help to reproduce this problem, please provide it.
|
||||
This can be a piece of YAML from, e.g., an automation, script, scene or configuration.
|
||||
Paste verbatim output from `ansible-config dump --only-changed` between quotes
|
||||
value: |
|
||||
```console (paste below)
|
||||
$ ansible-config dump --only-changed
|
||||
|
||||
```
|
||||
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: OS / Environment
|
||||
description: >-
|
||||
Provide all relevant information below, e.g. target OS versions,
|
||||
network device firmware, etc.
|
||||
placeholder: RHEL 8, CentOS Stream etc.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Steps to Reproduce
|
||||
description: |
|
||||
Describe exactly how to reproduce the problem, using a minimal test-case. It would *really* help us understand your problem if you could also passed any playbooks, configs and commands you used.
|
||||
|
||||
**HINT:** You can paste https://gist.github.com links for larger files.
|
||||
value: |
|
||||
<!--- Paste example playbooks or commands between quotes below -->
|
||||
```yaml (paste below)
|
||||
|
||||
```
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Expected Results
|
||||
description: >-
|
||||
Describe what you expected to happen when running the steps above.
|
||||
placeholder: >-
|
||||
I expected X to happen because I assumed Y.
|
||||
that it did not.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Actual Results
|
||||
description: |
|
||||
Describe what actually happened. If possible run with extra verbosity (`-vvvv`).
|
||||
|
||||
Paste verbatim command output between quotes.
|
||||
value: |
|
||||
```console (paste below)
|
||||
|
||||
```
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description: |
|
||||
Read the [Ansible Code of Conduct](https://docs.ansible.com/projects/ansible/latest/community/code_of_conduct.html?utm_medium=github&utm_source=issue_form--ansible-collections) first.
|
||||
options:
|
||||
- label: I agree to follow the Ansible Code of Conduct
|
||||
required: true
|
||||
...
|
||||
Vendored
+31
@@ -0,0 +1,31 @@
|
||||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# Ref: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
|
||||
blank_issues_enabled: false # default: true
|
||||
contact_links:
|
||||
- name: Security bug report
|
||||
url: https://docs.ansible.com/projects/ansible-core/devel/community/reporting_bugs_and_features.html?utm_medium=github&utm_source=issue_template_chooser_ansible_collections
|
||||
about: |
|
||||
Please learn how to report security vulnerabilities here.
|
||||
|
||||
For all security related bugs, email security@ansible.com
|
||||
instead of using this issue tracker and you will receive
|
||||
a prompt response.
|
||||
|
||||
For more information, see
|
||||
https://docs.ansible.com/projects/ansible/latest/community/reporting_bugs_and_features.html
|
||||
- name: Ansible Code of Conduct
|
||||
url: https://docs.ansible.com/projects/ansible/latest/community/code_of_conduct.html?utm_medium=github&utm_source=issue_template_chooser_ansible_collections
|
||||
about: Be nice to other members of the community.
|
||||
- name: Talks to the community
|
||||
url: https://docs.ansible.com/projects/ansible/latest/community/communication.html?utm_medium=github&utm_source=issue_template_chooser#mailing-list-information
|
||||
about: Please ask and answer usage questions here
|
||||
- name: Working groups
|
||||
url: https://github.com/ansible/community/wiki
|
||||
about: Interested in improving a specific area? Become a part of a working group!
|
||||
- name: For Enterprise
|
||||
url: https://www.ansible.com/products/engine?utm_medium=github&utm_source=issue_template_chooser_ansible_collections
|
||||
about: Red Hat offers support for the Ansible Automation Platform
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
name: Documentation Report
|
||||
description: Ask us about docs
|
||||
# NOTE: issue body is enabled to allow screenshots
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
⚠
|
||||
Verify first that your issue is not [already reported on GitHub][issue search].
|
||||
Also test if the latest release and devel branch are affected too.
|
||||
*Complete **all** sections as described, this form is processed automatically.*
|
||||
|
||||
[issue search]: https://github.com/ansible-collections/community.general/search?q=is%3Aissue&type=issues
|
||||
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Summary
|
||||
description: |
|
||||
Explain the problem briefly below, add suggestions to wording or structure.
|
||||
|
||||
**HINT:** Did you know the documentation has an `Edit on GitHub` link on every page?
|
||||
placeholder: >-
|
||||
I was reading the Collection documentation of version X and I'm having
|
||||
problems understanding Y. It would be very helpful if that got
|
||||
rephrased as Z.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Issue Type
|
||||
# FIXME: Once GitHub allows defining the default choice, update this
|
||||
options:
|
||||
- Documentation Report
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Component Name
|
||||
description: >-
|
||||
Write the short name of the file, module, plugin, task or feature below,
|
||||
*use your best guess if unsure*. Do not include `community.general.`!
|
||||
placeholder: mysql_user
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Ansible Version
|
||||
description: >-
|
||||
Paste verbatim output from `ansible --version` between
|
||||
tripple backticks.
|
||||
value: |
|
||||
```console (paste below)
|
||||
$ ansible --version
|
||||
|
||||
```
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Community.general Version
|
||||
description: >-
|
||||
Paste verbatim output from "ansible-galaxy collection list community.general"
|
||||
between tripple backticks.
|
||||
value: |
|
||||
```console (paste below)
|
||||
$ ansible-galaxy collection list community.general
|
||||
|
||||
```
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Configuration
|
||||
description: >-
|
||||
Paste verbatim output from `ansible-config dump --only-changed` between quotes.
|
||||
value: |
|
||||
```console (paste below)
|
||||
$ ansible-config dump --only-changed
|
||||
|
||||
```
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: OS / Environment
|
||||
description: >-
|
||||
Provide all relevant information below, e.g. OS version,
|
||||
browser, etc.
|
||||
placeholder: Fedora 33, Firefox etc.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional Information
|
||||
description: |
|
||||
Describe how this improves the documentation, e.g. before/after situation or screenshots.
|
||||
|
||||
**Tip:** It's not possible to upload the screenshot via this field directly but you can use the last textarea in this form to attach them.
|
||||
|
||||
**HINT:** You can paste https://gist.github.com links for larger files.
|
||||
placeholder: >-
|
||||
When the improvement is applied, it makes it more straightforward
|
||||
to understand X.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description: |
|
||||
Read the [Ansible Code of Conduct](https://docs.ansible.com/projects/ansible/latest/community/code_of_conduct.html?utm_medium=github&utm_source=issue_form--ansible-collections) first.
|
||||
options:
|
||||
- label: I agree to follow the Ansible Code of Conduct
|
||||
required: true
|
||||
...
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
name: Feature request
|
||||
description: Suggest an idea for this project
|
||||
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
⚠
|
||||
Verify first that your issue is not [already reported on GitHub][issue search].
|
||||
Also test if the latest release and devel branch are affected too.
|
||||
*Complete **all** sections as described, this form is processed automatically.*
|
||||
|
||||
[issue search]: https://github.com/ansible-collections/community.general/search?q=is%3Aissue&type=issues
|
||||
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Summary
|
||||
description: Describe the new feature/improvement briefly below.
|
||||
placeholder: >-
|
||||
I am trying to do X with the collection from the main branch on GitHub and
|
||||
I think that implementing a feature Y would be very helpful for me and
|
||||
every other user of community.general because of Z.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Issue Type
|
||||
# FIXME: Once GitHub allows defining the default choice, update this
|
||||
options:
|
||||
- Feature Idea
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Component Name
|
||||
description: >-
|
||||
Write the short name of the module or plugin, or which other part(s) of the collection this feature affects.
|
||||
*use your best guess if unsure*. Do not include `community.general.`!
|
||||
placeholder: dnf, apt, yum, pip, user etc.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional Information
|
||||
description: |
|
||||
Describe how the feature would be used, why it is needed and what it would solve.
|
||||
|
||||
**HINT:** You can paste https://gist.github.com links for larger files.
|
||||
value: |
|
||||
<!--- Paste example playbooks or commands between quotes below -->
|
||||
```yaml (paste below)
|
||||
|
||||
```
|
||||
validations:
|
||||
required: false
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description: |
|
||||
Read the [Ansible Code of Conduct](https://docs.ansible.com/projects/ansible/latest/community/code_of_conduct.html?utm_medium=github&utm_source=issue_form--ansible-collections) first.
|
||||
options:
|
||||
- label: I agree to follow the Ansible Code of Conduct
|
||||
required: true
|
||||
...
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
<!--
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
|
||||
# Security Policy
|
||||
|
||||
## Reporting a security vulnerability
|
||||
|
||||
All security vulnerability reports MUST be submitted by email to: [security@ansible.com](mailto:security@ansible.com)
|
||||
|
||||
Security vulnerabilities MUST NOT be reported through public channels such as GitHub issues, pull requests, the Ansible Forum, or social media.
|
||||
|
||||
## What to include
|
||||
|
||||
When submitting a vulnerability report, include the following:
|
||||
|
||||
* **Title** (required): Clear, concise, descriptive summary.
|
||||
* **Impacted project** (required): Ideally a link to the GitHub project.
|
||||
* **Reporter details** (optional): Your name or handle and affiliation.
|
||||
* **Vulnerability description** (required): Technical details of the issue.
|
||||
* **Affected versions** (required): Known affected version(s), and ideally all affected versions.
|
||||
* **Reproduction steps** (required): Minimal example to reproduce the issue.
|
||||
* **Impact assessment** (required): Potential exploit scenarios and severity.
|
||||
* **Suggested fix** (optional): Proposed remediation, if any.
|
||||
* **Disclosure status** (required): Whether this has been shared with other parties or published and your plan for future sharing (e.g., at a conference).
|
||||
|
||||
## Timeline
|
||||
|
||||
* The Ansible Security Team aims to confirm receipt of vulnerability reports within one (1) business day.
|
||||
* Our goal is to assess the report, coordinate fix and disclosure as quickly as possible.
|
||||
* All confirmed vulnerabilities are addressed according to severity and impact.
|
||||
|
||||
## Backports
|
||||
|
||||
Generally, only the latest release of this project receives security updates.
|
||||
Earlier versions may receive critical fixes on a best-effort basis.
|
||||
|
||||
## Ansible Security Policy
|
||||
|
||||
For the complete Ansible Security Policy, including what qualifies as a reportable vulnerability, severity classification, the response process, coordinated disclosure, and the vulnerability management process, see [ansible.com/security](https://ansible.com/security).
|
||||
|
||||
## EU Cyber Resilience Act: Open-Source Steward Statement
|
||||
|
||||
This project is stewarded by **Red Hat, Inc.**, an open-source software steward as defined in Article 3(14) of the [EU Cyber Resilience Act (Regulation 2024/2847)](https://eur-lex.europa.eu/eli/reg/2024/2847/oj/eng).
|
||||
|
||||
Contact: [cra-steward@redhat.com](mailto:cra-steward@redhat.com)
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
groups:
|
||||
ci:
|
||||
patterns:
|
||||
- "*"
|
||||
|
||||
- package-ecosystem: "devcontainers"
|
||||
directory: ".devcontainer"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
rebase-strategy: auto
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
backport_branch_prefix: patchback/backports/
|
||||
backport_label_prefix: backport-
|
||||
target_branch_prefix: stable-
|
||||
...
|
||||
Vendored
+32
@@ -0,0 +1,32 @@
|
||||
##### SUMMARY
|
||||
<!--- Describe the change below, including rationale and design decisions -->
|
||||
|
||||
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
|
||||
|
||||
<!--- Please do not forget to include a changelog fragment:
|
||||
https://docs.ansible.com/projects/ansible/devel/community/collection_development_process.html#creating-changelog-fragments
|
||||
No need to include one for docs-only or test-only PR, and for new plugin/module PRs.
|
||||
Read about more details in CONTRIBUTING.md.
|
||||
-->
|
||||
|
||||
##### ISSUE TYPE
|
||||
<!--- Pick one or more below and delete the rest.
|
||||
'Test Pull Request' is for PRs that add/extend tests without code changes. -->
|
||||
- Bugfix Pull Request
|
||||
- Docs Pull Request
|
||||
- Feature Pull Request
|
||||
- New Module/Plugin Pull Request
|
||||
- Refactoring Pull Request
|
||||
- Test Pull Request
|
||||
|
||||
##### COMPONENT NAME
|
||||
<!--- Write the SHORT NAME of the module, plugin, task or feature below. -->
|
||||
|
||||
##### ADDITIONAL INFORMATION
|
||||
<!--- Include additional information to help people understand the change here -->
|
||||
<!--- A step-by-step reproduction of the problem is helpful if there is no related issue -->
|
||||
|
||||
<!--- Paste verbatim command output below, e.g. before and after your change -->
|
||||
```paste below
|
||||
|
||||
```
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# DO NOT MODIFY
|
||||
|
||||
# Settings: https://probot.github.io/apps/settings/
|
||||
# Pull settings from https://github.com/ansible-collections/.github/blob/master/.github/settings.yml
|
||||
|
||||
_extends: ".github"
|
||||
Vendored
+38
@@ -0,0 +1,38 @@
|
||||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
name: "Code scanning - action"
|
||||
|
||||
"on":
|
||||
schedule:
|
||||
- cron: '26 19 * * 1'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
CodeQL-Build:
|
||||
|
||||
permissions:
|
||||
actions: read # for github/codeql-action/init to get workflow details
|
||||
contents: read # for actions/checkout to fetch code
|
||||
security-events: write # for github/codeql-action/autobuild to send a status report
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
|
||||
with:
|
||||
languages: python
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
name: Check Ansible output in docs
|
||||
'on':
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- stable-*
|
||||
paths:
|
||||
- docs/**
|
||||
- .github/workflows/docs.yml
|
||||
pull_request:
|
||||
paths:
|
||||
- docs/**
|
||||
- .github/workflows/docs.yml
|
||||
# Run CI once per day (at 08:00 UTC)
|
||||
schedule:
|
||||
- cron: '0 8 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
nox:
|
||||
uses: ansible-community/antsibull-nox/.github/workflows/reusable-nox-run.yml@main
|
||||
with:
|
||||
session-name: Check Ansible output in docs
|
||||
sessions: ansible-output
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
name: nox
|
||||
'on':
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- stable-*
|
||||
pull_request:
|
||||
# Run CI once per day (at 08:00 UTC)
|
||||
schedule:
|
||||
- cron: '0 8 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
# Make sure there is at most one active run per PR, but do not cancel any non-PR runs
|
||||
group: ${{ github.workflow }}-${{ (github.head_ref && github.event.number) || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
ansible-test:
|
||||
uses: ansible-community/antsibull-nox/.github/workflows/reusable-nox-matrix.yml@main
|
||||
with:
|
||||
change-detection-in-prs: true
|
||||
upload-codecov: true
|
||||
upload-codecov-pr: false
|
||||
upload-codecov-push: false
|
||||
upload-codecov-schedule: true
|
||||
allow-coverage-cd-override: true
|
||||
max-ansible-core: "2.19"
|
||||
secrets:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
@@ -0,0 +1,533 @@
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
# Created by https://www.toptal.com/developers/gitignore/api/vim,git,macos,linux,pydev,emacs,dotenv,python,windows,webstorm,pycharm+all,jupyternotebooks
|
||||
# Edit at https://www.toptal.com/developers/gitignore?templates=vim,git,macos,linux,pydev,emacs,dotenv,python,windows,webstorm,pycharm+all,jupyternotebooks
|
||||
|
||||
### dotenv ###
|
||||
.env
|
||||
|
||||
### Emacs ###
|
||||
# -*- mode: gitignore; -*-
|
||||
*~
|
||||
\#*\#
|
||||
/.emacs.desktop
|
||||
/.emacs.desktop.lock
|
||||
*.elc
|
||||
auto-save-list
|
||||
tramp
|
||||
.\#*
|
||||
|
||||
# Org-mode
|
||||
.org-id-locations
|
||||
*_archive
|
||||
|
||||
# flymake-mode
|
||||
*_flymake.*
|
||||
|
||||
# eshell files
|
||||
/eshell/history
|
||||
/eshell/lastdir
|
||||
|
||||
# elpa packages
|
||||
/elpa/
|
||||
|
||||
# reftex files
|
||||
*.rel
|
||||
|
||||
# AUCTeX auto folder
|
||||
/auto/
|
||||
|
||||
# cask packages
|
||||
.cask/
|
||||
dist/
|
||||
|
||||
# Flycheck
|
||||
flycheck_*.el
|
||||
|
||||
# server auth directory
|
||||
/server/
|
||||
|
||||
# projectiles files
|
||||
.projectile
|
||||
|
||||
# directory configuration
|
||||
.dir-locals.el
|
||||
|
||||
# network security
|
||||
/network-security.data
|
||||
|
||||
|
||||
### Git ###
|
||||
# Created by git for backups. To disable backups in Git:
|
||||
# $ git config --global mergetool.keepBackup false
|
||||
*.orig
|
||||
|
||||
# Created by git when using merge tools for conflicts
|
||||
*.BACKUP.*
|
||||
*.BASE.*
|
||||
*.LOCAL.*
|
||||
*.REMOTE.*
|
||||
*_BACKUP_*.txt
|
||||
*_BASE_*.txt
|
||||
*_LOCAL_*.txt
|
||||
*_REMOTE_*.txt
|
||||
|
||||
### JupyterNotebooks ###
|
||||
# gitignore template for Jupyter Notebooks
|
||||
# website: http://jupyter.org/
|
||||
|
||||
.ipynb_checkpoints
|
||||
*/.ipynb_checkpoints/*
|
||||
|
||||
# IPython
|
||||
profile_default/
|
||||
ipython_config.py
|
||||
|
||||
# Remove previous ipynb_checkpoints
|
||||
# git rm -r .ipynb_checkpoints/
|
||||
|
||||
### Linux ###
|
||||
|
||||
# temporary files which can be created if a process still has a handle open of a deleted file
|
||||
.fuse_hidden*
|
||||
|
||||
# KDE directory preferences
|
||||
.directory
|
||||
|
||||
# Linux trash folder which might appear on any partition or disk
|
||||
.Trash-*
|
||||
|
||||
# .nfs files are created when an open file is removed but is still being accessed
|
||||
.nfs*
|
||||
|
||||
### macOS ###
|
||||
# General
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
.com.apple.timemachine.donotpresent
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
### macOS Patch ###
|
||||
# iCloud generated files
|
||||
*.icloud
|
||||
|
||||
### PyCharm+all ###
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/**/usage.statistics.xml
|
||||
.idea/**/dictionaries
|
||||
.idea/**/shelf
|
||||
|
||||
# AWS User-specific
|
||||
.idea/**/aws.xml
|
||||
|
||||
# Generated files
|
||||
.idea/**/contentModel.xml
|
||||
|
||||
# Sensitive or high-churn files
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
.idea/**/dbnavigator.xml
|
||||
|
||||
# Gradle
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
|
||||
# Gradle and Maven with auto-import
|
||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||
# since they will be recreated, and may cause churn. Uncomment if using
|
||||
# auto-import.
|
||||
# .idea/artifacts
|
||||
# .idea/compiler.xml
|
||||
# .idea/jarRepositories.xml
|
||||
# .idea/modules.xml
|
||||
# .idea/*.iml
|
||||
# .idea/modules
|
||||
# *.iml
|
||||
# *.ipr
|
||||
|
||||
# CMake
|
||||
cmake-build-*/
|
||||
|
||||
# Mongo Explorer plugin
|
||||
.idea/**/mongoSettings.xml
|
||||
|
||||
# File-based project format
|
||||
*.iws
|
||||
|
||||
# IntelliJ
|
||||
out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Cursive Clojure plugin
|
||||
.idea/replstate.xml
|
||||
|
||||
# SonarLint plugin
|
||||
.idea/sonarlint/
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
# Editor-based Rest Client
|
||||
.idea/httpRequests
|
||||
|
||||
# Android studio 3.1+ serialized cache file
|
||||
.idea/caches/build_file_checksums.ser
|
||||
|
||||
### PyCharm+all Patch ###
|
||||
# Ignore everything but code style settings and run configurations
|
||||
# that are supposed to be shared within teams.
|
||||
|
||||
.idea/*
|
||||
|
||||
!.idea/codeStyles
|
||||
!.idea/runConfigurations
|
||||
|
||||
### pydev ###
|
||||
.pydevproject
|
||||
|
||||
### Python ###
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
share/python-wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.nox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
*.py,cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
cover/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
db.sqlite3-journal
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
.pybuilder/
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
|
||||
# IPython
|
||||
|
||||
# pyenv
|
||||
# For a library or package, you might want to ignore these files since the code is
|
||||
# intended to run in multiple environments; otherwise, check them in:
|
||||
# .python-version
|
||||
|
||||
# pipenv
|
||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||
# install all needed dependencies.
|
||||
#Pipfile.lock
|
||||
|
||||
# poetry
|
||||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
||||
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||
# commonly ignored for libraries.
|
||||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
||||
#poetry.lock
|
||||
|
||||
# pdm
|
||||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
||||
#pdm.lock
|
||||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
||||
# in version control.
|
||||
# https://pdm.fming.dev/#use-with-ide
|
||||
.pdm.toml
|
||||
|
||||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
||||
__pypackages__/
|
||||
|
||||
# Celery stuff
|
||||
celerybeat-schedule
|
||||
celerybeat.pid
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
.dmypy.json
|
||||
dmypy.json
|
||||
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
|
||||
# pytype static type analyzer
|
||||
.pytype/
|
||||
|
||||
# Cython debug symbols
|
||||
cython_debug/
|
||||
|
||||
# PyCharm
|
||||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
||||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
||||
|
||||
### Python Patch ###
|
||||
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
|
||||
poetry.toml
|
||||
|
||||
# ruff
|
||||
.ruff_cache/
|
||||
|
||||
# LSP config files
|
||||
pyrightconfig.json
|
||||
|
||||
### Vim ###
|
||||
# Swap
|
||||
[._]*.s[a-v][a-z]
|
||||
!*.svg # comment out if you don't need vector files
|
||||
[._]*.sw[a-p]
|
||||
[._]s[a-rt-v][a-z]
|
||||
[._]ss[a-gi-z]
|
||||
[._]sw[a-p]
|
||||
|
||||
# Session
|
||||
Session.vim
|
||||
Sessionx.vim
|
||||
|
||||
# Temporary
|
||||
.netrwhist
|
||||
# Auto-generated tag files
|
||||
tags
|
||||
# Persistent undo
|
||||
[._]*.un~
|
||||
|
||||
### WebStorm ###
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff
|
||||
|
||||
# AWS User-specific
|
||||
|
||||
# Generated files
|
||||
|
||||
# Sensitive or high-churn files
|
||||
|
||||
# Gradle
|
||||
|
||||
# Gradle and Maven with auto-import
|
||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||
# since they will be recreated, and may cause churn. Uncomment if using
|
||||
# auto-import.
|
||||
# .idea/artifacts
|
||||
# .idea/compiler.xml
|
||||
# .idea/jarRepositories.xml
|
||||
# .idea/modules.xml
|
||||
# .idea/*.iml
|
||||
# .idea/modules
|
||||
# *.iml
|
||||
# *.ipr
|
||||
|
||||
# CMake
|
||||
|
||||
# Mongo Explorer plugin
|
||||
|
||||
# File-based project format
|
||||
|
||||
# IntelliJ
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
|
||||
# JIRA plugin
|
||||
|
||||
# Cursive Clojure plugin
|
||||
|
||||
# SonarLint plugin
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
|
||||
# Editor-based Rest Client
|
||||
|
||||
# Android studio 3.1+ serialized cache file
|
||||
|
||||
### WebStorm Patch ###
|
||||
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
|
||||
|
||||
# *.iml
|
||||
# modules.xml
|
||||
# .idea/misc.xml
|
||||
# *.ipr
|
||||
|
||||
# Sonarlint plugin
|
||||
# https://plugins.jetbrains.com/plugin/7973-sonarlint
|
||||
.idea/**/sonarlint/
|
||||
|
||||
# SonarQube Plugin
|
||||
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
|
||||
.idea/**/sonarIssues.xml
|
||||
|
||||
# Markdown Navigator plugin
|
||||
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
|
||||
.idea/**/markdown-navigator.xml
|
||||
.idea/**/markdown-navigator-enh.xml
|
||||
.idea/**/markdown-navigator/
|
||||
|
||||
# Cache file creation bug
|
||||
# See https://youtrack.jetbrains.com/issue/JBR-2257
|
||||
.idea/$CACHE_FILE$
|
||||
|
||||
# CodeStream plugin
|
||||
# https://plugins.jetbrains.com/plugin/12206-codestream
|
||||
.idea/codestream.xml
|
||||
|
||||
# Azure Toolkit for IntelliJ plugin
|
||||
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
|
||||
.idea/**/azureSettings.xml
|
||||
|
||||
### Windows ###
|
||||
# Windows thumbnail cache files
|
||||
Thumbs.db
|
||||
Thumbs.db:encryptable
|
||||
ehthumbs.db
|
||||
ehthumbs_vista.db
|
||||
|
||||
# Dump file
|
||||
*.stackdump
|
||||
|
||||
# Folder config file
|
||||
[Dd]esktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Windows Installer files
|
||||
*.cab
|
||||
*.msi
|
||||
*.msix
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
# End of https://www.toptal.com/developers/gitignore/api/vim,git,macos,linux,pydev,emacs,dotenv,python,windows,webstorm,pycharm+all,jupyternotebooks
|
||||
|
||||
# Integration tests cloud configs
|
||||
tests/integration/cloud-config-*.ini
|
||||
|
||||
|
||||
# VSCode specific extensions
|
||||
.vscode/settings.json
|
||||
.ansible
|
||||
@@ -0,0 +1,244 @@
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
[mypy]
|
||||
# check_untyped_defs = True
|
||||
# disallow_untyped_defs = True
|
||||
|
||||
# strict = True -- only try to enable once everything (including dependencies!) is typed
|
||||
strict_equality = True
|
||||
strict_bytes = True
|
||||
|
||||
warn_redundant_casts = True
|
||||
# warn_return_any = True
|
||||
warn_unreachable = True
|
||||
|
||||
exclude = tests/integration/targets/django_.*/files/.*
|
||||
|
||||
[mypy-ansible.*]
|
||||
# ansible-core has partial typing information
|
||||
follow_untyped_imports = True
|
||||
|
||||
# The following imports are Python packages that:
|
||||
# 1. We do not install (we can't install everything!);
|
||||
# 2. That have type stubs, but we don't install them (again, we can't install everything!); or
|
||||
# 3. That have no types and type stubs.
|
||||
[mypy-aerospike.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-antsibull_nox.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-asyncore.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-boto3.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-bs4.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-cgi.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-chef.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-consul.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-credstash.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-crypt.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-daemon.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-datadog.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-dbus.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-delinea.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-dnf.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-dnsimple.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-etcd3.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-flatdict.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-footmark.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-fqdn.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-func.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-gi.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-github3.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-gssapi.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-hashids.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-heroku3.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-hpe3parclient.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-hpe3par_sdk.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-hpilo.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-hpOneView.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-httmock.*] # TODO!
|
||||
ignore_missing_imports = True
|
||||
[mypy-influxdb.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-jc.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-jenkins.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-jmespath.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-jsonpatch.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-kazoo.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-keyring.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-keystoneauth1.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-layman.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-ldap.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-legacycrypt.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-libcloud.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-linode.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-linode_api4.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-lmdb.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-logdna.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-logstash.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-lxc.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-manageiq_client.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-matrix_client.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-memcache.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-nc_dnsapi.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-nomad.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-nopackagewiththisname.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-nox.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-oci.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-oneandone.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-opentelemetry.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-ovh.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-ovirtsdk.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-packet.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-paho.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-pam.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-pdpyras.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-petname.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-pingdom.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-pkg_resources.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-portage.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-potatoes_that_will_never_be_there.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-prettytable.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-pubnub_blocks_client.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-pushbullet.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-pycdlib.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-pydantic.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-pyghmi.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-pylxca.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-pymssql.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-pyodbc.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-pyone.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-pypureomapi.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-pysnmp.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-pyxcli.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-rpm.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-ruamel.yaml.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-salt.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-selinux.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-semantic_version.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-sendgrid.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-seobject.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-sha.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-smtpd.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-smtpd_tls.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-SoftLayer.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-spotinst_sdk.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-statsd.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-storops.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-taiga.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-thycotic.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-tomlkit.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-univention.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-vexatapi.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-websocket.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-XenAPI.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-xkcdpass.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-xmljson.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-xmltodict.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-xmpp.*]
|
||||
ignore_missing_imports = True
|
||||
[mypy-zstandard.*]
|
||||
ignore_missing_imports = True
|
||||
@@ -0,0 +1,13 @@
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# SPDX-FileCopyrightText: 2025 Alexei Znamensky <russoz@gmail.com>
|
||||
|
||||
repos:
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
# Ruff version.
|
||||
rev: v0.15.9
|
||||
hooks:
|
||||
# Run the linter.
|
||||
- id: ruff-check
|
||||
# Run the formatter.
|
||||
- id: ruff-format
|
||||
@@ -0,0 +1,52 @@
|
||||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
extends: default
|
||||
|
||||
ignore: |
|
||||
/changelogs/
|
||||
|
||||
rules:
|
||||
line-length:
|
||||
max: 1000
|
||||
level: error
|
||||
document-start: disable
|
||||
document-end: disable
|
||||
truthy:
|
||||
level: error
|
||||
allowed-values:
|
||||
- 'true'
|
||||
- 'false'
|
||||
indentation:
|
||||
spaces: 2
|
||||
indent-sequences: true
|
||||
key-duplicates: enable
|
||||
trailing-spaces: enable
|
||||
new-line-at-end-of-file: disable
|
||||
hyphens:
|
||||
max-spaces-after: 1
|
||||
empty-lines:
|
||||
max: 2
|
||||
max-start: 0
|
||||
max-end: 0
|
||||
commas:
|
||||
max-spaces-before: 0
|
||||
min-spaces-after: 1
|
||||
max-spaces-after: 1
|
||||
colons:
|
||||
max-spaces-before: 0
|
||||
max-spaces-after: 1
|
||||
brackets:
|
||||
min-spaces-inside: 0
|
||||
max-spaces-inside: 0
|
||||
braces:
|
||||
min-spaces-inside: 0
|
||||
max-spaces-inside: 1
|
||||
octal-values:
|
||||
forbid-implicit-octal: true
|
||||
forbid-explicit-octal: true
|
||||
comments:
|
||||
min-spaces-from-content: 1
|
||||
comments-indentation: false
|
||||
@@ -0,0 +1,482 @@
|
||||
# Rules for community.general
|
||||
|
||||
## Scope Discipline
|
||||
|
||||
- Stay strictly within the scope of the current task or branch. Do not add extra changes,
|
||||
improvements, or cleanups unless explicitly requested.
|
||||
- Do not introduce deprecations as a side effect of other changes. Only add a deprecation
|
||||
when the branch/PR is specifically about that deprecation.
|
||||
- When in doubt about whether a change is in scope, ask before making it.
|
||||
|
||||
## Ansible Collection
|
||||
|
||||
- This collection follows Semantic Versioning.
|
||||
- Being an Ansible collection, its version number is specified in the `galaxy.yml`.
|
||||
- The version set there, for the `main` branch is the next version to be released that accepts new features.
|
||||
- For this collection, you will want to read the description
|
||||
of the issue: https://github.com/ansible-collections/community.general/issues/11482
|
||||
- The guidelines for contributors are found in the `CONTRIBUTING.md`.
|
||||
- It is very important to maintain backwards compatibility in the changes.
|
||||
- When something needs to change and break that, a longer process must be taken,
|
||||
involving deprecations and sometimes feature flags to enable the new behavior.
|
||||
- Deprecations usually plan for the removal of the deprecated code in two major versions (X+2).0.0 from
|
||||
the current version. Depending on the situation, this target may be pushed for the (X+3).0.0 version.
|
||||
- If a deprecation is needed, ingest https://github.com/russoz-ansible/ansible-contrib-unofficial/blob/main/deprecations.md for more information on how to implement the deprecations.
|
||||
- Always refer to modules and plugins by their FQCN.
|
||||
- Use `version_added` to record in which version something new became available:
|
||||
- Always read `galaxy.yml` from current `main` and use that version string directly — it holds the next version for a feature release.
|
||||
- New module or plugin: set `version_added` at the top level of `DOCUMENTATION`.
|
||||
- New option or suboption in an existing module or plugin: set `version_added` in that option's documentation.
|
||||
Options that come together with a new module or plugin do not need it.
|
||||
- New option or suboption in a doc fragment: do not set `version_added` in the doc fragment itself.
|
||||
Instead, in each module or plugin using the fragment that existed before that version, add only
|
||||
`version_added` for that option under `options` (see the `token` option in `consul_session.py`).
|
||||
Keys set there replace the same keys from the fragment, all other keys are kept.
|
||||
- New choice value or new alias for an existing option: there is no `version_added` field for these,
|
||||
so add a paragraph to the option's `description` instead, for example:
|
||||
```yaml
|
||||
- The value V(all) has been added in community.general 13.5.0.
|
||||
- The O(client_id) alias has been added in community.general 13.5.0.
|
||||
```
|
||||
- Do not add or change `version_added` for things that already existed.
|
||||
- Once that version is released, the value is stale. After rebasing, or when a release happened while
|
||||
the PR was open, read `galaxy.yml` from the updated `main` again and update every `version_added` (and description note) added by the PR.
|
||||
|
||||
## Licensing and Copyright
|
||||
|
||||
This project abides to the REUSE specification from the Free Software Foundation.
|
||||
They provide a tool, `reuse`, to check for compliance; the command `nox -e license-check`
|
||||
can be used to perform that check, but only when a marker is added, changed or removed.
|
||||
|
||||
### Licensing and Copyright Rules
|
||||
|
||||
- All new content added to this collection must fall under the GPL-3 license.
|
||||
- Every file should have a license and copyright markers.
|
||||
- These markers should be placed as comments by the beginning of the file.
|
||||
If the file has a "shebang", then it should start in line 2, otherwise, in line 1.
|
||||
Alternatively, the license should be placed in another file
|
||||
with the exact same name, plus a suffix `.license`, when:
|
||||
- The file format does not allow comments.
|
||||
- The file is automatically generated by some process.
|
||||
- The directory `changelog/fragments` is exempt from this rule, as defined in `REUSE.toml`.
|
||||
- The format of the marker will typically consist of 3 or more lines. Example:
|
||||
```
|
||||
# Copyright (c) 2018, Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
```
|
||||
There might be multiple Copyright lines, for different authors.
|
||||
- Whenever you create a new copyright marker, check the current date and use the current year.
|
||||
- Do not update dates in existing copyright markers.
|
||||
|
||||
## Deprecation Rules
|
||||
|
||||
Reference guide: https://github.com/russoz-ansible/ansible-contrib-unofficial/blob/main/deprecations.md
|
||||
|
||||
### Deprecating a parameter with no default value
|
||||
|
||||
Use `removed_in_version` + `removed_from_collection` in `argument_spec`, plus a description note in the docs.
|
||||
|
||||
### Deprecating a parameter that has a default value
|
||||
|
||||
Do NOT use `removed_in_version` — it triggers on every run because the parameter is always resolved (via its default), even when the user never explicitly set it.
|
||||
|
||||
Instead:
|
||||
- Remove `default` from `argument_spec`
|
||||
- Remove `default:` from the docs; describe the old default in the description text alongside the deprecation note
|
||||
- In `main()`, detect `None` (meaning the user didn't set it), apply the old default manually, and call:
|
||||
```python
|
||||
module.deprecate(
|
||||
"The <param> option will be removed ...",
|
||||
version="X.Y.0",
|
||||
collection_name="community.general",
|
||||
)
|
||||
```
|
||||
Depending on the option, only call `module.deprecate()` if the changing default has an effect on the task.
|
||||
|
||||
### Removal target versions
|
||||
|
||||
- Default: plan removal at `(X+2).0.0` from the current major version
|
||||
- May be pushed to `(X+3).0.0` depending on the situation
|
||||
|
||||
|
||||
## Writing plugin code
|
||||
|
||||
- Modules and module utils run on the target nodes, other plugins run on the controller.
|
||||
Check https://github.com/ansible-collections/community.general/issues/11482 for the lowest Python version
|
||||
supported on each side, and do not use language or standard library features newer than that
|
||||
(e.g. `str.removesuffix()` requires Python 3.9).
|
||||
- Access module parameters with `module.params["name"]`, not `module.params.get("name")`:
|
||||
every option declared in the argument spec is always present, set to `None` when it has no value and no default.
|
||||
- `module.params.get("name", <fallback>)` is misleading, since the fallback is never used.
|
||||
Declare a `default` in the argument spec instead.
|
||||
- The same applies to the suboptions of a `dict` option, when that option is set.
|
||||
- When working on a module that still uses `.get()`, use `[]` in the code being added or changed.
|
||||
- Unit tests that mock `module.params` must provide all options of the argument spec.
|
||||
- Type hints:
|
||||
- Use `import typing as t`, not `from typing import ...`.
|
||||
- Use `X | None` instead of `t.Optional[X]`.
|
||||
- Do not use `t.Any` for objects from third-party libraries, it disables type checking for them.
|
||||
- In filter and test plugins, the input can be anything the user passes: type it as `t.Any` and validate it.
|
||||
- In modules, type the argument spec and the return values with the helper types from
|
||||
`plugins/module_utils/_typing.py`:
|
||||
- Import them, and define the types built from them, inside an `if t.TYPE_CHECKING: # pragma: no cover` block.
|
||||
They are only used in annotations, which are not evaluated at runtime (`from __future__ import annotations`).
|
||||
- Build the argument spec in a function `get_argument_spec() -> ArgumentSpecT`, and pass its result to `AnsibleModule()`.
|
||||
- Type the result dictionary as a `TypedDict` that combines the `ModuleReturn*` types for the standard
|
||||
return values (`changed`, `msg`, `rc`, `stdout`, `stderr`, `backup_file`, `diff`) with the module-specific ones.
|
||||
The `*Req` variants make the key required.
|
||||
```python
|
||||
if t.TYPE_CHECKING: # pragma: no cover
|
||||
from ansible_collections.community.general.plugins.module_utils._typing import (
|
||||
ArgumentSpecT,
|
||||
ModuleReturnBackupFile,
|
||||
ModuleReturnChangedReq,
|
||||
ModuleReturnDiff,
|
||||
)
|
||||
|
||||
class ResultDict(ModuleReturnChangedReq, ModuleReturnBackupFile, ModuleReturnDiff[str]):
|
||||
config_file: str
|
||||
config_content: str | None
|
||||
enabled_state: bool
|
||||
|
||||
|
||||
def get_argument_spec() -> ArgumentSpecT:
|
||||
return dict(
|
||||
name=dict(type="str", required=True, aliases=["config_name"]),
|
||||
state=dict(type="str", choices=["present", "absent"], default="present"),
|
||||
config_dir=dict(type="path", default="/etc/logrotate.d"),
|
||||
paths=dict(type="list", elements="path"),
|
||||
)
|
||||
```
|
||||
- When handling user-provided data structures, use `collections.abc.Mapping`, `collections.abc.Sequence`, and
|
||||
`ansible.module_utils.common.collections.is_sequence` instead of checking for `dict` and `list`.
|
||||
- Compile regular expressions once, outside of loops, and use the compiled object inside the loop.
|
||||
- Do not place code or constants (other than conditional imports) before the imports. Imports come after
|
||||
the `DOCUMENTATION`, `EXAMPLES`, and `RETURN` strings.
|
||||
- Do not use names starting with `_` for variables or methods in module files.
|
||||
- Avoid redundant code, for example:
|
||||
- Conversions to a type the value already has (`str()` on a string, `bool()` on a boolean, `str(e)` inside an f-string).
|
||||
- `if changed == True:` instead of `if changed:`.
|
||||
- `x if x is not None else ""` where `x or ""` does the same.
|
||||
- Comments that only restate the code.
|
||||
- Extract code that is repeated (e.g. building the same URL in several places) into a function.
|
||||
|
||||
|
||||
## Writing plugin documentation
|
||||
|
||||
- Use semantic markup: `O()` for options, `V()` for values, `RV()` for return values, `C()` for code, commands, and paths.
|
||||
See https://docs.ansible.com/projects/ansible/latest/dev_guide/ansible_markup.html.
|
||||
- Each `description` is a list of paragraphs:
|
||||
- Do not split a sentence over two list items.
|
||||
- Keep information about the same subject in the same paragraph.
|
||||
- Do not list the possible values in the `description` when the option has `choices`, they are rendered automatically.
|
||||
- When documenting what each choice does, prefer making `choices` a dictionary that maps each value to its
|
||||
description, instead of explaining the values in the option's `description`. Each value's description can be
|
||||
a string or a list of paragraphs. Use:
|
||||
```yaml
|
||||
description:
|
||||
- The mode of the node.
|
||||
choices:
|
||||
normal: Utilizes this node as much as possible.
|
||||
exclusive:
|
||||
- Only builds jobs with label expressions matching this node.
|
||||
- Additional paragraph.
|
||||
```
|
||||
instead of:
|
||||
```yaml
|
||||
description:
|
||||
- The mode of the node.
|
||||
- If V(normal), utilizes this node as much as possible.
|
||||
- If V(exclusive), only builds jobs with label expressions matching this node.
|
||||
choices: [normal, exclusive]
|
||||
```
|
||||
- Values of `state` describe the resulting state (`present`, `absent`, `built`, `initialized`), not the command run to reach it (`build`, `init`).
|
||||
- Describe boolean options by what happens when they are V(true).
|
||||
- Do not add aliases to options unless strictly necessary.
|
||||
- In new features, use the current terminology of the tool or service being managed, not legacy names.
|
||||
- State explicitly any behavior that is not obvious for users who are not Python programmers, for example:
|
||||
- Comparing values with equality treats `0` and `false` (and `1` and `true`) as equal.
|
||||
- `re.match()` only matches at the beginning of the string.
|
||||
- A list value must be passed nested inside another list when the option takes a list of values.
|
||||
- Attributes:
|
||||
- Add `community.general._attributes` to `extends_documentation_fragment`.
|
||||
- Under each attribute set `support` and, when needed, `details`. Do not set `description`, it comes from the doc fragment.
|
||||
- Use `details` to explain limitations; it is usually not needed for `support: full`.
|
||||
- Keep lines in `EXAMPLES` short: move long values into `vars:` or use YAML folded scalars.
|
||||
- Separate the `DOCUMENTATION`, `EXAMPLES`, and `RETURN` strings with a blank line.
|
||||
|
||||
|
||||
## Check mode, diff mode, and idempotency
|
||||
|
||||
- In check mode the module must not change anything, but it must report the same `changed` value a real run would.
|
||||
Do not return a fixed `changed` value in check mode.
|
||||
- Determine `changed` by comparing the requested state with the current state of the system or service.
|
||||
Do not report `changed=true` just because an action was performed: many APIs and commands are idempotent
|
||||
and do not tell whether anything changed.
|
||||
- An attribute (`check_mode`, `diff_mode`) may only declare `support: full` if every code path honors it.
|
||||
Otherwise declare `support: partial` and explain the limitation in `details`.
|
||||
New states and options added to a module that declares `full` support must honor it as well.
|
||||
- Normalize values before comparing them, so that equivalent values do not produce a change on every run
|
||||
(e.g. `None` versus `""`, human-readable sizes versus bytes).
|
||||
- In diff mode, return `diff` with `before` and `after`. When the content of a file is compared, also set
|
||||
`before_header` and `after_header` to the paths, the same way `ansible.builtin.copy` does.
|
||||
|
||||
|
||||
## Validating input and designing behavior
|
||||
|
||||
- Express constraints between options in the argument spec (`required_if`, `required_together`, `required_one_of`,
|
||||
`required_by`, `mutually_exclusive`). Only check in code what the argument spec cannot express.
|
||||
- Reject contradictory or meaningless combinations of options. Do not silently pick one of them or ignore the other.
|
||||
- Never silently transform, discard, or ignore user input:
|
||||
- If the input cannot be applied as given, fail with a clear message.
|
||||
- If a lenient behavior is useful, make it configurable (e.g. `fail`, `warn`, `ignore`) with failing as the default.
|
||||
- If an operation requires an existing object (e.g. archiving a project), fail when it does not exist.
|
||||
- When the module has to make an assumption (e.g. the server version cannot be determined), emit a warning with `module.warn()`.
|
||||
- When wrapping a CLI tool or an API, pass on its warnings and errors instead of re-implementing its checks.
|
||||
- Prefer backward compatible, additive changes, such as a new choice value or a new alias, over changing defaults
|
||||
or deprecating options.
|
||||
- Prefer `choices` with descriptive strings over booleans when the meaning of `true`/`false` is not obvious.
|
||||
- Keep messages neutral and accurate, e.g. "Project not found" instead of "Project deleted or does not exist".
|
||||
- Do not add options or safeguards that nobody asked for. They can be added later when there is an actual need.
|
||||
|
||||
|
||||
## Writing changelog fragments
|
||||
|
||||
Changelog Fragments:
|
||||
|
||||
- MUST be created for modifications in the productive code (mostly code under `plugins/`)
|
||||
- MUST NOT be created for:
|
||||
- New modules or new plugins, including changes to module utils or plugin utils that only affect the new module or plugin.
|
||||
Changes to those utils that affect previously existing modules or plugins MUST be recorded.
|
||||
- Changes touching only documentation, comments, and/or tests.
|
||||
- MUST be files in `changelogs/fragments` named as `<PR number>-<some description, possibly matching the branch name>.yml`.
|
||||
- MUST have a dict as the top-level element, and the keys MUST be one of: minor_changes, breaking_changes, deprecated_features, removed_features, bugfixes.
|
||||
- MUST list, under each top-level element, one entry for each plugin changed or affected by the PR.
|
||||
- MUST use the format:
|
||||
```
|
||||
- <component spec> - <description> (<URLs>).
|
||||
```
|
||||
for the entries.
|
||||
- The "component spec" is different for different types of plugins, in this order:
|
||||
- Modules (`plugins/modules`): "<plugin-name>" (or <module-name>)
|
||||
- Module utils (`plugins/module_utils`): "<plugin-name> module utils"
|
||||
- Plugin utils (`plugins/plugin_utils`): "<plugin-name> plugin utils"
|
||||
- All other plugins (`plugins/<PLUGIN_TYPE>/`): "<plugin-name> <PLUGIN_TYPE> plugin"
|
||||
- Groups of related modules or plugins may share one entry using a wildcard, with exclusions if needed
|
||||
(e.g. "ldap_* modules", "foo_* modules except foo_bar").
|
||||
- Plugin filenames starting with `_` are generally not to be added to the changelog fragment. When a change in such a file
|
||||
affects previously existing modules or plugins:
|
||||
- If the change is relevant to users of those modules or plugins (e.g. it fixes a bug or changes their behavior),
|
||||
add entries for the affected modules or plugins, using wildcards where possible.
|
||||
- If the change is not visible to users (e.g. a refactoring), add a single entry for the utils file instead
|
||||
(e.g. "_cmd_runner module utils").
|
||||
- The description MUST be a **single short sentence** stating what changed, from the user's perspective.
|
||||
Do NOT explain why the change was made, how it was implemented, or what Python constructs were used. Do not provide examples of values.
|
||||
The audience is end users and operators, not developers; avoid implementation details.
|
||||
No need to provide details that can be found in the issue or in the PR.
|
||||
That content should be in RST format, so for example symbol names must be enclosed in double back ticks, as in "``symbol``".
|
||||
Use American English spelling (e.g. "behavior" not "behaviour", "customize" not "customise").
|
||||
Description must start with lower-case - do not capitalize the first word.
|
||||
Acronyms are always written in upper-case, anywhere in the description, including as the first word (e.g. "API", "URL").
|
||||
If the description contains `: `, quote the entire entry to prevent YAML errors.
|
||||
- The URLs - **every entry MUST include the full URL of the PR itself**, no exceptions.
|
||||
An entry without the PR URL is invalid, even if it links one or more issues.
|
||||
If the PR fixes one or more issues, the URLs of those issues MUST be included as well, preferably before the PR URL.
|
||||
The URLs must be separated with `, `. For example:
|
||||
```yaml
|
||||
bugfixes:
|
||||
- xfconf - fix idempotency for list values (https://github.com/ansible-collections/community.general/issues/1234, https://github.com/ansible-collections/community.general/pull/5678).
|
||||
```
|
||||
- SHOULD NOT mix `bugfixes` with other changes: fixes are backported and no new features should come along
|
||||
- SHOULD NOT mix `deprecated_features` with other changes
|
||||
|
||||
|
||||
Given the fact that the PR number is required for the file name and for the URLs part of the entry,
|
||||
the fragment must be generated (then committed and pushed) after the PR is first created.
|
||||
Do not write the fragment before the PR exists, and never leave out the PR URL or use a placeholder for it.
|
||||
|
||||
After drafting a changelog fragment, always present it to the user for review and explicit
|
||||
approval before committing or pushing it.
|
||||
|
||||
## BOTMETA Rules
|
||||
|
||||
- Add an entry to the `.github/BOTMETA.yml` file every time a new file is added within the paths:
|
||||
- docs/docsite/rst/**
|
||||
- plugins/**
|
||||
- The entry should be placed within the existing section where it belongs,
|
||||
and within that section, files should be listed on alphabetical order.
|
||||
- User handles are never removed, unless explicitly requested.
|
||||
|
||||
## Git usage
|
||||
|
||||
- Never mention any user or group with `@` in the commit message.
|
||||
- Before committing changes:
|
||||
- Ensure you are in the right branch
|
||||
- If containing _code_ changes, look for unit and integration tests and apply them as possible
|
||||
- When branching:
|
||||
- Always ensure you are branching off the `main` branch
|
||||
- Do not use `fix` or any other prefix indicating the type of the branch
|
||||
- If there is an issue associated with the branch, prefix the name with `####-` (where #### is the issue number), e.g. if fixing issue 9999 about the xfconf module, name it like `9999-xfconf-something`.
|
||||
|
||||
## Github Issues Rules
|
||||
|
||||
- Classify issues correctly: features are not bugfixes even if they address a gap or missing
|
||||
behavior. Use the issues template's categories accurately.
|
||||
- For an issue to be considered a bug, it must refer to a behavior promised in the
|
||||
plugin documentation or something that defeats its purpose. Elective preferences are not bugs. Missing features are not bugs.
|
||||
|
||||
- The "Community.general Version" and "Ansible Version" fields must report the versions used to detect the problem and they should be
|
||||
supported versions of: the collection itself, ansible-core, Python.
|
||||
|
||||
- MUST use one of the templates in `.github/ISSUE_TEMPLATE`
|
||||
- Component name: one per line, use the relative path in the repo, one per line
|
||||
- Community.general version: if bug exists in `main` branch, simply state so.
|
||||
- Do generate the Code of Conduct checkbox - I am responsible for what you do, my child
|
||||
- When the issue is about code:
|
||||
|
||||
The issue title must follow:
|
||||
| Case | Format | Example |
|
||||
| --- | --- | --- |
|
||||
| Module issue | `<name>: <summary>` | `postgresql_db: fails when password contains special characters` |
|
||||
| Non-module plugin | `<name> <type> plugin: <summary>` | `passwordstore lookup plugin: add support for multiline secrets` |
|
||||
| New plugin request | `<name>: new module` or `<name>: new <type> plugin` | `proxmox_vm: new module` |
|
||||
| Multiple related plugins | `<common_prefix>*: <summary>` | `proxmox*: multiple modules fail with newer API versions` |
|
||||
| Multiple unrelated plugins | `multiple: <summary>` | `multiple: deprecation warnings not shown correctly` |
|
||||
|
||||
- Use lowercase for the summary part (after the colon).
|
||||
- Strip noise words: "Issue with", "Bug:", "[BUG]", "[FR]", "Request:".
|
||||
- When in doubt about the plugin name, skim the issue body for FQCN references or task examples.
|
||||
|
||||
- When the issue is NOT about code:
|
||||
|
||||
An issue title like below is _suggested_ (never enforced) to the user:
|
||||
|
||||
| Case | Format | Example |
|
||||
| --- | --- | --- |
|
||||
| Non-plugin (CI, docs, infra) | `docs:`, `CI:`, `testing:`, `build:`, `meta:` prefix | `docs: update contribution guidelines` |
|
||||
|
||||
|
||||
## Github Pull Request Rules
|
||||
|
||||
- MUST use the template `.github/pull_request_template.md`
|
||||
- MUST create the PR in the upstream repository
|
||||
- Classify PRs correctly: features are not bugfixes even if they address a gap or missing
|
||||
behavior. Use the PR template's categories accurately.
|
||||
- Do not comment in the description about the state of the changelog fragment.
|
||||
- The PR title should be in one of the forms:
|
||||
- `<module>: <short-description>` e.g. `xfconf: adjust return value`
|
||||
- `<plugin> <plugin-type> plugin: <short-description>` e.g. `pbrun become plugin: refactor function xyz()`
|
||||
- `new module/<plugin-type> plugin: <name> <short-description>` e.g. `new module: xyz interacts with XyZ service` or
|
||||
`new inventory plugin: abc retrieves hosts from ABC daemon`
|
||||
- PR title should use short names for modules/plugins, e.g. `xfconf` instead of `community.general.xfconf`
|
||||
- PR title should use single backticks for terms like commands, variables, functions, etc. E.g. "xfconf: use command `xfconf-query`"
|
||||
- PR title may have a prefix indicating it is a work in progress. E.g. "[WIP] xfconf: use command `xfconf-query`"
|
||||
- If the PR fixes issues, add one line with `Fixes #<issue-number>` for each issue being solved to the PR description
|
||||
- Do not create an issue for the PR after creating the PR.
|
||||
- Do not place GitHub closing keywords (`close`, `fix`, `resolve` and their variants) right before an issue reference
|
||||
unless the PR fixes that issue: GitHub links the issue even if the sentence negates it (e.g. "does not close #1234").
|
||||
Write "issue #1234" instead.
|
||||
- Bugfixes and security fixes may be backported to older stable branches; new features are not.
|
||||
The classification of the PR determines that.
|
||||
- When the PR is ready for review, mark it as ready (not draft) and remove any `[WIP]` prefix from the title.
|
||||
- When a fix is speculative or lacks test coverage, use hedged language in the PR description (e.g. "may address" rather than "this fixes").
|
||||
- Keep PR descriptions concise; do not explain implementation choices or reproduce information already visible in the diff or commit messages.
|
||||
- Do NOT list the tests run locally (sanity, unit, integration, or manual runs) nor their results.
|
||||
They are only relevant to the author; CI runs the tests for the PR.
|
||||
Exception: when integration tests affected by the PR do not run in CI (e.g. the target is marked as `disabled` or
|
||||
`unsupported`), briefly state which of them were run locally and on which platforms.
|
||||
- Code in the PR description MUST be limited to one small snippet demonstrating the change, e.g. a single task.
|
||||
Do NOT include full playbooks, long task lists, or long code blocks in any language.
|
||||
If a longer reproducer or example is useful, post it later in a separate PR comment.
|
||||
- Fence all code blocks with the proper language tag: `yaml` for Ansible code, `python` for Python code, and so on.
|
||||
|
||||
## Tests
|
||||
|
||||
### Running Tests
|
||||
|
||||
- Run sanity tests with: `ansible-test sanity --docker default --python 3.14 <files>`
|
||||
(omit files to test everything)
|
||||
- Run unit tests with: `ansible-test units --docker default --python 3.14 tests/unit/plugins/<plugin_type>/<test_file.py>`
|
||||
(omit the path to test everything)
|
||||
- Run integration tests with: `ansible-test integration --docker default --python 3.14 <target name>`
|
||||
(omit target to test everything, but that is discouraged as it takes a long while)
|
||||
- Some integration tests require a proper OS container (`ubuntu`, `fedora`, `alpine`) instead of the default container (`default`).
|
||||
For OS containers, do not specify `--python <version>`.
|
||||
- Some integration tests must run on a full VM, not in a container (e.g. `snap`)
|
||||
- PRs are only merged into `main` if they pass the tests
|
||||
- Do not re-run a test suite that already passed in the current session unless new code changes have been made since the last run.
|
||||
|
||||
## Writing unit tests
|
||||
|
||||
- Prefer `pytest` idioms to write tests
|
||||
- Prefer plain functions instead of Test classes
|
||||
- Use pytest fixtures when applicable
|
||||
- Avoid unittest class-based tests
|
||||
- Use `mocker` to mock patch symbols
|
||||
- Use the common tools from `community.internal_test_tools` when applicable, instead of reinventing the wheel.
|
||||
- E.g. `ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils.set_module_args`
|
||||
- When testing modules that call CLI commands, prefer `uthelper`. Other tests can be mixed with the `UTHelper` call.
|
||||
- Try and avoid adding new entries to the `tests/unit/requirements.txt` file, as it is installed every time,
|
||||
for every unit testing, no matter how small or unrelated to the requirements it might be.
|
||||
- Tests should:
|
||||
- Mock all interaction with external services, APIs, commands
|
||||
- NEVER mock the entire module - it defeats the purpose of the testing. Instead, run the module
|
||||
and capture the `SystemExit` exception from it.
|
||||
- Assert the "happy-path" for the module execution.
|
||||
There might be multiple ones (changes, no changes, partial changes).
|
||||
- Assert some exception paths (when things go wrong) are handled as gracefully as possible
|
||||
- NOT assert Ansible features, e.g. if two parameters are marked in the argument spec as
|
||||
mutually exclusive, there is no need to write a test to verify that they cannot be used together.
|
||||
It is a given, and `ansible-core` has plenty of tests for those.
|
||||
- NOT assert static data, such as the contents of the argument spec.
|
||||
- Assert negative outcomes where relevant, i.e. that something was _not_ done
|
||||
(e.g. no command executed in check mode, only the expected values registered as secrets).
|
||||
- Do not add `if __name__ == "__main__":` blocks to unit test scripts.
|
||||
- Do not patch `sys.modules` to inject mocks. Import the module normally and patch symbols with `mocker`.
|
||||
|
||||
## Writing integration tests
|
||||
|
||||
- The generic documentation on integration tests is found at: https://docs.ansible.com/projects/ansible/latest/dev_guide/testing_integration.html
|
||||
- Each directory under `tests/integration/targets` is akin to an Ansible role
|
||||
- The `aliases` files contains directives that control how/where the tests are executed.
|
||||
- More info on the aliases is found at: https://docs.ansible.com/projects/ansible/latest/dev_guide/testing/sanity/integration-aliases.html
|
||||
- Targets named `setup_*` are actual supporting roles. Some noteworthy ones:
|
||||
- `setup_remote_tmp_dir`
|
||||
- `setup_snap`
|
||||
- `setup_docker`
|
||||
- `setup_pkg_mgr`
|
||||
- Tests should:
|
||||
- Interact with the actual external services, APIs, commands
|
||||
- This may not be feasible for some third party services requiring authentication, paid services, etc
|
||||
- Use local alternatives as possible, e.g. docker images (use `setup_docker`)
|
||||
- Be implemented in a "black-box" style: we provide inputs and assert the outputs, not interested in the internal details
|
||||
- Assert idempotency, i.e. run the same command twice and assert the second time bears no change
|
||||
- One repeated run is enough to verify idempotency
|
||||
- Also test changing an attribute of an object that already exists in the requested state
|
||||
- Assert only the values the test changed, not entire configurations or outputs
|
||||
- Test error paths with a regular task using `ignore_errors: true` and `register`, then assert that the result
|
||||
`is failed` and that its `msg` contains the expected error. Do not write and execute separate playbooks for that.
|
||||
- Use FQCNs everywhere, including lookups and filters (e.g. `lookup('ansible.builtin.template', ...)`)
|
||||
- Use distinct, descriptive names for registered variables
|
||||
- Not depend on variables that can only be set on the command line - CI cannot set them
|
||||
- Keep resource usage (disk images, downloads) as small as possible, CI VMs have limited resources
|
||||
- For targets that only work on some platforms:
|
||||
- Add `skip/<platform>` entries (e.g. `skip/macos`, `skip/freebsd`, `skip/alpine`) to `aliases`
|
||||
- Also skip unsupported systems at the start of the tasks, before installing packages or doing any other setup work,
|
||||
since the aliases do not cover every environment CI uses (e.g. `skip/alpine` does not skip the Alpine container)
|
||||
- Do not add precondition assertions or messages explaining why something is skipped, they only add noise
|
||||
- For modules with larget sets of functions, break the tests into smaller files and use `include_tasks`
|
||||
|
||||
## Use of AI for contributions
|
||||
|
||||
**Please note that using AI is accepted but you MUST comply with the [Ansible Community Policy for AI-Assisted Contributions](https://docs.ansible.com/projects/ansible/devel/community/ai_policy.html)**!
|
||||
|
||||
The main points are:
|
||||
|
||||
- Be transparent: disclose the use of AI when a significant part of the contribution is taken from the AI output
|
||||
without significant changes. Grammar, spelling, and style corrections do not need disclosure.
|
||||
- In commits, add a trailer `Assisted-by: <model>`, e.g. `Assisted-by: Claude Opus 5.5`.
|
||||
- In issues, PR descriptions, and comments, add a short note stating that AI was used.
|
||||
- Contributions assisted by AI must follow the project's standards and guidelines, including this file.
|
||||
- The contributor is fully accountable for the contribution, with or without AI assistance.
|
||||
@@ -0,0 +1,3 @@
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
SPDX-FileCopyrightText: Ansible Project
|
||||
@@ -0,0 +1,651 @@
|
||||
# Community General Release Notes
|
||||
|
||||
**Topics**
|
||||
|
||||
- <a href="#v14-0-1">v14\.0\.1</a>
|
||||
- <a href="#release-summary">Release Summary</a>
|
||||
- <a href="#minor-changes">Minor Changes</a>
|
||||
- <a href="#bugfixes">Bugfixes</a>
|
||||
- <a href="#v14-0-0">v14\.0\.0</a>
|
||||
- <a href="#release-summary-1">Release Summary</a>
|
||||
- <a href="#minor-changes-1">Minor Changes</a>
|
||||
- <a href="#breaking-changes--porting-guide">Breaking Changes / Porting Guide</a>
|
||||
- <a href="#deprecated-features">Deprecated Features</a>
|
||||
- <a href="#removed-features-previously-deprecated">Removed Features \(previously deprecated\)</a>
|
||||
- <a href="#security-fixes">Security Fixes</a>
|
||||
- <a href="#bugfixes-1">Bugfixes</a>
|
||||
- <a href="#new-plugins">New Plugins</a>
|
||||
- <a href="#callback">Callback</a>
|
||||
- <a href="#filter">Filter</a>
|
||||
- <a href="#lookup">Lookup</a>
|
||||
- <a href="#new-modules">New Modules</a>
|
||||
|
||||
This changelog describes changes after version 13\.0\.0\.
|
||||
|
||||
<a id="v14-0-1"></a>
|
||||
## v14\.0\.1
|
||||
|
||||
<a id="release-summary"></a>
|
||||
### Release Summary
|
||||
|
||||
Bugfix release for inclusion in Ansible 15\.0\.0rc1\.
|
||||
|
||||
<a id="minor-changes"></a>
|
||||
### Minor Changes
|
||||
|
||||
* sysrc \- remove case that occurred for FreeBSD 11 and prior \([https\://github\.com/ansible\-collections/community\.general/pull/13185](https\://github\.com/ansible\-collections/community\.general/pull/13185)\)\.
|
||||
|
||||
<a id="bugfixes"></a>
|
||||
### Bugfixes
|
||||
|
||||
* archive \- do not add the destination archive to itself when it is located under one of the archived paths \([https\://github\.com/ansible\-collections/community\.general/issues/1420](https\://github\.com/ansible\-collections/community\.general/issues/1420)\, [https\://github\.com/ansible\-collections/community\.general/pull/13208](https\://github\.com/ansible\-collections/community\.general/pull/13208)\)\.
|
||||
* btrfs module utils \- fix path of nested subvolumes when a parent subvolume is inside a directory \([https\://github\.com/ansible\-collections/community\.general/issues/7454](https\://github\.com/ansible\-collections/community\.general/issues/7454)\, [https\://github\.com/ansible\-collections/community\.general/pull/13071](https\://github\.com/ansible\-collections/community\.general/pull/13071)\)\.
|
||||
* ipa module utils \- do not fail a task when the <code>failed</code> field of the API response only contains empty member lists\. This fixes failures on success in <code>ipa\_group</code>\, <code>ipa\_hbacrule</code>\, <code>ipa\_sudorule</code> and other modules that add members \([https\://github\.com/ansible\-collections/community\.general/issues/12294](https\://github\.com/ansible\-collections/community\.general/issues/12294)\, [https\://github\.com/ansible\-collections/community\.general/pull/13188](https\://github\.com/ansible\-collections/community\.general/pull/13188)\)\.
|
||||
* lvm\_pv \- determine the parent disk of a partition from sysfs instead of from its name\, which fixes rescanning partitions of devices such as <code>mmcblk0p1</code> \([https\://github\.com/ansible\-collections/community\.general/issues/13212](https\://github\.com/ansible\-collections/community\.general/issues/13212)\, [https\://github\.com/ansible\-collections/community\.general/pull/13218](https\://github\.com/ansible\-collections/community\.general/pull/13218)\)\.
|
||||
* lvm\_pv \- do not warn on every run with <code>resize\=true</code> when the underlying disk has no rescan attribute\, for example virtio\-blk disks \([https\://github\.com/ansible\-collections/community\.general/issues/13212](https\://github\.com/ansible\-collections/community\.general/issues/13212)\, [https\://github\.com/ansible\-collections/community\.general/pull/13218](https\://github\.com/ansible\-collections/community\.general/pull/13218)\)\.
|
||||
* lvm\_pv \- resolve symbolic links such as <code>/dev/disk/by\-id/\.\.\.</code> before looking up the device in sysfs\, so the disk is rescanned before resizing \([https\://github\.com/ansible\-collections/community\.general/issues/13212](https\://github\.com/ansible\-collections/community\.general/issues/13212)\, [https\://github\.com/ansible\-collections/community\.general/pull/13218](https\://github\.com/ansible\-collections/community\.general/pull/13218)\)\.
|
||||
* pamd \- keep comments and empty lines next to rules inserted with <code>state\=before</code> or <code>state\=after</code> \([https\://github\.com/ansible\-collections/community\.general/issues/9374](https\://github\.com/ansible\-collections/community\.general/issues/9374)\, [https\://github\.com/ansible\-collections/community\.general/pull/13114](https\://github\.com/ansible\-collections/community\.general/pull/13114)\)\.
|
||||
* splunk callback plugin \- report <code>ansible\_check\_mode</code> per task instead of keeping it set to <code>true</code> for the rest of the run once a single task ran in check mode \([https\://github\.com/ansible\-collections/community\.general/issues/13194](https\://github\.com/ansible\-collections/community\.general/issues/13194)\, [https\://github\.com/ansible\-collections/community\.general/pull/13195](https\://github\.com/ansible\-collections/community\.general/pull/13195)\)\.
|
||||
* zypper\_repository \- keep the <code>description</code> option when adding a <code>\.repo</code> file instead of using the name from the file \([https\://github\.com/ansible\-collections/community\.general/issues/4532](https\://github\.com/ansible\-collections/community\.general/issues/4532)\, [https\://github\.com/ansible\-collections/community\.general/pull/13168](https\://github\.com/ansible\-collections/community\.general/pull/13168)\)\.
|
||||
* zypper\_updates\_info \- list the updates from the other repositories and warn instead of failing when zypper skips a repository that cannot be refreshed \([https\://github\.com/ansible\-collections/community\.general/pull/13191](https\://github\.com/ansible\-collections/community\.general/pull/13191)\)\.
|
||||
|
||||
<a id="v14-0-0"></a>
|
||||
## v14\.0\.0
|
||||
|
||||
<a id="release-summary-1"></a>
|
||||
### Release Summary
|
||||
|
||||
This is release 14\.0\.0 of <code>community\.general</code>\, released on 2026\-11\-02\.
|
||||
|
||||
<a id="minor-changes-1"></a>
|
||||
### Minor Changes
|
||||
|
||||
* The collection now depends on community\.library\_inventory\_filtering\_v1\. This runtime dependency is used by inventory plugins only\, and will be automatically installed by <code>ansible\-galaxy collection install</code>\. If you install community\.general by cloning its repository or extracting its release tarball to a specific location\, you also need to make sure to install community\.library\_inventory\_filtering\_v1 manually if you use one of the affected inventory plugins \([https\://github\.com/ansible\-collections/community\.general/pull/12302](https\://github\.com/ansible\-collections/community\.general/pull/12302)\)\.
|
||||
* \_alicloud\_ecs module utils \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12984](https\://github\.com/ansible\-collections/community\.general/pull/12984)\)\.
|
||||
* \_hwc\_utils module utils \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12984](https\://github\.com/ansible\-collections/community\.general/pull/12984)\)\.
|
||||
* \_ipa module utils \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12984](https\://github\.com/ansible\-collections/community\.general/pull/12984)\)\.
|
||||
* \_online module utils \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12984](https\://github\.com/ansible\-collections/community\.general/pull/12984)\)\.
|
||||
* \_opennebula module utils \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12984](https\://github\.com/ansible\-collections/community\.general/pull/12984)\)\.
|
||||
* \_pritunl\_api module utils \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12984](https\://github\.com/ansible\-collections/community\.general/pull/12984)\)\.
|
||||
* \_redfish\_utils module utils \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12984](https\://github\.com/ansible\-collections/community\.general/pull/12984)\)\.
|
||||
* \_scaleway module utils \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12984](https\://github\.com/ansible\-collections/community\.general/pull/12984)\)\.
|
||||
* \_utm\_utils module utils \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12984](https\://github\.com/ansible\-collections/community\.general/pull/12984)\)\.
|
||||
* \_vexata module utils \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12984](https\://github\.com/ansible\-collections/community\.general/pull/12984)\)\.
|
||||
* airbrake\_deployment \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* aix\_filesystem \- use string operations instead of regular expressions for plain\-string patterns \([https\://github\.com/ansible\-collections/community\.general/pull/12996](https\://github\.com/ansible\-collections/community\.general/pull/12996)\)\.
|
||||
* aix\_lvol \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* alerta\_customer \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* alternatives \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12966](https\://github\.com/ansible\-collections/community\.general/pull/12966)\)\.
|
||||
* ansible\_type test plugin \- remove compatibility code for \< ansible\-core 2\.19 \([https\://github\.com/ansible\-collections/community\.general/pull/12919](https\://github\.com/ansible\-collections/community\.general/pull/12919)\)\.
|
||||
* apk \- refactor code to remove use of <code>global</code> \([https\://github\.com/ansible\-collections/community\.general/pull/12925](https\://github\.com/ansible\-collections/community\.general/pull/12925)\)\.
|
||||
* archive \- add <code>zstd</code> as a format choice \([https\://github\.com/ansible\-collections/community\.general/issues/3455](https\://github\.com/ansible\-collections/community\.general/issues/3455)\, [https\://github\.com/ansible\-collections/community\.general/pull/12497](https\://github\.com/ansible\-collections/community\.general/pull/12497)\)\.
|
||||
* archive \- use context managers when reading tar checksums \([https\://github\.com/ansible\-collections/community\.general/pull/12569](https\://github\.com/ansible\-collections/community\.general/pull/12569)\)\.
|
||||
* awall \- refactor code to remove use of <code>global</code> \([https\://github\.com/ansible\-collections/community\.general/pull/12926](https\://github\.com/ansible\-collections/community\.general/pull/12926)\)\.
|
||||
* bitwarden lookup plugin \- add <code>sync</code> option to sync items from the vault before lookup \([https\://github\.com/ansible\-collections/community\.general/pull/12377](https\://github\.com/ansible\-collections/community\.general/pull/12377)\)\.
|
||||
* bundler \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12967](https\://github\.com/ansible\-collections/community\.general/pull/12967)\)\.
|
||||
* cloud\_init\_data\_facts \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* cloudflare\_dns \- add diff mode support \([https\://github\.com/ansible\-collections/community\.general/issues/10797](https\://github\.com/ansible\-collections/community\.general/issues/10797)\, [https\://github\.com/ansible\-collections/community\.general/pull/12817](https\://github\.com/ansible\-collections/community\.general/pull/12817)\)\.
|
||||
* composer \- relay composer\'s own warning about running as root/super user as an Ansible warning \([https\://github\.com/ansible\-collections/community\.general/issues/2388](https\://github\.com/ansible\-collections/community\.general/issues/2388)\, [https\://github\.com/ansible\-collections/community\.general/pull/12090](https\://github\.com/ansible\-collections/community\.general/pull/12090)\)\.
|
||||
* composer \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* consul \- remove Python \< 2\.5 compatibility \([https\://github\.com/ansible\-collections/community\.general/pull/12893](https\://github\.com/ansible\-collections/community\.general/pull/12893)\)\.
|
||||
* consul modules \- add a <code>url</code> option taking the address of the Consul agent as a whole\; the existing <code>host</code>\, <code>port</code> and <code>scheme</code> options each override the matching component of it\. This does not cover <code>community\.general\.consul</code> \([https\://github\.com/ansible\-collections/community\.general/pull/12216](https\://github\.com/ansible\-collections/community\.general/pull/12216)\)\.
|
||||
* consul modules \- connection options now fall back to the <code>CONSUL\_HTTP\_ADDR</code>\, <code>CONSUL\_HTTP\_SSL</code>\, <code>CONSUL\_HTTP\_SSL\_VERIFY</code>\, <code>CONSUL\_HTTP\_TOKEN</code> and <code>CONSUL\_CACERT</code> environment variables when not specified\. This applies to all consul modules except <code>community\.general\.consul</code>\, which does not use the shared connection option handling yet \([https\://github\.com/ansible\-collections/community\.general/pull/12216](https\://github\.com/ansible\-collections/community\.general/pull/12216)\)\.
|
||||
* consul\_kv \- refactored KV store helpers into shared <code>\_ConsulModule</code> methods to prepare for the <code>consul\_kv\_info</code> module \([https\://github\.com/ansible\-collections/community\.general/pull/12515](https\://github\.com/ansible\-collections/community\.general/pull/12515)\)\.
|
||||
* consul\_kv \- the module no longer requires the <code>py\-consul</code> Python library\, and is now part of the <code>community\.general\.consul</code> action group \([https\://github\.com/ansible\-collections/community\.general/pull/12221](https\://github\.com/ansible\-collections/community\.general/pull/12221)\)\.
|
||||
* consul\_kv lookup plugin \- add <code>empty\_value</code> option to control what is returned for null Consul values \([https\://github\.com/ansible\-collections/community\.general/issues/11039](https\://github\.com/ansible\-collections/community\.general/issues/11039)\, [https\://github\.com/ansible\-collections/community\.general/pull/12120](https\://github\.com/ansible\-collections/community\.general/pull/12120)\)\.
|
||||
* consul\_kv lookup plugin \- the plugin no longer requires the <code>py\-consul</code> Python library\, it now uses <code>ansible\.module\_utils\.urls\.open\_url</code> directly \([https\://github\.com/ansible\-collections/community\.general/issues/5251](https\://github\.com/ansible\-collections/community\.general/issues/5251)\, [https\://github\.com/ansible\-collections/community\.general/pull/12659](https\://github\.com/ansible\-collections/community\.general/pull/12659)\)\.
|
||||
* consul\_session \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12967](https\://github\.com/ansible\-collections/community\.general/pull/12967)\)\.
|
||||
* copr \- improve the error message when the <code>dnf</code> Python library is missing on systems where dnf5 is the default package manager \([https\://github\.com/ansible\-collections/community\.general/issues/12501](https\://github\.com/ansible\-collections/community\.general/issues/12501)\, [https\://github\.com/ansible\-collections/community\.general/pull/12913](https\://github\.com/ansible\-collections/community\.general/pull/12913)\)\.
|
||||
* cronvar \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* dependent lookup plugin \- remove compatibility code for \< ansible\-core 2\.19 \([https\://github\.com/ansible\-collections/community\.general/pull/12919](https\://github\.com/ansible\-collections/community\.general/pull/12919)\)\.
|
||||
* dnf\_config\_manager \- lookup path to the <code>dnf</code> binary in <code>PATH</code>\. It used to be fixed to <code>/usr/bin/dnf</code> \([https\://github\.com/ansible\-collections/community\.general/pull/12219](https\://github\.com/ansible\-collections/community\.general/pull/12219)\)\.
|
||||
* dnsimple \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12967](https\://github\.com/ansible\-collections/community\.general/pull/12967)\)\.
|
||||
* dpkg\_divert \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* ejabberd\_user \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* elastic callback plugin \- internal refactoring that has no visible behavior changes \([https\://github\.com/ansible\-collections/community\.general/pull/12791](https\://github\.com/ansible\-collections/community\.general/pull/12791)\)\.
|
||||
* elastic callback plugin \- redact sensitive output on ansible\-core 2\.22\+ \([https\://github\.com/ansible\-collections/community\.general/pull/12829](https\://github\.com/ansible\-collections/community\.general/pull/12829)\)\.
|
||||
* etcd3 \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* etcd3 lookup plugin \- change the type of the <code>ca\_cert</code>\, <code>cert\_cert</code>\, and <code>cert\_key</code> options from string to path\, since they specify paths to certificates/keys \([https\://github\.com/ansible\-collections/community\.general/pull/12860](https\://github\.com/ansible\-collections/community\.general/pull/12860)\)\.
|
||||
* filesystem \- adds GFS2 support \([https\://github\.com/ansible\-collections/community\.general/pull/12285](https\://github\.com/ansible\-collections/community\.general/pull/12285)\)\.
|
||||
* filesystem \- print a warning if <code>blkid \-c</code> probe fails and show the error message from <code>blkid</code> \([https\://github\.com/ansible\-collections/community\.general/pull/12500](https\://github\.com/ansible\-collections/community\.general/pull/12500)\)\.
|
||||
* from\_csv filter plugin \- remove Python 2 compatibility \([https\://github\.com/ansible\-collections/community\.general/pull/12893](https\://github\.com/ansible\-collections/community\.general/pull/12893)\)\.
|
||||
* gem \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* github\_app\_access\_token lookup plugin \- add <code>client\_id</code> as an alias for <code>app\_id</code> so the GitHub App\'s client ID can be specified without using a confusing option name \([https\://github\.com/ansible\-collections/community\.general/issues/12802](https\://github\.com/ansible\-collections/community\.general/issues/12802)\, [https\://github\.com/ansible\-collections/community\.general/pull/12804](https\://github\.com/ansible\-collections/community\.general/pull/12804)\)\.
|
||||
* github\_deploy\_key \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* github\_deploy\_key \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12952](https\://github\.com/ansible\-collections/community\.general/pull/12952)\)\.
|
||||
* github\_key \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* github\_release \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12952](https\://github\.com/ansible\-collections/community\.general/pull/12952)\)\.
|
||||
* github\_repo \- added <code>visibility</code> option to set repository visibility to <code>public</code>\, <code>private</code>\, or <code>internal</code> \([https\://github\.com/ansible\-collections/community\.general/issues/6219](https\://github\.com/ansible\-collections/community\.general/issues/6219)\, [https\://github\.com/ansible\-collections/community\.general/pull/12557](https\://github\.com/ansible\-collections/community\.general/pull/12557)\)\.
|
||||
* github\_secrets \- add support for managing repository environment secrets \([https\://github\.com/ansible\-collections/community\.general/pull/12756](https\://github\.com/ansible\-collections/community\.general/pull/12756)\, [https\://github\.com/ansible\-collections/community\.general/issues/12755](https\://github\.com/ansible\-collections/community\.general/issues/12755)\)\.
|
||||
* github\_secrets \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* github\_secrets\_info \- add support for listing repository environment secrets \([https\://github\.com/ansible\-collections/community\.general/pull/12756](https\://github\.com/ansible\-collections/community\.general/pull/12756)\, [https\://github\.com/ansible\-collections/community\.general/issues/12755](https\://github\.com/ansible\-collections/community\.general/issues/12755)\)\.
|
||||
* github\_webhook \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* github\_webhook\_info \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* gitlab\_group \- add new value <code>unchanged</code> for <code>visibility</code> parameter \([https\://github\.com/ansible\-collections/community\.general/pull/12694](https\://github\.com/ansible\-collections/community\.general/pull/12694)\)\.
|
||||
* gitlab\_hook \- add <code>branch\_filter\_strategy</code> option to control how <code>push\_events\_branch\_filter</code> filters push events\, which allows filtering branches by a regular expression \([https\://github\.com/ansible\-collections/community\.general/pull/12618](https\://github\.com/ansible\-collections/community\.general/pull/12618)\)\.
|
||||
* gitlab\_hook \- add <code>custom\_webhook\_template</code> option to configure a custom webhook payload template on project hooks \([https\://github\.com/ansible\-collections/community\.general/issues/11233](https\://github\.com/ansible\-collections/community\.general/issues/11233)\, [https\://github\.com/ansible\-collections/community\.general/pull/12496](https\://github\.com/ansible\-collections/community\.general/pull/12496)\)\.
|
||||
* gitlab\_issue \- add <code>all</code> as a valid value for the <code>state\_filter</code> parameter \([https\://github\.com/ansible\-collections/community\.general/pull/12821](https\://github\.com/ansible\-collections/community\.general/pull/12821)\)\.
|
||||
* gitlab\_project \- added <code>archived</code> and <code>unarchived</code> values for <code>state</code> \([https\://github\.com/ansible\-collections/community\.general/pull/12698](https\://github\.com/ansible\-collections/community\.general/pull/12698)\)\.
|
||||
* gitlab\_runners inventory plugin \- wrap the Gitlab API object in a context mananger\, and only create the <code>gitlab\_runners</code> group after the API request was successful \([https\://github\.com/ansible\-collections/community\.general/pull/12378](https\://github\.com/ansible\-collections/community\.general/pull/12378)\)\.
|
||||
* homebrew \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* homebrew\_cask \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* homebrew\_cask \- use string operations instead of regular expressions for plain\-string patterns \([https\://github\.com/ansible\-collections/community\.general/pull/12996](https\://github\.com/ansible\-collections/community\.general/pull/12996)\)\.
|
||||
* homebrew\_services \- replace <code>NamedTuple</code> with dataclass \([https\://github\.com/ansible\-collections/community\.general/pull/12094](https\://github\.com/ansible\-collections/community\.general/pull/12094)\)\.
|
||||
* homebrew\_tap \- add <code>trust</code> option to control whether Homebrew trusts the tapped repositories \([https\://github\.com/ansible\-collections/community\.general/issues/12220](https\://github\.com/ansible\-collections/community\.general/issues/12220)\, [https\://github\.com/ansible\-collections/community\.general/pull/12503](https\://github\.com/ansible\-collections/community\.general/pull/12503)\)\.
|
||||
* honeybadger\_deployment \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* hpilo\_boot \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* hpilo\_info \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* hpilo\_info \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* hwc\_ecs\_instance \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12974](https\://github\.com/ansible\-collections/community\.general/pull/12974)\)\.
|
||||
* hwc\_evs\_disk \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12968](https\://github\.com/ansible\-collections/community\.general/pull/12968)\)\.
|
||||
* hwc\_network\_vpc \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12952](https\://github\.com/ansible\-collections/community\.general/pull/12952)\)\.
|
||||
* hwc\_network\_vpc \- use string operations instead of regular expressions for plain\-string patterns \([https\://github\.com/ansible\-collections/community\.general/pull/12996](https\://github\.com/ansible\-collections/community\.general/pull/12996)\)\.
|
||||
* hwc\_smn\_topic \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12952](https\://github\.com/ansible\-collections/community\.general/pull/12952)\)\.
|
||||
* hwc\_vpc\_eip \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12953](https\://github\.com/ansible\-collections/community\.general/pull/12953)\)\.
|
||||
* hwc\_vpc\_peering\_connect \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* hwc\_vpc\_port \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12953](https\://github\.com/ansible\-collections/community\.general/pull/12953)\)\.
|
||||
* hwc\_vpc\_private\_ip \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* hwc\_vpc\_route \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12952](https\://github\.com/ansible\-collections/community\.general/pull/12952)\)\.
|
||||
* hwc\_vpc\_security\_group \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* hwc\_vpc\_security\_group\_rule \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12966](https\://github\.com/ansible\-collections/community\.general/pull/12966)\)\.
|
||||
* hwc\_vpc\_subnet \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12953](https\://github\.com/ansible\-collections/community\.general/pull/12953)\)\.
|
||||
* ibm\_sa\_host\_ports \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* ibm\_sa\_vol \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* ibm\_sa\_vol\_map \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* icinga2\_feature \- use string operations instead of regular expressions for plain\-string patterns \([https\://github\.com/ansible\-collections/community\.general/pull/12996](https\://github\.com/ansible\-collections/community\.general/pull/12996)\)\.
|
||||
* icinga2\_host \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* incus connection plugin \- add <code>remote\_user\_id\_command</code> option to configure the command used to retrieve the UID and GID of the remote user \([https\://github\.com/ansible\-collections/community\.general/pull/12646](https\://github\.com/ansible\-collections/community\.general/pull/12646)\)\.
|
||||
* influxdb\_query \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* influxdb\_user \- add <code>force\_password\_update</code> option to always update the password when <code>user\_password</code> is set\, working around InfluxDB installations that do not enforce authentication \([https\://github\.com/ansible\-collections/community\.general/issues/3824](https\://github\.com/ansible\-collections/community\.general/issues/3824)\, [https\://github\.com/ansible\-collections/community\.general/pull/12654](https\://github\.com/ansible\-collections/community\.general/pull/12654)\)\.
|
||||
* influxdb\_write \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* ini\_file \- use named groups in the internal option\-matching regular expressions \([https\://github\.com/ansible\-collections/community\.general/pull/12493](https\://github\.com/ansible\-collections/community\.general/pull/12493)\)\.
|
||||
* installp \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* iocage inventory plugin \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* ip2location\_info \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* ipa\_config \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12968](https\://github\.com/ansible\-collections/community\.general/pull/12968)\)\.
|
||||
* ipa\_dnsrecord \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* ipa\_host \- return all attributes of the host\, including <code>has\_keytab</code> and <code>has\_password</code>\, whenever the host exists \([https\://github\.com/ansible\-collections/community\.general/issues/4929](https\://github\.com/ansible\-collections/community\.general/issues/4929)\, [https\://github\.com/ansible\-collections/community\.general/pull/13166](https\://github\.com/ansible\-collections/community\.general/pull/13166)\)\.
|
||||
* ipa\_host \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* ipa\_otpconfig \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* ipa\_otptoken \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12968](https\://github\.com/ansible\-collections/community\.general/pull/12968)\)\.
|
||||
* ipa\_pwpolicy \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12967](https\://github\.com/ansible\-collections/community\.general/pull/12967)\)\.
|
||||
* ipa\_user \- add <code>enable\_on\_present</code> option to keep disabled users disabled with <code>state\=present</code> \([https\://github\.com/ansible\-collections/community\.general/issues/8296](https\://github\.com/ansible\-collections/community\.general/issues/8296)\, [https\://github\.com/ansible\-collections/community\.general/pull/13078](https\://github\.com/ansible\-collections/community\.general/pull/13078)\)\.
|
||||
* ipa\_user \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12953](https\://github\.com/ansible\-collections/community\.general/pull/12953)\)\.
|
||||
* ipify\_facts \- refactor code to remove use of <code>global</code> \([https\://github\.com/ansible\-collections/community\.general/pull/12909](https\://github\.com/ansible\-collections/community\.general/pull/12909)\)\.
|
||||
* ipify\_facts \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* ipinfoio\_facts \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* iptables\_state \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* irc \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* iso\_create \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12952](https\://github\.com/ansible\-collections/community\.general/pull/12952)\)\.
|
||||
* jabber callback plugin \- redact sensitive output on ansible\-core 2\.22\+ \([https\://github\.com/ansible\-collections/community\.general/pull/12785](https\://github\.com/ansible\-collections/community\.general/pull/12785)\)\.
|
||||
* java\_cert \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12968](https\://github\.com/ansible\-collections/community\.general/pull/12968)\)\.
|
||||
* jenkins\_build \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12967](https\://github\.com/ansible\-collections/community\.general/pull/12967)\)\.
|
||||
* jenkins\_build\_info \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12952](https\://github\.com/ansible\-collections/community\.general/pull/12952)\)\.
|
||||
* jenkins\_job \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12953](https\://github\.com/ansible\-collections/community\.general/pull/12953)\)\.
|
||||
* jenkins\_job\_info \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12953](https\://github\.com/ansible\-collections/community\.general/pull/12953)\)\.
|
||||
* jenkins\_node \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* kopia\_repository\, kopia\_repository\_info \- normalize handling of CLI parameters across all <code>kopia\_\*</code> modules \([https\://github\.com/ansible\-collections/community\.general/pull/12360](https\://github\.com/ansible\-collections/community\.general/pull/12360)\)\.
|
||||
* ldap\_\* modules \- add support for specifying a SASL authorization identity \(equivalent to <code>\-X \'dn\:\.\.\.\' flag</code>\) \([https\://github\.com/ansible\-collections/community\.general/pull/12781](https\://github\.com/ansible\-collections/community\.general/pull/12781)\)\.
|
||||
* ldap\_attrs \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* log\_plays callback plugin \- redact sensitive output on ansible\-core 2\.22\+ \([https\://github\.com/ansible\-collections/community\.general/pull/12785](https\://github\.com/ansible\-collections/community\.general/pull/12785)\)\.
|
||||
* loganalytics\_ingestion callback plugin \- refactor to use ansible\-core 2\.22\'s new secrets API in order to properly mark and mask secrets \([https\://github\.com/ansible\-collections/community\.general/pull/12758](https\://github\.com/ansible\-collections/community\.general/pull/12758)\)\.
|
||||
* logrotate \- add diff mode support\, showing before/after content of the configuration file when running with <code>\-\-diff</code> \([https\://github\.com/ansible\-collections/community\.general/issues/12845](https\://github\.com/ansible\-collections/community\.general/issues/12845)\, [https\://github\.com/ansible\-collections/community\.general/pull/12846](https\://github\.com/ansible\-collections/community\.general/pull/12846)\)\.
|
||||
* logrotate \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* logrotate \- refactor without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12866](https\://github\.com/ansible\-collections/community\.general/pull/12866)\)\.
|
||||
* logrotate \- refactor without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12873](https\://github\.com/ansible\-collections/community\.general/pull/12873)\)\.
|
||||
* logstash callback plugin \- add <code>ANSIBLE\_CALLBACK\_LOGSTASH\_</code> prefixed environment variables and Ansible variables for all options \([https\://github\.com/ansible\-collections/community\.general/pull/12939](https\://github\.com/ansible\-collections/community\.general/pull/12939)\)\.
|
||||
* logstash callback plugin \- add support for sending events over HTTP\(S\)\, with Basic authentication and TLS client certificate options \([https\://github\.com/ansible\-collections/community\.general/issues/12897](https\://github\.com/ansible\-collections/community\.general/issues/12897)\, [https\://github\.com/ansible\-collections/community\.general/pull/12939](https\://github\.com/ansible\-collections/community\.general/pull/12939)\)\.
|
||||
* logstash callback plugin \- redact sensitive output on ansible\-core 2\.22\+ \([https\://github\.com/ansible\-collections/community\.general/pull/12785](https\://github\.com/ansible\-collections/community\.general/pull/12785)\)\.
|
||||
* lvm\_pv \- add <code>zero</code>\, <code>metadatasize</code>\, <code>dataalignment</code>\, and <code>pvmetadatacopies</code> options to control <code>pvcreate</code> behavior\, and <code>allocatable</code>\, <code>metadataignore</code>\, and <code>tags</code> options to manage existing physical volume attributes with <code>pvchange</code> \([https\://github\.com/ansible\-collections/community\.general/pull/12701](https\://github\.com/ansible\-collections/community\.general/pull/12701)\)\.
|
||||
* lvol \- add <code>pool\_metadata\_size</code> option to set the metadata volume size when creating a thin pool \([https\://github\.com/ansible\-collections/community\.general/issues/10050](https\://github\.com/ansible\-collections/community\.general/issues/10050)\, [https\://github\.com/ansible\-collections/community\.general/pull/12936](https\://github\.com/ansible\-collections/community\.general/pull/12936)\)\.
|
||||
* lxc\_container \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* lxd inventory plugin \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* lxd\_container \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* lxd\_profile \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* lxd\_project \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* macports \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* macports \- use string operations instead of regular expressions for plain\-string patterns \([https\://github\.com/ansible\-collections/community\.general/pull/12996](https\://github\.com/ansible\-collections/community\.general/pull/12996)\)\.
|
||||
* mail \- add the <code>inline</code> option to embed images in the message body via <code>Content\-ID</code>\, so an HTML body can reference them with <code>cid\:\.\.\.</code> instead of an external URL \([https\://github\.com/ansible\-collections/community\.general/pull/12480](https\://github\.com/ansible\-collections/community\.general/pull/12480)\)\.
|
||||
* mail \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12974](https\://github\.com/ansible\-collections/community\.general/pull/12974)\)\.
|
||||
* mail callback plugin \- redact sensitive output on ansible\-core 2\.22\+ \([https\://github\.com/ansible\-collections/community\.general/pull/12785](https\://github\.com/ansible\-collections/community\.general/pull/12785)\)\.
|
||||
* maven\_artifact \- add SHA\-256 and SHA\-512 support to <code>checksum\_alg</code> \([https\://github\.com/ansible\-collections/community\.general/pull/12747](https\://github\.com/ansible\-collections/community\.general/pull/12747)\)\.
|
||||
* maven\_artifact \- add <code>keep\_name\_only\_when\_resolved</code> option to opt in to the documented scope of <code>keep\_name</code>\, where it only controls the destination filename when <code>version</code> is resolved dynamically \(<code>latest</code> or <code>version\_by\_spec</code>\)\; previously <code>keep\_name</code> also affected the filename with a fixed <code>version</code>\, contradicting its documentation \([https\://github\.com/ansible\-collections/community\.general/pull/12606](https\://github\.com/ansible\-collections/community\.general/pull/12606)\, [https\://github\.com/ansible\-collections/community\.general/issues/4796](https\://github\.com/ansible\-collections/community\.general/issues/4796)\)\.
|
||||
* maven\_artifact \- internal refactoring\, no change in behavior \([https\://github\.com/ansible\-collections/community\.general/pull/12776](https\://github\.com/ansible\-collections/community\.general/pull/12776)\)\.
|
||||
* maven\_artifact \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* maven\_artifact \- use Ansible construct to express the default value of parameter \([https\://github\.com/ansible\-collections/community\.general/pull/12411](https\://github\.com/ansible\-collections/community\.general/pull/12411)\)\.
|
||||
* memset\_zone \- use existing module utils helper to look up zones \([https\://github\.com/ansible\-collections/community\.general/pull/12912](https\://github\.com/ansible\-collections/community\.general/pull/12912)\)\.
|
||||
* memset\_zone\_domain \- use existing module utils helper to look up zone domains \([https\://github\.com/ansible\-collections/community\.general/pull/12912](https\://github\.com/ansible\-collections/community\.general/pull/12912)\)\.
|
||||
* mqtt \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12967](https\://github\.com/ansible\-collections/community\.general/pull/12967)\)\.
|
||||
* netcup\_dns \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12966](https\://github\.com/ansible\-collections/community\.general/pull/12966)\)\.
|
||||
* nexmo \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* nginx\_status\_info \- stop using a module\-level global variable \([https\://github\.com/ansible\-collections/community\.general/pull/12910](https\://github\.com/ansible\-collections/community\.general/pull/12910)\)\.
|
||||
* nginx\_status\_info \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* nmap inventory plugin \- allow <code>address</code> to be a list of networks/IP ranges to scan\, in addition to a single string \([https\://github\.com/ansible\-collections/community\.general/issues/12379](https\://github\.com/ansible\-collections/community\.general/issues/12379)\, [https\://github\.com/ansible\-collections/community\.general/pull/12384](https\://github\.com/ansible\-collections/community\.general/pull/12384)\)\.
|
||||
* nmcli \- add <code>route\_table4</code> and <code>route\_table6</code> options to set the routing table of a connection \([https\://github\.com/ansible\-collections/community\.general/issues/12454](https\://github\.com/ansible\-collections/community\.general/issues/12454)\, [https\://github\.com/ansible\-collections/community\.general/pull/13052](https\://github\.com/ansible\-collections/community\.general/pull/13052)\)\.
|
||||
* nmcli \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* npm \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* nrdp callback plugin \- redact sensitive output on ansible\-core 2\.22\+ \([https\://github\.com/ansible\-collections/community\.general/pull/12785](https\://github\.com/ansible\-collections/community\.general/pull/12785)\)\.
|
||||
* ocapi\_command \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* ocapi\_info \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* odbc \- add <code>autocommit</code> option to support statements that must run outside of a transaction \([https\://github\.com/ansible\-collections/community\.general/issues/4173](https\://github\.com/ansible\-collections/community\.general/issues/4173)\, [https\://github\.com/ansible\-collections/community\.general/issues/8577](https\://github\.com/ansible\-collections/community\.general/issues/8577)\, [https\://github\.com/ansible\-collections/community\.general/pull/12595](https\://github\.com/ansible\-collections/community\.general/pull/12595)\)\.
|
||||
* odbc \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* one\_service \- replace function\-local <code>namedtuple</code> with module\-level dataclass \([https\://github\.com/ansible\-collections/community\.general/pull/12094](https\://github\.com/ansible\-collections/community\.general/pull/12094)\)\.
|
||||
* one\_service \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* one\_vm \- add <code>update\_attributes</code> parameter to merge USER\_TEMPLATE key/value pairs onto existing VMs via the <code>one\.vm\.update</code> API with append/merge semantics\, enabling idempotent attribute updates on running VMs without teardown \([https\://github\.com/ansible\-collections/community\.general/issues/12498](https\://github\.com/ansible\-collections/community\.general/issues/12498)\, [https\://github\.com/ansible\-collections/community\.general/pull/12536](https\://github\.com/ansible\-collections/community\.general/pull/12536)\)\.
|
||||
* one\_vm \- replace function\-local <code>namedtuple</code> with module\-level dataclass \([https\://github\.com/ansible\-collections/community\.general/pull/12094](https\://github\.com/ansible\-collections/community\.general/pull/12094)\)\.
|
||||
* one\_vm \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* onepassword\_info \- rewrite module to support op CLI v2 \([https\://github\.com/ansible\-collections/community\.general/issues/5303](https\://github\.com/ansible\-collections/community\.general/issues/5303)\, [https\://github\.com/ansible\-collections/community\.general/issues/7321](https\://github\.com/ansible\-collections/community\.general/issues/7321)\, [https\://github\.com/ansible\-collections/community\.general/pull/12089](https\://github\.com/ansible\-collections/community\.general/pull/12089)\)\.
|
||||
* onepassword\_info \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* oneview\_datacenter\_info \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* oneview\_ethernet\_network\_info \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* oneview\_logical\_interconnect\_group\_info \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* oneview\_network\_set\_info \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* oneview\_san\_manager\_info \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* open\_iscsi \- refactor code to remove use of <code>global</code> \([https\://github\.com/ansible\-collections/community\.general/pull/12927](https\://github\.com/ansible\-collections/community\.general/pull/12927)\)\.
|
||||
* openbsd\_pkg \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* openbsd\_pkg \- use string operations instead of regular expressions for plain\-string patterns \([https\://github\.com/ansible\-collections/community\.general/pull/12996](https\://github\.com/ansible\-collections/community\.general/pull/12996)\)\.
|
||||
* opennebula inventory plugin \- add <code>prefer\_existing\_ansible\_host</code> option to skip setting <code>ansible\_host</code> when the host already has one from an earlier inventory source \([https\://github\.com/ansible\-collections/community\.general/pull/12417](https\://github\.com/ansible\-collections/community\.general/pull/12417)\)\.
|
||||
* opennebula inventory plugin \- add <code>set\_name\_variable</code> option to allow disabling the <code>name</code> host variable\, avoiding the <code>Found variable using reserved name \'name\'</code> warning\. <code>inventory\_hostname</code> is unaffected \([https\://github\.com/ansible\-collections/community\.general/pull/12695](https\://github\.com/ansible\-collections/community\.general/pull/12695)\)\.
|
||||
* opennebula inventory plugin \- add new option <code>filter</code> that allows to filter hosts by variables \([https\://github\.com/ansible\-collections/community\.general/pull/12302](https\://github\.com/ansible\-collections/community\.general/pull/12302)\)\.
|
||||
* opennebula inventory plugin \- expose <code>UNAME</code> \(VM owner\) and <code>GNAME</code> \(VM group\) as host variables\, enabling <code>keyed\_groups</code> based on ownership \([https\://github\.com/ansible\-collections/community\.general/pull/12417](https\://github\.com/ansible\-collections/community\.general/pull/12417)\)\.
|
||||
* opennebula inventory plugin \- replace function\-local <code>namedtuple</code> with module\-level dataclass \([https\://github\.com/ansible\-collections/community\.general/pull/12094](https\://github\.com/ansible\-collections/community\.general/pull/12094)\)\.
|
||||
* opentelemetry callback plugin \- internal refactoring that has no visible behavior changes \([https\://github\.com/ansible\-collections/community\.general/pull/12791](https\://github\.com/ansible\-collections/community\.general/pull/12791)\)\.
|
||||
* opentelemetry callback plugin \- redact sensitive output on ansible\-core 2\.22\+ \([https\://github\.com/ansible\-collections/community\.general/pull/12787](https\://github\.com/ansible\-collections/community\.general/pull/12787)\)\.
|
||||
* openwrt\_init \- refactor code to remove use of <code>global</code> \([https\://github\.com/ansible\-collections/community\.general/pull/12911](https\://github\.com/ansible\-collections/community\.general/pull/12911)\)\.
|
||||
* osx\_defaults \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* ovh\_ip\_failover \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* ovh\_ip\_loadbalancing\_backend \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12952](https\://github\.com/ansible\-collections/community\.general/pull/12952)\)\.
|
||||
* ovh\_monthly\_billing \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12952](https\://github\.com/ansible\-collections/community\.general/pull/12952)\)\.
|
||||
* pacemaker\_cluster \- add support for unmaintenance state \([https\://github\.com/ansible\-collections/community\.general/issues/12362](https\://github\.com/ansible\-collections/community\.general/issues/12362)\, [https\://github\.com/ansible\-collections/community\.general/pull/12364](https\://github\.com/ansible\-collections/community\.general/pull/12364)\)\.
|
||||
* pacemaker\_cluster \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* packet\_device \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12975](https\://github\.com/ansible\-collections/community\.general/pull/12975)\)\.
|
||||
* packet\_ip\_subnet \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12966](https\://github\.com/ansible\-collections/community\.general/pull/12966)\)\.
|
||||
* packet\_project \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12953](https\://github\.com/ansible\-collections/community\.general/pull/12953)\)\.
|
||||
* packet\_sshkey \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12968](https\://github\.com/ansible\-collections/community\.general/pull/12968)\)\.
|
||||
* packet\_volume \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12966](https\://github\.com/ansible\-collections/community\.general/pull/12966)\)\.
|
||||
* packet\_volume\_attachment \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12952](https\://github\.com/ansible\-collections/community\.general/pull/12952)\)\.
|
||||
* pacman \- replace <code>namedtuple</code> with dataclass for <code>VersionTuple</code> \([https\://github\.com/ansible\-collections/community\.general/pull/12094](https\://github\.com/ansible\-collections/community\.general/pull/12094)\)\.
|
||||
* pagerduty\_alert \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12974](https\://github\.com/ansible\-collections/community\.general/pull/12974)\)\.
|
||||
* pam\_limits \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* parted \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* passwordstore lookup plugin \- add <code>keep\_trailing\_newline</code> option to preserve the trailing newline when <code>returnall\=true</code> \([https\://github\.com/ansible\-collections/community\.general/pull/12589](https\://github\.com/ansible\-collections/community\.general/pull/12589)\, [https\://github\.com/ansible\-collections/community\.general/issues/3616](https\://github\.com/ansible\-collections/community\.general/issues/3616)\)\.
|
||||
* passwordstore lookup plugin \- make <code>directory</code> configurable through <code>ansible\.cfg</code> \([https\://github\.com/ansible\-collections/community\.general/pull/12298](https\://github\.com/ansible\-collections/community\.general/pull/12298)\)\.
|
||||
* pkg5 \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* pkgin \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* pkgng \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* pkgng \- support installing packages from local package files \([https\://github\.com/ansible\-collections/community\.general/issues/3428](https\://github\.com/ansible\-collections/community\.general/issues/3428)\, [https\://github\.com/ansible\-collections/community\.general/pull/12233](https\://github\.com/ansible\-collections/community\.general/pull/12233)\)\.
|
||||
* portage \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* portinstall \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* pritunl\_org \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* pritunl\_org\_info \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* pritunl\_user \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12966](https\://github\.com/ansible\-collections/community\.general/pull/12966)\)\.
|
||||
* pritunl\_user\_info \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* proton\_pass lookup plugin \- return fields inside custom sections of Custom\, SSH Key\, Wi\-Fi\, and Identity items \([https\://github\.com/ansible\-collections/community\.general/issues/12711](https\://github\.com/ansible\-collections/community\.general/issues/12711)\, [https\://github\.com/ansible\-collections/community\.general/pull/13051](https\://github\.com/ansible\-collections/community\.general/pull/13051)\)\.
|
||||
* random\_mac filter plugin \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* read\_csv \- remove Python 2 compatibility \([https\://github\.com/ansible\-collections/community\.general/pull/12893](https\://github\.com/ansible\-collections/community\.general/pull/12893)\)\.
|
||||
* redhat\_subscription \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* reveal\_ansible\_type filter plugin \- remove compatibility code for \< ansible\-core 2\.19 \([https\://github\.com/ansible\-collections/community\.general/pull/12919](https\://github\.com/ansible\-collections/community\.general/pull/12919)\)\.
|
||||
* rhevm \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12976](https\://github\.com/ansible\-collections/community\.general/pull/12976)\)\.
|
||||
* riak \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12952](https\://github\.com/ansible\-collections/community\.general/pull/12952)\)\.
|
||||
* rollbar\_deployment \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* rundeck\_acl\_policy \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* say callback plugin \- redact sensitive output on ansible\-core 2\.22\+ \([https\://github\.com/ansible\-collections/community\.general/pull/12785](https\://github\.com/ansible\-collections/community\.general/pull/12785)\)\.
|
||||
* scaleway\_compute \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* scaleway\_database\_backup \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12952](https\://github\.com/ansible\-collections/community\.general/pull/12952)\)\.
|
||||
* selective callback plugin \- refactor code to remove use of <code>global</code> \([https\://github\.com/ansible\-collections/community\.general/pull/12923](https\://github\.com/ansible\-collections/community\.general/pull/12923)\)\.
|
||||
* serverless \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12953](https\://github\.com/ansible\-collections/community\.general/pull/12953)\)\.
|
||||
* sl\_vm \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12976](https\://github\.com/ansible\-collections/community\.general/pull/12976)\)\.
|
||||
* slack \- add <code>reply\_broadcast</code> option to allow a threaded reply \(<code>thread\_id</code>\) to also be broadcast to the main channel \([https\://github\.com/ansible\-collections/community\.general/pull/12535](https\://github\.com/ansible\-collections/community\.general/pull/12535)\)\.
|
||||
* slack \- added support for uploading files to channels and threads using the new Slack WebAPI \([https\://github\.com/ansible\-collections/community\.general/pull/12032](https\://github\.com/ansible\-collections/community\.general/pull/12032)\)\.
|
||||
* slack \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* slack callback plugin \- redact sensitive output on ansible\-core 2\.22\+ \([https\://github\.com/ansible\-collections/community\.general/pull/12785](https\://github\.com/ansible\-collections/community\.general/pull/12785)\)\.
|
||||
* spectrum\_device \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12966](https\://github\.com/ansible\-collections/community\.general/pull/12966)\)\.
|
||||
* splunk callback plugin \- redact sensitive output on ansible\-core 2\.22\+ \([https\://github\.com/ansible\-collections/community\.general/pull/12785](https\://github\.com/ansible\-collections/community\.general/pull/12785)\)\.
|
||||
* sssd\_info \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* statsd \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12953](https\://github\.com/ansible\-collections/community\.general/pull/12953)\)\.
|
||||
* sudoers \- add <code>defaults</code> parameter to allow specifying <code>Defaults</code> directives scoped to the user or group in the generated sudoers file \([https\://github\.com/ansible\-collections/community\.general/pull/12186](https\://github\.com/ansible\-collections/community\.general/pull/12186)\)\.
|
||||
* sumologic callback plugin \- redact sensitive output on ansible\-core 2\.22\+ \([https\://github\.com/ansible\-collections/community\.general/pull/12785](https\://github\.com/ansible\-collections/community\.general/pull/12785)\)\.
|
||||
* supervisorctl \- add <code>wait</code> option to wait for programs to reach the <code>RUNNING</code> state \([https\://github\.com/ansible\-collections/community\.general/issues/5599](https\://github\.com/ansible\-collections/community\.general/issues/5599)\, [https\://github\.com/ansible\-collections/community\.general/pull/13053](https\://github\.com/ansible\-collections/community\.general/pull/13053)\)\.
|
||||
* supervisorctl \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12952](https\://github\.com/ansible\-collections/community\.general/pull/12952)\)\.
|
||||
* svc \- use string operations instead of regular expressions for plain\-string patterns \([https\://github\.com/ansible\-collections/community\.general/pull/12996](https\://github\.com/ansible\-collections/community\.general/pull/12996)\)\.
|
||||
* syslog\_json callback plugin \- redact sensitive output on ansible\-core 2\.22\+ \([https\://github\.com/ansible\-collections/community\.general/pull/12785](https\://github\.com/ansible\-collections/community\.general/pull/12785)\)\.
|
||||
* terraform \- refactor code to remove use of <code>global</code> \([https\://github\.com/ansible\-collections/community\.general/pull/12922](https\://github\.com/ansible\-collections/community\.general/pull/12922)\)\.
|
||||
* terraform \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12975](https\://github\.com/ansible\-collections/community\.general/pull/12975)\)\.
|
||||
* timezone \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* to\_time\_unit filter plugin \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* tss lookup plugin \- cache the <code>TSSClient</code> per process and credential identity so OAuth2 token grants are reused across lookups \(rebuilding the client and retrying the lookup once on a stale\-token 4xx\, while 5xx and other errors propagate unchanged\)\, and add a <code>token\_path\_source</code> option whose <code>auto</code> value lets <code>python\-tss\-sdk</code> auto\-detect the Secret Server or Delinea Platform token endpoint \([https\://github\.com/ansible\-collections/community\.general/pull/12328](https\://github\.com/ansible\-collections/community\.general/pull/12328)\)\.
|
||||
* ufw \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* usb\_facts \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* uv\_python \- simplify result handling in the module code \([https\://github\.com/ansible\-collections/community\.general/pull/12981](https\://github\.com/ansible\-collections/community\.general/pull/12981)\)\.
|
||||
* version\_sort filter plugin \- add <code>style</code> option to choose the version comparison strategy \([https\://github\.com/ansible\-collections/community\.general/issues/4451](https\://github\.com/ansible\-collections/community\.general/issues/4451)\, [https\://github\.com/ansible\-collections/community\.general/pull/12657](https\://github\.com/ansible\-collections/community\.general/pull/12657)\)\.
|
||||
* vertica\_\* modules \- remove Python \< 2\.5 compatibility \([https\://github\.com/ansible\-collections/community\.general/pull/12893](https\://github\.com/ansible\-collections/community\.general/pull/12893)\)\.
|
||||
* vexata module utils \- refactor code to remove use of <code>global</code> \([https\://github\.com/ansible\-collections/community\.general/pull/12924](https\://github\.com/ansible\-collections/community\.general/pull/12924)\)\.
|
||||
* vexata\_volume \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* vmadm \- add <code>bootrom</code> option to support UEFI boot for <code>bhyve</code> VMs \([https\://github\.com/ansible\-collections/community\.general/pull/12601](https\://github\.com/ansible\-collections/community\.general/pull/12601)\, [https\://github\.com/ansible\-collections/community\.general/issues/4282](https\://github\.com/ansible\-collections/community\.general/issues/4282)\)\.
|
||||
* wdc\_redfish\_command \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* wdc\_redfish\_info \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12950](https\://github\.com/ansible\-collections/community\.general/pull/12950)\)\.
|
||||
* xattr \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12952](https\://github\.com/ansible\-collections/community\.general/pull/12952)\)\.
|
||||
* xbps \- include <code>stdout</code> and <code>stderr</code> from the last executed command in module output \([https\://github\.com/ansible\-collections/community\.general/issues/2478](https\://github\.com/ansible\-collections/community\.general/issues/2478)\, [https\://github\.com/ansible\-collections/community\.general/pull/12234](https\://github\.com/ansible\-collections/community\.general/pull/12234)\)\.
|
||||
* xenserver\_guest\_info \- add VDI <code>uuid</code> and <code>vdi\_type</code> \(VHD/QCOW2\) fields to disk info output \([https\://github\.com/ansible\-collections/community\.general/issues/11998](https\://github\.com/ansible\-collections/community\.general/issues/11998)\, [https\://github\.com/ansible\-collections/community\.general/pull/12119](https\://github\.com/ansible\-collections/community\.general/pull/12119)\)\.
|
||||
* zfs \- do not try to change create\-only properties on existing datasets and compare size properties as byte counts \([https\://github\.com/ansible\-collections/community\.general/issues/4699](https\://github\.com/ansible\-collections/community\.general/issues/4699)\, [https\://github\.com/ansible\-collections/community\.general/pull/12868](https\://github\.com/ansible\-collections/community\.general/pull/12868)\)\.
|
||||
* zfs \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12951](https\://github\.com/ansible\-collections/community\.general/pull/12951)\)\.
|
||||
* zfs\_delegate\_admin \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12953](https\://github\.com/ansible\-collections/community\.general/pull/12953)\)\.
|
||||
* zpool \- compile regular expressions once outside of loops \([https\://github\.com/ansible\-collections/community\.general/pull/12999](https\://github\.com/ansible\-collections/community\.general/pull/12999)\)\.
|
||||
* zpool \- make <code>vdevs</code> optional when the pool already exists\, leaving its vdev layout unchanged \([https\://github\.com/ansible\-collections/community\.general/issues/10766](https\://github\.com/ansible\-collections/community\.general/issues/10766)\, [https\://github\.com/ansible\-collections/community\.general/pull/12816](https\://github\.com/ansible\-collections/community\.general/pull/12816)\)\.
|
||||
* zpool \- update code to follow coding conventions\, without changing functionality \([https\://github\.com/ansible\-collections/community\.general/pull/12966](https\://github\.com/ansible\-collections/community\.general/pull/12966)\)\.
|
||||
* zypper \- <code>allow\_vendor\_change</code> now also applies to the <code>install</code>\, <code>update</code> and <code>patch</code> commands\, not only to <code>dist\-upgrade</code> \([https\://github\.com/ansible\-collections/community\.general/issues/10851](https\://github\.com/ansible\-collections/community\.general/issues/10851)\, [https\://github\.com/ansible\-collections/community\.general/pull/13076](https\://github\.com/ansible\-collections/community\.general/pull/13076)\)\.
|
||||
* zypper \- <code>state\=absent</code> no longer silently ignores names containing the wildcards <code>\*</code> or <code>\?</code>\; they are now matched against the installed packages and removed like <code>zypper remove</code> does \([https\://github\.com/ansible\-collections/community\.general/issues/3138](https\://github\.com/ansible\-collections/community\.general/issues/3138)\, [https\://github\.com/ansible\-collections/community\.general/pull/13075](https\://github\.com/ansible\-collections/community\.general/pull/13075)\)\.
|
||||
* zypper \- add <code>install\_recommends</code> option to explicitly control installation of recommended packages \([https\://github\.com/ansible\-collections/community\.general/issues/3497](https\://github\.com/ansible\-collections/community\.general/issues/3497)\, [https\://github\.com/ansible\-collections/community\.general/pull/12648](https\://github\.com/ansible\-collections/community\.general/pull/12648)\)\.
|
||||
* zypper \- add <code>reboot\_required</code> return value \([https\://github\.com/ansible\-collections/community\.general/issues/12960](https\://github\.com/ansible\-collections/community\.general/issues/12960)\, [https\://github\.com/ansible\-collections/community\.general/pull/12977](https\://github\.com/ansible\-collections/community\.general/pull/12977)\, [https\://github\.com/ansible\-collections/community\.general/pull/13180](https\://github\.com/ansible\-collections/community\.general/pull/13180)\)\.
|
||||
* zypper\_repository \- add <code>allow\_unsigned\_metadata</code> option to accept unsigned repository metadata while keeping the package GPG check \(<code>\-\-gpgcheck\-allow\-unsigned\-repo</code>\) \([https\://github\.com/ansible\-collections/community\.general/issues/2519](https\://github\.com/ansible\-collections/community\.general/issues/2519)\, [https\://github\.com/ansible\-collections/community\.general/pull/13092](https\://github\.com/ansible\-collections/community\.general/pull/13092)\)\.
|
||||
|
||||
<a id="breaking-changes--porting-guide"></a>
|
||||
### Breaking Changes / Porting Guide
|
||||
|
||||
* pfexec become plugin \- the default for <code>wrap\_exe</code> changed from <code>false</code> to <code>true</code> \([https\://github\.com/ansible\-collections/community\.general/pull/12891](https\://github\.com/ansible\-collections/community\.general/pull/12891)\)\.
|
||||
|
||||
<a id="deprecated-features"></a>
|
||||
### Deprecated Features
|
||||
|
||||
* All redirections of Dell iDRAC/OME content to dellemc\.openmanage are deprecated and will be removed in community\.general 18\.0\.0\. Please update your roles/playbooks \([https\://github\.com/ansible\-collections/community\.general/pull/12489](https\://github\.com/ansible\-collections/community\.general/pull/12489)\)\.
|
||||
* All redirections of Docker content to community\.docker are deprecated and will be removed in community\.general 18\.0\.0\. Please update your roles/playbooks \([https\://github\.com/ansible\-collections/community\.general/pull/12489](https\://github\.com/ansible\-collections/community\.general/pull/12489)\)\.
|
||||
* All redirections of Google Cloud content to community\.google are deprecated and will be removed in community\.general 18\.0\.0\. Please update your roles/playbooks \([https\://github\.com/ansible\-collections/community\.general/pull/12489](https\://github\.com/ansible\-collections/community\.general/pull/12489)\)\.
|
||||
* All redirections of HashiCorp Vault content to community\.hashi\_vault are deprecated and will be removed in community\.general 18\.0\.0\. Please update your roles/playbooks \([https\://github\.com/ansible\-collections/community\.general/pull/12489](https\://github\.com/ansible\-collections/community\.general/pull/12489)\)\.
|
||||
* All redirections of Hetzner content to community\.hrobot are deprecated and will be removed in community\.general 18\.0\.0\. Please update your roles/playbooks \([https\://github\.com/ansible\-collections/community\.general/pull/12489](https\://github\.com/ansible\-collections/community\.general/pull/12489)\)\.
|
||||
* All redirections of Kubevirt content to community\.kubevirt are deprecated and will be removed in community\.general 18\.0\.0\. Please update your roles/playbooks \([https\://github\.com/ansible\-collections/community\.general/pull/12489](https\://github\.com/ansible\-collections/community\.general/pull/12489)\)\.
|
||||
* All redirections of NIOS content to infoblox\.nios\_modules are deprecated and will be removed in community\.general 18\.0\.0\. Please update your roles/playbooks \([https\://github\.com/ansible\-collections/community\.general/pull/12489](https\://github\.com/ansible\-collections/community\.general/pull/12489)\)\.
|
||||
* All redirections of OKD content to community\.okd are deprecated and will be removed in community\.general 18\.0\.0\. Please update your roles/playbooks \([https\://github\.com/ansible\-collections/community\.general/pull/12489](https\://github\.com/ansible\-collections/community\.general/pull/12489)\)\.
|
||||
* All redirections of PostgreSQL content to community\.postgresql are deprecated and will be removed in community\.general 18\.0\.0\. Please update your roles/playbooks \([https\://github\.com/ansible\-collections/community\.general/pull/12489](https\://github\.com/ansible\-collections/community\.general/pull/12489)\)\.
|
||||
* All redirections of SAP/HANA content to community\.sap\_libs are deprecated and will be removed in community\.general 18\.0\.0\. Please update your roles/playbooks \([https\://github\.com/ansible\-collections/community\.general/pull/12489](https\://github\.com/ansible\-collections/community\.general/pull/12489)\)\.
|
||||
* cisco\_spark \- the redirect to community\.general\.cisco\_webex is deprecated and will be removed in community\.general 18\.0\.0\. Please update your roles/playbooks \([https\://github\.com/ansible\-collections/community\.general/pull/12489](https\://github\.com/ansible\-collections/community\.general/pull/12489)\)\.
|
||||
* django\_check \- the <code>skip\_checks</code> option is ignored and deprecated\, it will be removed in community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/13001](https\://github\.com/ansible\-collections/community\.general/pull/13001)\)\.
|
||||
* django\_command \- the <code>skip\_checks</code> option is ignored and deprecated\, it will be removed in community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/13001](https\://github\.com/ansible\-collections/community\.general/pull/13001)\)\.
|
||||
* django\_createcachetable \- the <code>skip\_checks</code> option is ignored and deprecated\, it will be removed in community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/13001](https\://github\.com/ansible\-collections/community\.general/pull/13001)\)\.
|
||||
* keycloak\_authentication \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_authentication</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_authentication\_required\_actions \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_authentication\_required\_actions</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_authentication\_v2 \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_authentication\_v2</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_authz\_authorization\_scope \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_authz\_authorization\_scope</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_authz\_custom\_policy \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_authz\_custom\_policy</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_authz\_permission \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_authz\_permission</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_authz\_permission\_info \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_authz\_permission\_info</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_client \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_client</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_client\_rolemapping \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_client\_rolemapping</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_client\_rolescope \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_client\_rolescope</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_clientscope \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_client\_scope</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_clientscope\_rolemappings \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_client\_scope\_rolemappings</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_clientscope\_type \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_client\_scope\_type</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_clientsecret\_info \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_clientsecret\_info</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_clientsecret\_regenerate \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_clientsecret\_regenerate</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_clienttemplate \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_clienttemplate</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_component \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_component</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_component\_info \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_component\_info</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_group \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_group</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_identity\_provider \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_identity\_provider</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_realm \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_realm</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_realm\_info \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_realm\_info</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_realm\_key \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_realm\_key</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_realm\_keys\_metadata\_info \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_realm\_keys\_metadata\_info</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_realm\_localization \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_realm\_localization</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_realm\_rolemapping \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_realm\_rolemapping</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_realm\_users\_info \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_realm\_users\_info</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_role \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_role</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_user \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_user</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_user\_execute\_actions\_email \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_user\_execute\_actions\_email</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_user\_federation \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_user\_federation</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_user\_rolemapping \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_user\_rolemapping</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_userprofile \- the redirect to <code>middleware\_automation\.keycloak\.keycloak\_userprofile</code> is deprecated and will be removed from community\.general 16\.0\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* lldp \- the redirect to community\.general\.lldp\_facts is now deprecated and will be removed from community\.general 16\.0\.0\. Please update your roles and playbooks to use the new name \([https\://github\.com/ansible\-collections/community\.general/pull/12488](https\://github\.com/ansible\-collections/community\.general/pull/12488)\)\.
|
||||
* osx\_say \- the redirect to community\.general\.say is deprecated and will be removed in community\.general 18\.0\.0\. Please update your roles/playbooks \([https\://github\.com/ansible\-collections/community\.general/pull/12489](https\://github\.com/ansible\-collections/community\.general/pull/12489)\)\.
|
||||
* yum\_versionlock \- the module is deprecated and will be removed from community\.general 16\.0\.0\. Use <code>community\.general\.dnf\_versionlock</code> instead \([https\://github\.com/ansible\-collections/community\.general/pull/13173](https\://github\.com/ansible\-collections/community\.general/pull/13173)\)\.
|
||||
|
||||
<a id="removed-features-previously-deprecated"></a>
|
||||
### Removed Features \(previously deprecated\)
|
||||
|
||||
* The collection no longer supports ansible\-core 2\.18\. It requires at least ansible\-core 2\.19\.0\+ \([https\://github\.com/ansible\-collections/community\.general/pull/12891](https\://github\.com/ansible\-collections/community\.general/pull/12891)\)\.
|
||||
* jboss \- the deprecated module has been removed\. Please migrate to the role middleware\_automation\.wildfly\.wildfly\_app\_deploy instead \([https\://github\.com/ansible\-collections/community\.general/pull/12891](https\://github\.com/ansible\-collections/community\.general/pull/12891)\)\.
|
||||
* keycloak\_authentication \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_authentication</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_authentication\_required\_actions \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_authentication\_required\_actions</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_authentication\_v2 \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_authentication\_v2</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_authz\_authorization\_scope \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_authz\_authorization\_scope</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_authz\_custom\_policy \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_authz\_custom\_policy</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_authz\_permission \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_authz\_permission</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_authz\_permission\_info \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_authz\_permission\_info</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_client \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_client</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_client\_rolemapping \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_client\_rolemapping</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_client\_rolescope \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_client\_rolescope</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_clientscope \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_client\_scope</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_clientscope\_rolemappings \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_client\_scope\_rolemappings</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_clientscope\_type \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_client\_scope\_type</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_clientsecret\_info \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_clientsecret\_info</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_clientsecret\_regenerate \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_clientsecret\_regenerate</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_clienttemplate \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_clienttemplate</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_component \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_component</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_component\_info \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_component\_info</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_group \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_group</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_identity\_provider \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_identity\_provider</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_realm \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_realm</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_realm\_info \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_realm\_info</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_realm\_key \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_realm\_key</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_realm\_keys\_metadata\_info \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_realm\_keys\_metadata\_info</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_realm\_localization \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_realm\_localization</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_realm\_rolemapping \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_realm\_rolemapping</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_realm\_users\_info \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_realm\_users\_info</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_role \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_role</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_user \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_user</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_user\_execute\_actions\_email \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_user\_execute\_actions\_email</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_user\_federation \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_user\_federation</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_user\_rolemapping \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_user\_rolemapping</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* keycloak\_userprofile \- the module has been replaced by a redirect to <code>middleware\_automation\.keycloak\.keycloak\_userprofile</code>\. You need to install <code>middleware\_automation\.keycloak</code> to make this redirect work \([https\://github\.com/ansible\-collections/community\.general/pull/12483](https\://github\.com/ansible\-collections/community\.general/pull/12483)\)\.
|
||||
* layman \- the deprecated module has been removed \([https\://github\.com/ansible\-collections/community\.general/pull/12891](https\://github\.com/ansible\-collections/community\.general/pull/12891)\)\.
|
||||
* linode \- the deprecated module has been removed\. Use community\.general\.linode\_v4 instead \([https\://github\.com/ansible\-collections/community\.general/pull/12891](https\://github\.com/ansible\-collections/community\.general/pull/12891)\)\.
|
||||
* loganalytics callback plugin \- the deprecated plugin has been removed\. Please migrate to the community\.general\.loganalytics\_ingestion callback plugin instead \([https\://github\.com/ansible\-collections/community\.general/pull/12891](https\://github\.com/ansible\-collections/community\.general/pull/12891)\)\.
|
||||
* monit \- no longer supports monit \< 5\.19 \([https\://github\.com/ansible\-collections/community\.general/pull/12891](https\://github\.com/ansible\-collections/community\.general/pull/12891)\)\.
|
||||
* pacemaker\_cluster \- the deprecated <code>cleanup</code> state has been removed\. Use the community\.general\.pacemaker\_resource module instead \([https\://github\.com/ansible\-collections/community\.general/pull/12891](https\://github\.com/ansible\-collections/community\.general/pull/12891)\)\.
|
||||
* puppet \- the deprecated <code>timeout</code> option has been removed\. Use the task\-level <code>timeout</code> instead \([https\://github\.com/ansible\-collections/community\.general/pull/12891](https\://github\.com/ansible\-collections/community\.general/pull/12891)\)\.
|
||||
|
||||
<a id="security-fixes"></a>
|
||||
### Security Fixes
|
||||
|
||||
* proton\_pass lookup plugin \- no longer exposes the personal access token in error messages\, verbose output\, or the process list \([https\://github\.com/ansible\-collections/community\.general/issues/12710](https\://github\.com/ansible\-collections/community\.general/issues/12710)\, [https\://github\.com/ansible\-collections/community\.general/pull/12726](https\://github\.com/ansible\-collections/community\.general/pull/12726)\)\.
|
||||
|
||||
<a id="bugfixes-1"></a>
|
||||
### Bugfixes
|
||||
|
||||
* aix\_devices \- fix <code>chdev</code> command failures being incorrectly reported as successful results\, now properly fails the task when device attribute changes cannot be applied \([https\://github\.com/ansible\-collections/community\.general/pull/12185](https\://github\.com/ansible\-collections/community\.general/pull/12185)\)\.
|
||||
* apache2\_module \- determine <code>changed</code> from the output of <code>a2enmod</code>/<code>a2dismod</code> when <code>ignore\_configcheck\=true</code> and the Apache configuration check fails \([https\://github\.com/ansible\-collections/community\.general/issues/3510](https\://github\.com/ansible\-collections/community\.general/issues/3510)\, [https\://github\.com/ansible\-collections/community\.general/pull/13147](https\://github\.com/ansible\-collections/community\.general/pull/13147)\)\.
|
||||
* apache2\_module \- fix <code>state\=absent</code> doing nothing when <code>ignore\_configcheck\=true</code> and the Apache configuration check fails \([https\://github\.com/ansible\-collections/community\.general/issues/3510](https\://github\.com/ansible\-collections/community\.general/issues/3510)\, [https\://github\.com/ansible\-collections/community\.general/pull/13147](https\://github\.com/ansible\-collections/community\.general/pull/13147)\)\.
|
||||
* apache2\_module \- fix false failures when <code>ignore\_configcheck</code> is set and the configuration is broken for a reason unrelated to the module being changed \([https\://github\.com/ansible\-collections/community\.general/issues/4592](https\://github\.com/ansible\-collections/community\.general/issues/4592)\, [https\://github\.com/ansible\-collections/community\.general/pull/12597](https\://github\.com/ansible\-collections/community\.general/pull/12597)\)\.
|
||||
* apk \- fail cleanly when the <code>world</code> file cannot be read \([https\://github\.com/ansible\-collections/community\.general/issues/10739](https\://github\.com/ansible\-collections/community\.general/issues/10739)\, [https\://github\.com/ansible\-collections/community\.general/pull/13179](https\://github\.com/ansible\-collections/community\.general/pull/13179)\)\.
|
||||
* apk \- the <code>upgrade</code> operation no longer reports <code>changed\=true</code> when nothing was upgraded but an apk commit hook \(for example <code>mrtest</code>\, or anything installed in <code>/etc/apk/commit\_hooks\.d/</code>\) printed output before the trailing <code>OK\:</code> summary line\; the change status is now derived from the packages apk actually reports upgrading \([https\://github\.com/ansible\-collections/community\.general/issues/12223](https\://github\.com/ansible\-collections/community\.general/issues/12223)\, [https\://github\.com/ansible\-collections/community\.general/pull/12376](https\://github\.com/ansible\-collections/community\.general/pull/12376)\)\.
|
||||
* bitwarden lookup plugin \- mark the <code>bw\_session</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* bitwarden\_secrets\_manager lookup plugin \- mark the <code>bws\_access\_token</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* capabilities \- fix idempotency when the installed <code>libcap</code> normalizes capability operators or flags\, or when multiple capabilities are set at once \([https\://github\.com/ansible\-collections/community\.general/issues/4067](https\://github\.com/ansible\-collections/community\.general/issues/4067)\, [https\://github\.com/ansible\-collections/community\.general/pull/12650](https\://github\.com/ansible\-collections/community\.general/pull/12650)\)\.
|
||||
* cloudflare\_dns \- fix detection of existing CAA\, SRV\, and TLSA records \([https\://github\.com/ansible\-collections/community\.general/issues/7766](https\://github\.com/ansible\-collections/community\.general/issues/7766)\, [https\://github\.com/ansible\-collections/community\.general/issues/7780](https\://github\.com/ansible\-collections/community\.general/issues/7780)\, [https\://github\.com/ansible\-collections/community\.general/pull/13170](https\://github\.com/ansible\-collections/community\.general/pull/13170)\)\.
|
||||
* cloudflare\_dns \- fix failure when looking up records whose value contains a comma \([https\://github\.com/ansible\-collections/community\.general/issues/10208](https\://github\.com/ansible\-collections/community\.general/issues/10208)\, [https\://github\.com/ansible\-collections/community\.general/pull/13119](https\://github\.com/ansible\-collections/community\.general/pull/13119)\)\.
|
||||
* cobbler inventory plugin \- do not use TLS when connecting to <code>http\://</code> URLs \([https\://github\.com/ansible\-collections/community\.general/issues/11246](https\://github\.com/ansible\-collections/community\.general/issues/11246)\, [https\://github\.com/ansible\-collections/community\.general/pull/12847](https\://github\.com/ansible\-collections/community\.general/pull/12847)\)\.
|
||||
* cobbler inventory plugin \- fix crash about a missing <code>\_cache</code> attribute when inventory caching is disabled \([https\://github\.com/ansible\-collections/community\.general/pull/12848](https\://github\.com/ansible\-collections/community\.general/pull/12848)\)\.
|
||||
* cobbler inventory plugin \- mark the <code>password</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* composer \- fix <code>apcu\_autoloader</code> never passing <code>\-\-apcu\-autoloader</code> to composer\, because the option was mapped to the misspelled <code>acpu\-autoloader</code> \([https\://github\.com/ansible\-collections/community\.general/pull/12988](https\://github\.com/ansible\-collections/community\.general/pull/12988)\)\.
|
||||
* composer \- pass <code>\-\-apcu</code> for <code>apcu\_autoloader</code> to <code>dump\-autoload</code>\, which has no <code>\-\-apcu\-autoloader</code> flag \([https\://github\.com/ansible\-collections/community\.general/pull/12989](https\://github\.com/ansible\-collections/community\.general/pull/12989)\)\.
|
||||
* composer \- restore compatibility with older compose versions when using <code>working\_dir</code> \([https\://github\.com/ansible\-collections/community\.general/issues/12293](https\://github\.com/ansible\-collections/community\.general/issues/12293)\, [https\://github\.com/ansible\-collections/community\.general/pull/12339](https\://github\.com/ansible\-collections/community\.general/pull/12339)\)\.
|
||||
* composer \- the <code>\-\-working\-dir</code> option is now always placed first on the command line\, before the subcommand\, to ensure consistent behavior across all composer commands \([https\://github\.com/ansible\-collections/community\.general/issues/5204](https\://github\.com/ansible\-collections/community\.general/issues/5204)\, [https\://github\.com/ansible\-collections/community\.general/pull/12084](https\://github\.com/ansible\-collections/community\.general/pull/12084)\)\.
|
||||
* composer \- use file checksum to determine <code>changed</code> status when <code>command\=config</code>\, instead of relying on the command return output\. The module now compares SHA256 checksums of relevant configuration files \(<code>composer\.json</code>\, <code>auth\.json</code>\, or their global equivalents\) before and after running the command \([https\://github\.com/ansible\-collections/community\.general/pull/12084](https\://github\.com/ansible\-collections/community\.general/pull/12084)\)\.
|
||||
* consul\_kv lookup plugin \- mark the <code>token</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* counter\_enabled callback \- fix missing output for looped tasks\, including tasks using <code>delegate\_to</code> \([https\://github\.com/ansible\-collections/community\.general/issues/8187](https\://github\.com/ansible\-collections/community\.general/issues/8187)\, [https\://github\.com/ansible\-collections/community\.general/pull/12067](https\://github\.com/ansible\-collections/community\.general/pull/12067)\)\.
|
||||
* credstash lookup plugin \- mark the <code>aws\_secret\_access\_key</code> and <code>aws\_session\_token</code> options as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* diy callback plugin \- no longer emits deprecation warnings about <code>v2\_on\_any</code> and <code>convert\_data</code> with ansible\-core 2\.19 and later \([https\://github\.com/ansible\-collections/community\.general/issues/10545](https\://github\.com/ansible\-collections/community\.general/issues/10545)\, [https\://github\.com/ansible\-collections/community\.general/pull/13093](https\://github\.com/ansible\-collections/community\.general/pull/13093)\)\.
|
||||
* django\_createcachetable \- do not pass the unsupported <code>\-\-noinput</code> option to <code>django\-admin createcachetable</code> \([https\://github\.com/ansible\-collections/community\.general/pull/13002](https\://github\.com/ansible\-collections/community\.general/pull/13002)\)\.
|
||||
* dnf\_config\_manager \- fix incompatibility with DNF5\. The module was crashing on systems with DNF5 due to CLI changes since DNF4 \([https\://github\.com/ansible\-collections/community\.general/issues/9127](https\://github\.com/ansible\-collections/community\.general/issues/9127)\, [https\://github\.com/ansible\-collections/community\.general/pull/12206](https\://github\.com/ansible\-collections/community\.general/pull/12206)\)\.
|
||||
* doas become plugin \- mark the <code>become\_pass</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* dsv lookup plugin \- mark the <code>client\_secret</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* dzdo become plugin \- mark the <code>become\_pass</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* elastic callback plugin \- mark the <code>apm\_secret\_token</code> and <code>apm\_api\_key</code> options as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* etcd3 lookup plugin \- mark the <code>password</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* filesystem \- handle BusyBox <code>blkid</code> output to correctly detect existing filesystems on systems like Alpine Linux \([https\://github\.com/ansible\-collections/community\.general/issues/7283](https\://github\.com/ansible\-collections/community\.general/issues/7283)\, [https\://github\.com/ansible\-collections/community\.general/pull/12235](https\://github\.com/ansible\-collections/community\.general/pull/12235)\)\.
|
||||
* filesystem \- the module now also handles the output format of bcachefs\-tools v1\.38\.4 and above \([https\://github\.com/ansible\-collections/community\.general/issues/12259](https\://github\.com/ansible\-collections/community\.general/issues/12259)\, [https\://github\.com/ansible\-collections/community\.general/pull/12291](https\://github\.com/ansible\-collections/community\.general/pull/12291)\)\.
|
||||
* filetree lookup plugin \- raise <code>AnsibleLookupError</code> when the <code>exclude</code> option contains an invalid regular expression instead of an uncaught <code>re\.error</code> \([https\://github\.com/ansible\-collections/community\.general/pull/12140](https\://github\.com/ansible\-collections/community\.general/pull/12140)\)\.
|
||||
* git\_config and git\_config\_info \- allow empty string values and preserve idempotency \([https\://github\.com/ansible\-collections/community\.general/issues/12502](https\://github\.com/ansible\-collections/community\.general/issues/12502)\, [https\://github\.com/ansible\-collections/community\.general/pull/12708](https\://github\.com/ansible\-collections/community\.general/pull/12708)\)\.
|
||||
* github\_app\_access\_token lookup plugin \- mark the <code>private\_key</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* github\_app\_access\_token lookup plugin \- mark the return value as a secret on ansible\-core 2\.22\+ \([https\://github\.com/ansible\-collections/community\.general/pull/12884](https\://github\.com/ansible\-collections/community\.general/pull/12884)\)\.
|
||||
* github\_deploy\_key \- do not delete an existing deploy key when running with <code>state\=absent</code> in check mode \([https\://github\.com/ansible\-collections/community\.general/issues/12348](https\://github\.com/ansible\-collections/community\.general/issues/12348)\, [https\://github\.com/ansible\-collections/community\.general/pull/13132](https\://github\.com/ansible\-collections/community\.general/pull/13132)\)\.
|
||||
* gitlab\_instance\_variable \- ignore the <code>hidden</code> attribute that GitLab 19\.1 and newer return for instance variables when comparing them with the requested variables\. Before\, <code>purge\=true</code> deleted every instance variable\, including the ones the task had just created\, and every run reported a change \([https\://github\.com/ansible\-collections/community\.general/issues/12349](https\://github\.com/ansible\-collections/community\.general/issues/12349)\, [https\://github\.com/ansible\-collections/community\.general/pull/13029](https\://github\.com/ansible\-collections/community\.general/pull/13029)\)\.
|
||||
* gitlab\_project \- fix <code>\'bool\' object has no attribute \'attributes\'</code> \([https\://github\.com/ansible\-collections/community\.general/issues/12902](https\://github\.com/ansible\-collections/community\.general/issues/12902)\, [https\://github\.com/ansible\-collections/community\.general/pull/12903](https\://github\.com/ansible\-collections/community\.general/pull/12903)\)\.
|
||||
* gitlab\_project \- return <code>project</code> in the result when running in check mode \([https\://github\.com/ansible\-collections/community\.general/pull/12689](https\://github\.com/ansible\-collections/community\.general/pull/12689)\, [https\://github\.com/ansible\-collections/community\.general/issues/5689](https\://github\.com/ansible\-collections/community\.general/issues/5689)\)\.
|
||||
* gitlab\_runner \- do not fail with <code>\'\<\' not supported between instances of \'str\' and \'int\'</code> when python\-gitlab cannot read the GitLab server version\. The module now assumes that the server is new enough and emits a warning \([https\://github\.com/ansible\-collections/community\.general/issues/12707](https\://github\.com/ansible\-collections/community\.general/issues/12707)\, [https\://github\.com/ansible\-collections/community\.general/pull/12899](https\://github\.com/ansible\-collections/community\.general/pull/12899)\)\.
|
||||
* gitlab\_runners inventory plugin \- mark the <code>api\_token</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* gitlab\_user \- fix lookup of existing users whose username contains uppercase letters \([https\://github\.com/ansible\-collections/community\.general/issues/5999](https\://github\.com/ansible\-collections/community\.general/issues/5999)\, [https\://github\.com/ansible\-collections/community\.general/pull/13064](https\://github\.com/ansible\-collections/community\.general/pull/13064)\)\.
|
||||
* haproxy \- fix <code>state\=disabled</code> with <code>drain\=true</code> timing out instead of putting a server that is already down into maintenance mode \([https\://github\.com/ansible\-collections/community\.general/issues/9020](https\://github\.com/ansible\-collections/community\.general/issues/9020)\, [https\://github\.com/ansible\-collections/community\.general/pull/12640](https\://github\.com/ansible\-collections/community\.general/pull/12640)\)\.
|
||||
* homebrew\_cask \- fix <code>brew \-\-version</code> parsing to handle version strings with more than three dot\-separated segments \(for example\, some vendor Homebrew builds report a fourth segment\)\. The previous regex could silently drop the leading segment\, misjudging whether the deprecated <code>brew cask</code> command syntax is still required and causing installs to fail with an unknown\-command error \([https\://github\.com/ansible\-collections/community\.general/pull/12559](https\://github\.com/ansible\-collections/community\.general/pull/12559)\)\.
|
||||
* htpasswd \- fix <code>hash\_scheme</code> aliases and Apache\-compatible <code>bcrypt</code> hashes \([https\://github\.com/ansible\-collections/community\.general/issues/6135](https\://github\.com/ansible\-collections/community\.general/issues/6135)\, [https\://github\.com/ansible\-collections/community\.general/pull/12123](https\://github\.com/ansible\-collections/community\.general/pull/12123)\)\.
|
||||
* icinga2 inventory plugin \- mark the <code>password</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* icinga2\_host \- fix <code>JSONDecodeError</code> raised when the Icinga2 API returns an HTTP error response \([https\://github\.com/ansible\-collections/community\.general/pull/12687](https\://github\.com/ansible\-collections/community\.general/pull/12687)\, [https\://github\.com/ansible\-collections/community\.general/issues/4948](https\://github\.com/ansible\-collections/community\.general/issues/4948)\)\.
|
||||
* idrac\_redfish\_config \- fix setting attributes on iDRAC10 \([https\://github\.com/ansible\-collections/community\.general/issues/10232](https\://github\.com/ansible\-collections/community\.general/issues/10232)\, [https\://github\.com/ansible\-collections/community\.general/pull/13141](https\://github\.com/ansible\-collections/community\.general/pull/13141)\)\.
|
||||
* incus connection plugin \- detect failed <code>incus file push</code>/<code>incus file pull</code> transfers and raise a clear error naming the instance and the CLI stderr\, instead of silently reporting success and failing later with a misleading <code>chmod\: No such file or directory</code> error \([https\://github\.com/ansible\-collections/community\.general/pull/12464](https\://github\.com/ansible\-collections/community\.general/pull/12464)\)\.
|
||||
* incus connection plugin \- improve Windows PowerShell argv handling by stripping wrapper quotes from payload arguments for <code>\-enc</code>\, <code>\-encodedcommand</code>\, <code>\-command</code>\, <code>\-c</code>\, <code>\-file</code> and <code>\-f</code> \([https\://github\.com/ansible\-collections/community\.general/issues/12161](https\://github\.com/ansible\-collections/community\.general/issues/12161)\, [https\://github\.com/ansible\-collections/community\.general/pull/12158](https\://github\.com/ansible\-collections/community\.general/pull/12158)\)\.
|
||||
* incus connection plugin \- return <code>stdout</code>/<code>stderr</code> as bytes instead of strings to restore compatibility with ansible\-core 2\.21 module execution \([https\://github\.com/ansible\-collections/community\.general/issues/12161](https\://github\.com/ansible\-collections/community\.general/issues/12161)\, [https\://github\.com/ansible\-collections/community\.general/pull/12158](https\://github\.com/ansible\-collections/community\.general/pull/12158)\)\.
|
||||
* influxdb\_retention\_policy \- fix <code>TypeError</code> when altering a retention policy without <code>shard\_group\_duration</code> set \([https\://github\.com/ansible\-collections/community\.general/issues/3897](https\://github\.com/ansible\-collections/community\.general/issues/3897)\, [https\://github\.com/ansible\-collections/community\.general/pull/12652](https\://github\.com/ansible\-collections/community\.general/pull/12652)\)\.
|
||||
* ini\_file \- do not add an option without value when <code>allow\_no\_value\=true</code> and the requested values already exist \([https\://github\.com/ansible\-collections/community\.general/issues/9296](https\://github\.com/ansible\-collections/community\.general/issues/9296)\, [https\://github\.com/ansible\-collections/community\.general/pull/13089](https\://github\.com/ansible\-collections/community\.general/pull/13089)\)\.
|
||||
* ini\_file \- do not delete comment\-only lines that contain the option name \([https\://github\.com/ansible\-collections/community\.general/issues/11919](https\://github\.com/ansible\-collections/community\.general/issues/11919)\, [https\://github\.com/ansible\-collections/community\.general/pull/12083](https\://github\.com/ansible\-collections/community\.general/pull/12083)\)\.
|
||||
* ip\_netns \- fix namespace existence checks when one namespace name is a prefix of another \([https\://github\.com/ansible\-collections/community\.general/issues/12731](https\://github\.com/ansible\-collections/community\.general/issues/12731)\, [https\://github\.com/ansible\-collections/community\.general/pull/12743](https\://github\.com/ansible\-collections/community\.general/pull/12743)\)\.
|
||||
* ip\_netns \- report no change in check mode for <code>state\=present</code> when the requested namespace already exists \([https\://github\.com/ansible\-collections/community\.general/issues/12839](https\://github\.com/ansible\-collections/community\.general/issues/12839)\, [https\://github\.com/ansible\-collections/community\.general/pull/12842](https\://github\.com/ansible\-collections/community\.general/pull/12842)\)\.
|
||||
* ipa\_hostgroup \- fix task failure when it actually succeeded \([https\://github\.com/ansible\-collections/community\.general/issues/12853](https\://github\.com/ansible\-collections/community\.general/issues/12853)\, [https\://github\.com/ansible\-collections/community\.general/pull/12854](https\://github\.com/ansible\-collections/community\.general/pull/12854)\)\.
|
||||
* ipa\_user \- send only changed attributes when modifying a user \([https\://github\.com/ansible\-collections/community\.general/issues/8296](https\://github\.com/ansible\-collections/community\.general/issues/8296)\, [https\://github\.com/ansible\-collections/community\.general/pull/13078](https\://github\.com/ansible\-collections/community\.general/pull/13078)\)\.
|
||||
* ipa\_user \- set <code>krbpasswordexpiration</code> in a separate request after the password\, because FreeIPA resets the expiration date when an administrator sets the password \([https\://github\.com/ansible\-collections/community\.general/issues/12850](https\://github\.com/ansible\-collections/community\.general/issues/12850)\, [https\://github\.com/ansible\-collections/community\.general/pull/13171](https\://github\.com/ansible\-collections/community\.general/pull/13171)\)\.
|
||||
* iptables\_state \- refactor code to avoid unnecessary unused variables and improve internal state handling \([https\://github\.com/ansible\-collections/community\.general/pull/12093](https\://github\.com/ansible\-collections/community\.general/pull/12093)\)\.
|
||||
* iso\_create \- fix failure with non\-conforming ISO9660 path characters \([https\://github\.com/ansible\-collections/community\.general/issues/5103](https\://github\.com/ansible\-collections/community\.general/issues/5103)\, [https\://github\.com/ansible\-collections/community\.general/pull/12028](https\://github\.com/ansible\-collections/community\.general/pull/12028)\)\.
|
||||
* jabber \- do not send an unnecessary <code>muc\#user</code> tag on groupchat messages \([https\://github\.com/ansible\-collections/community\.general/pull/12658](https\://github\.com/ansible\-collections/community\.general/pull/12658)\, [https\://github\.com/ansible\-collections/community\.general/issues/5343](https\://github\.com/ansible\-collections/community\.general/issues/5343)\)\.
|
||||
* jabber callback plugin \- mark the <code>password</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* java\_cert \- detect silent <code>keytool</code> failures by verifying the import outcome after the command exits with <code>rc\=0</code> \([https\://github\.com/ansible\-collections/community\.general/issues/6685](https\://github\.com/ansible\-collections/community\.general/issues/6685)\, [https\://github\.com/ansible\-collections/community\.general/pull/12238](https\://github\.com/ansible\-collections/community\.general/pull/12238)\)\.
|
||||
* java\_cert \- fix <code>NullPointerException</code> when importing from a PKCS12 file with a password on Java 8 \([https\://github\.com/ansible\-collections/community\.general/issues/3023](https\://github\.com/ansible\-collections/community\.general/issues/3023)\, [https\://github\.com/ansible\-collections/community\.general/pull/12151](https\://github\.com/ansible\-collections/community\.general/pull/12151)\)\.
|
||||
* jenkins\_job\_info \- fix <code>KeyError\: \'color\'</code> when filtering folder jobs by color \([https\://github\.com/ansible\-collections/community\.general/issues/12232](https\://github\.com/ansible\-collections/community\.general/issues/12232)\)\, [https\://github\.com/ansible\-collections/community\.general/pull/12369](https\://github\.com/ansible\-collections/community\.general/pull/12369)\)\.
|
||||
* ksu become plugin \- mark the <code>become\_pass</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* launchd \- fix <code>restarted</code> and <code>reloaded</code> states always reporting <code>changed\=False</code> \([https\://github\.com/ansible\-collections/community\.general/issues/6199](https\://github\.com/ansible\-collections/community\.general/issues/6199)\, [https\://github\.com/ansible\-collections/community\.general/pull/12122](https\://github\.com/ansible\-collections/community\.general/pull/12122)\)\.
|
||||
* ldap\_attrs \- when the server raises <code>INAPPROPRIATE\_MATCHING</code> because an attribute has no EQUALITY matching rule \(for example\, certain <code>olcTLS\*</code> attributes on older OpenLDAP versions\)\, the module now falls back to Python\-side value comparison instead of crashing \([https\://github\.com/ansible\-collections/community\.general/issues/3559](https\://github\.com/ansible\-collections/community\.general/issues/3559)\, [https\://github\.com/ansible\-collections/community\.general/issues/12596](https\://github\.com/ansible\-collections/community\.general/issues/12596)\, [https\://github\.com/ansible\-collections/community\.general/pull/12628](https\://github\.com/ansible\-collections/community\.general/pull/12628)\)\.
|
||||
* linode inventory plugin \- mark the <code>access\_token</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* log\_plays callback plugin \- change type of the <code>log\_folder</code> option from <code>str</code> to <code>path</code> \([https\://github\.com/ansible\-collections/community\.general/issues/5389](https\://github\.com/ansible\-collections/community\.general/issues/5389)\, [https\://github\.com/ansible\-collections/community\.general/pull/13047](https\://github\.com/ansible\-collections/community\.general/pull/13047)\)\.
|
||||
* loganalytics\_ingestion callback plugin \- mark the <code>shared\_key</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* logdna callback plugin \- mark the <code>conf\_key</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* logentries callback plugin \- mark the <code>token</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* lvol \- fix a hang when ensuring an LVM snapshot that already exists \([https\://github\.com/ansible\-collections/community\.general/issues/12477](https\://github\.com/ansible\-collections/community\.general/issues/12477)\, [https\://github\.com/ansible\-collections/community\.general/pull/12810](https\://github\.com/ansible\-collections/community\.general/pull/12810)\)\.
|
||||
* lxc\_container \- fix <code>create\_script</code> to accept a single tuple argument\, resolving a <code>TypeError</code> that silently prevented <code>container\_command</code> from being executed \([https\://github\.com/ansible\-collections/community\.general/issues/11360](https\://github\.com/ansible\-collections/community\.general/issues/11360)\, [https\://github\.com/ansible\-collections/community\.general/pull/12106](https\://github\.com/ansible\-collections/community\.general/pull/12106)\)\.
|
||||
* lxc\_container \- fix archiving containers on LXC 2\.1 and newer\, which failed with <code>KeyError</code> because the module read the removed <code>lxc\.rootfs</code> config key instead of <code>lxc\.rootfs\.path</code> \([https\://github\.com/ansible\-collections/community\.general/issues/12562](https\://github\.com/ansible\-collections/community\.general/issues/12562)\, [https\://github\.com/ansible\-collections/community\.general/pull/12982](https\://github\.com/ansible\-collections/community\.general/pull/12982)\)\.
|
||||
* lxd connection plugin \- detect failed <code>lxc file push</code>/<code>lxc file pull</code> transfers and raise a clear error naming the instance and the CLI stderr\, instead of silently reporting success and failing later with a misleading <code>chmod\: No such file or directory</code> error \([https\://github\.com/ansible\-collections/community\.general/pull/12464](https\://github\.com/ansible\-collections/community\.general/pull/12464)\)\.
|
||||
* lxd inventory plugin \- mark the <code>trust\_password</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* machinectl become plugin \- mark the <code>become\_pass</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* mail \- fail when an encrypted connection cannot be established with <code>secure\=always</code>\, instead of sending the mail unencrypted \([https\://github\.com/ansible\-collections/community\.general/pull/13068](https\://github\.com/ansible\-collections/community\.general/pull/13068)\)\.
|
||||
* mail \- open only one connection to the SMTP server instead of two \([https\://github\.com/ansible\-collections/community\.general/pull/13069](https\://github\.com/ansible\-collections/community\.general/pull/13069)\)\.
|
||||
* mail \- report connection errors such as a refused connection as a module failure instead of a traceback \([https\://github\.com/ansible\-collections/community\.general/issues/7122](https\://github\.com/ansible\-collections/community\.general/issues/7122)\, [https\://github\.com/ansible\-collections/community\.general/pull/13067](https\://github\.com/ansible\-collections/community\.general/pull/13067)\)\.
|
||||
* modules using <code>CmdRunner</code> \- environment variables set for a single command are no longer passed to subsequent commands \([https\://github\.com/ansible\-collections/community\.general/issues/12904](https\://github\.com/ansible\-collections/community\.general/issues/12904)\, [https\://github\.com/ansible\-collections/community\.general/pull/12905](https\://github\.com/ansible\-collections/community\.general/pull/12905)\)\.
|
||||
* nmcli \- add <code>bond\_mode\_behavior</code> to control whether omitted <code>mode</code> preserves the existing bond mode or uses the legacy <code>balance\-rr</code> default on existing connections \([https\://github\.com/ansible\-collections/community\.general/issues/9201](https\://github\.com/ansible\-collections/community\.general/issues/9201)\, [https\://github\.com/ansible\-collections/community\.general/pull/12114](https\://github\.com/ansible\-collections/community\.general/pull/12114)\)\.
|
||||
* nmcli \- fail when the connection editor reports an error instead of reporting a change \([https\://github\.com/ansible\-collections/community\.general/issues/9091](https\://github\.com/ansible\-collections/community\.general/issues/9091)\, [https\://github\.com/ansible\-collections/community\.general/pull/13116](https\://github\.com/ansible\-collections/community\.general/pull/13116)\)\.
|
||||
* nmcli \- fix <code>wifi\_sec</code> flags options always reporting changes and failing with integer values \([https\://github\.com/ansible\-collections/community\.general/issues/9121](https\://github\.com/ansible\-collections/community\.general/issues/9121)\, [https\://github\.com/ansible\-collections/community\.general/pull/13080](https\://github\.com/ansible\-collections/community\.general/pull/13080)\)\.
|
||||
* nmcli \- fix check/diff reporting changes for bond <code>arp\_interval</code> and <code>arp\_ip\_target</code> options when they are already configured \([https\://github\.com/ansible\-collections/community\.general/issues/11588](https\://github\.com/ansible\-collections/community\.general/issues/11588)\, [https\://github\.com/ansible\-collections/community\.general/pull/12085](https\://github\.com/ansible\-collections/community\.general/pull/12085)\)\.
|
||||
* nmcli \- fix incorrectly reports diff for bond connections when <code>mtu</code> is unset and NetworkManager reports no explicit MTU value \([https\://github\.com/ansible\-collections/community\.general/pull/12085](https\://github\.com/ansible\-collections/community\.general/pull/12085)\)\.
|
||||
* nmcli \- fix list suboptions of <code>wifi</code> and <code>wifi\_sec</code> being sent to nmcli one character at a time when given as a string \([https\://github\.com/ansible\-collections/community\.general/issues/7500](https\://github\.com/ansible\-collections/community\.general/issues/7500)\, [https\://github\.com/ansible\-collections/community\.general/pull/13072](https\://github\.com/ansible\-collections/community\.general/pull/13072)\)\.
|
||||
* nmcli \- now handles connection names derived from MAC addresses\, and generally names that contain <code>\:</code> or <code>\\\\</code> \([https\://github\.com/ansible\-collections/community\.general/issues/12386](https\://github\.com/ansible\-collections/community\.general/issues/12386)\, [https\://github\.com/ansible\-collections/community\.general/pull/12387](https\://github\.com/ansible\-collections/community\.general/pull/12387)\)\.
|
||||
* npm \- fix <code>JSONDecodeError</code> when npm\'s stdout output contains warnings or notices alongside the JSON payload \([https\://github\.com/ansible\-collections/community\.general/pull/12665](https\://github\.com/ansible\-collections/community\.general/pull/12665)\, [https\://github\.com/ansible\-collections/community\.general/issues/4960](https\://github\.com/ansible\-collections/community\.general/issues/4960)\)\.
|
||||
* nrdp callback plugin \- mark the <code>token</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* onepassword lookup plugin \- the <code>op\://</code> secret reference lookup returned raw bytes instead of a string\, which broke passing the value into other modules \([https\://github\.com/ansible\-collections/community\.general/pull/11958](https\://github\.com/ansible\-collections/community\.general/pull/11958)\)\.
|
||||
* onepassword\, onepassword\_doc\, onepassword\_raw\, and onepassword\_ssh\_key lookup plugins \- mark the <code>master\_password</code>\, <code>secret\_key</code>\, <code>service\_account\_token</code>\, and <code>connect\_token</code> options as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* online inventory plugin \- mark the <code>oauth\_token</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* open\_iscsi \- fix login to a single target ignoring login failures and the <code>portal</code> option \([https\://github\.com/ansible\-collections/community\.general/pull/12928](https\://github\.com/ansible\-collections/community\.general/pull/12928)\)\.
|
||||
* opennebula inventory plugin \- coerce <code>SSH\_PORT</code> to an integer before setting <code>ansible\_port</code> \([https\://github\.com/ansible\-collections/community\.general/pull/12437](https\://github\.com/ansible\-collections/community\.general/pull/12437)\)\.
|
||||
* opennebula inventory plugin \- fix crash when retrieving VM without NIC \([https\://github\.com/ansible\-collections/community\.general/pull/12361](https\://github\.com/ansible\-collections/community\.general/pull/12361)\)\.
|
||||
* opennebula inventory plugin \- mark the <code>api\_password</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* opentelemetry callback plugin \- each host\'s span event now carries that host\'s task result instead of the result of the host that reported last \([https\://github\.com/ansible\-collections/community\.general/issues/12987](https\://github\.com/ansible\-collections/community\.general/issues/12987)\, [https\://github\.com/ansible\-collections/community\.general/pull/13011](https\://github\.com/ansible\-collections/community\.general/pull/13011)\)\.
|
||||
* opentelemetry callback plugin \- fix <code>KeyError</code> when a meta task is skipped by its <code>when</code> condition \([https\://github\.com/ansible\-collections/community\.general/issues/12833](https\://github\.com/ansible\-collections/community\.general/issues/12833)\, [https\://github\.com/ansible\-collections/community\.general/pull/12837](https\://github\.com/ansible\-collections/community\.general/pull/12837)\)\.
|
||||
* opkg \- correctly set executable search path \([https\://github\.com/ansible\-collections/community\.general/pull/12182](https\://github\.com/ansible\-collections/community\.general/pull/12182)\)\.
|
||||
* pacemaker\_cluster \- skip <code>pcs cluster start</code> in <code>state\=online</code> when the cluster is already running\, improving idempotency and allowing maintenance mode to be disabled without pcsd connectivity \([https\://github\.com/ansible\-collections/community\.general/issues/12362](https\://github\.com/ansible\-collections/community\.general/issues/12362)\, [https\://github\.com/ansible\-collections/community\.general/pull/12403](https\://github\.com/ansible\-collections/community\.general/pull/12403)\)\.
|
||||
* pacemaker\_resource \- fix bug where the resource\-ready state check did not recognize all valid ready states\, causing the module to time out on resources that never reach the <code>Started</code> state \([https\://github\.com/ansible\-collections/community\.general/issues/12351](https\://github\.com/ansible\-collections/community\.general/issues/12351)\, [https\://github\.com/ansible\-collections/community\.general/pull/12355](https\://github\.com/ansible\-collections/community\.general/pull/12355)\)\.
|
||||
* pacemaker\_resource \- fix non\-idempotent behaviour when <code>state\=cloned</code> is applied to a resource or group that is already part of a clone set \([https\://github\.com/ansible\-collections/community\.general/issues/12217](https\://github\.com/ansible\-collections/community\.general/issues/12217)\, [https\://github\.com/ansible\-collections/community\.general/pull/12288](https\://github\.com/ansible\-collections/community\.general/pull/12288)\)\.
|
||||
* pacman \- tolerate the AUR package age badge \(for example <code>\[9d2h\]</code>\) that AUR helpers such as <code>yay</code> append to the <code>\-\-query \-\-upgrades</code> output\, instead of failing with an <code>Invalid line</code> error \([https\://github\.com/ansible\-collections/community\.general/pull/12857](https\://github\.com/ansible\-collections/community\.general/pull/12857)\)\.
|
||||
* pamd \- fix crash when removing a rule that is the only line in the file with <code>state\=absent</code> \([https\://github\.com/ansible\-collections/community\.general/pull/13115](https\://github\.com/ansible\-collections/community\.general/pull/13115)\)\.
|
||||
* pamd \- handle non\-PAM lines such as authselect template directives without crashing \([https\://github\.com/ansible\-collections/community\.general/issues/5850](https\://github\.com/ansible\-collections/community\.general/issues/5850)\, [https\://github\.com/ansible\-collections/community\.general/pull/12137](https\://github\.com/ansible\-collections/community\.general/pull/12137)\)\.
|
||||
* parted \- ignore MBR partition type codes \(for example <code>type\=8e</code>\) reported as flags by some parted builds \(for example on SUSE\)\, which cannot be managed via the <code>set</code> command \([https\://github\.com/ansible\-collections/community\.general/issues/6292](https\://github\.com/ansible\-collections/community\.general/issues/6292)\, [https\://github\.com/ansible\-collections/community\.general/pull/12121](https\://github\.com/ansible\-collections/community\.general/pull/12121)\)\.
|
||||
* passwordstore lookup plugin \- do not return the folder tree as the password when the passname is a folder with <code>backend\=gopass</code> \([https\://github\.com/ansible\-collections/community\.general/issues/5028](https\://github\.com/ansible\-collections/community\.general/issues/5028)\, [https\://github\.com/ansible\-collections/community\.general/pull/13167](https\://github\.com/ansible\-collections/community\.general/pull/13167)\)\.
|
||||
* passwordstore lookup plugin \- mark the <code>userpass</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* pbrun become plugin \- mark the <code>become\_pass</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* pfexec become plugin \- mark the <code>become\_pass</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* pkgng \- fix <code>state\=latest</code> for specific packages on FreeBSD 14\.4\+ \([https\://github\.com/ansible\-collections/community\.general/issues/11907](https\://github\.com/ansible\-collections/community\.general/issues/11907)\, [https\://github\.com/ansible\-collections/community\.general/pull/12789](https\://github\.com/ansible\-collections/community\.general/pull/12789)\)\.
|
||||
* pkgng \- fix failure to install packages when the package repository has never been updated \([https\://github\.com/ansible\-collections/community\.general/pull/12507](https\://github\.com/ansible\-collections/community\.general/pull/12507)\)\.
|
||||
* pkgng \- the module no longer hangs forever when <code>pkg</code> asks an interactive question\, such as the one about an OS version mismatch\; the question now takes its default answer\, so the task fails instead of blocking \([https\://github\.com/ansible\-collections/community\.general/issues/12896](https\://github\.com/ansible\-collections/community\.general/issues/12896)\, [https\://github\.com/ansible\-collections/community\.general/pull/12898](https\://github\.com/ansible\-collections/community\.general/pull/12898)\)\.
|
||||
* pmrun become plugin \- mark the <code>become\_pass</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* portage \- fix <code>depclean\: true</code> crashing with <code>AnsibleModule\.fail\_json\(\) missing 1 required positional argument\: \'msg\'</code> instead of reporting the actual emerge failure \([https\://github\.com/ansible\-collections/community\.general/pull/12168](https\://github\.com/ansible\-collections/community\.general/pull/12168)\)\.
|
||||
* proton\_pass lookup plugin \- mark the <code>pat</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* proton\_pass lookup plugin \- use <code>pass\-cli info</code> instead of the removed <code>pass\-cli test</code> command when checking for an active session\, restoring session detection with <code>pass\-cli</code> 2\.2\.4 and later \([https\://github\.com/ansible\-collections/community\.general/pull/12639](https\://github\.com/ansible\-collections/community\.general/pull/12639)\)\.
|
||||
* redfish\_command \- add workaround in <code>VirtualMediaInsert</code> for Supermicro systems to treat slots marked as <code>NotConnected</code> as empty \([https\://github\.com/ansible\-collections/community\.general/issues/6969](https\://github\.com/ansible\-collections/community\.general/issues/6969)\, [https\://github\.com/ansible\-collections/community\.general/pull/12537](https\://github\.com/ansible\-collections/community\.general/pull/12537)\)\.
|
||||
* redfish\_config \- fix <code>KeyError\: \'ret\'</code> when <code>SetManagerNic</code> cannot find a matching NIC \([https\://github\.com/ansible\-collections/community\.general/issues/5892](https\://github\.com/ansible\-collections/community\.general/issues/5892)\, [https\://github\.com/ansible\-collections/community\.general/pull/12124](https\://github\.com/ansible\-collections/community\.general/pull/12124)\)\.
|
||||
* revbitspss lookup plugin \- mark the <code>api\_key</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* scaleway inventory plugin \- mark the <code>oauth\_token</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* scaleway\_ip \- fix failure when creating an IP with <code>reverse</code> set\, and show the error details from the API when updating an IP fails \([https\://github\.com/ansible\-collections/community\.general/issues/11362](https\://github\.com/ansible\-collections/community\.general/issues/11362)\, [https\://github\.com/ansible\-collections/community\.general/pull/13140](https\://github\.com/ansible\-collections/community\.general/pull/13140)\)\.
|
||||
* sefcontext \- fix idempotence of <code>\<\<none\>\></code> file contexts \([https\://github\.com/ansible\-collections/community\.general/pull/12561](https\://github\.com/ansible\-collections/community\.general/pull/12561)\)
|
||||
* sesu become plugin \- mark the <code>become\_pass</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* snap \- enforce <code>snap refresh \-\-hold</code> after installing at a specific revision \([https\://github\.com/ansible\-collections/community\.general/issues/12088](https\://github\.com/ansible\-collections/community\.general/issues/12088)\, [https\://github\.com/ansible\-collections/community\.general/pull/12097](https\://github\.com/ansible\-collections/community\.general/pull/12097)\)\.
|
||||
* snap \- fix <code>IndexError</code> when a single snap does not exist \([https\://github\.com/ansible\-collections/community\.general/issues/12375](https\://github\.com/ansible\-collections/community\.general/issues/12375)\, [https\://github\.com/ansible\-collections/community\.general/pull/12570](https\://github\.com/ansible\-collections/community\.general/pull/12570)\)\.
|
||||
* splunk callback plugin \- mark the <code>authtoken</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* sudosu become plugin \- mark the <code>become\_pass</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* supervisorctl \- treat the <code>BACKOFF</code> process state as active so that <code>state\=started</code> does not fail on a program still being retried by <code>supervisord</code> \([https\://github\.com/ansible\-collections/community\.general/issues/5599](https\://github\.com/ansible\-collections/community\.general/issues/5599)\, [https\://github\.com/ansible\-collections/community\.general/pull/12688](https\://github\.com/ansible\-collections/community\.general/pull/12688)\)\.
|
||||
* sysrc \- keep leading and trailing whitespace of the current value when comparing it\, so setting a value that starts or ends with whitespace is idempotent\, and report the correct change status for <code>state\=value\_present</code> and <code>state\=value\_absent</code> when a list item has leading or trailing whitespace \([https\://github\.com/ansible\-collections/community\.general/issues/13108](https\://github\.com/ansible\-collections/community\.general/issues/13108)\, [https\://github\.com/ansible\-collections/community\.general/pull/13117](https\://github\.com/ansible\-collections/community\.general/pull/13117)\)\.
|
||||
* terraform \- allow <code>project\_path</code> to be a relative path without a <code>/</code>\, such as <code>myproject</code> \([https\://github\.com/ansible\-collections/community\.general/issues/6463](https\://github\.com/ansible\-collections/community\.general/issues/6463)\, [https\://github\.com/ansible\-collections/community\.general/pull/12937](https\://github\.com/ansible\-collections/community\.general/pull/12937)\)\.
|
||||
* terraform \- fix return value <code>command</code>\, showing terraform plan name twice \([https\://github\.com/ansible\-collections/community\.general/issues/12530](https\://github\.com/ansible\-collections/community\.general/issues/12530)\, [https\://github\.com/ansible\-collections/community\.general/pull/12540](https\://github\.com/ansible\-collections/community\.general/pull/12540)\)\.
|
||||
* terraform \- pass <code>state\_file</code> to the <code>apply</code> and <code>destroy</code> commands\, not only to <code>plan</code> \([https\://github\.com/ansible\-collections/community\.general/issues/6490](https\://github\.com/ansible\-collections/community\.general/issues/6490)\, [https\://github\.com/ansible\-collections/community\.general/pull/12997](https\://github\.com/ansible\-collections/community\.general/pull/12997)\)\.
|
||||
* timezone \- fix failure when setting timezone aliases on Debian and Ubuntu without systemd \([https\://github\.com/ansible\-collections/community\.general/issues/7498](https\://github\.com/ansible\-collections/community\.general/issues/7498)\, [https\://github\.com/ansible\-collections/community\.general/pull/13169](https\://github\.com/ansible\-collections/community\.general/pull/13169)\)\.
|
||||
* timezone \- no longer requires the <code>hwclock</code> executable for name\-only changes on non\-systemd systems \([https\://github\.com/ansible\-collections/community\.general/issues/12516](https\://github\.com/ansible\-collections/community\.general/issues/12516)\, [https\://github\.com/ansible\-collections/community\.general/pull/12526](https\://github\.com/ansible\-collections/community\.general/pull/12526)\)\.
|
||||
* timezone \- update <code>/etc/timezone</code> when using <code>timedatectl</code> \([https\://github\.com/ansible\-collections/community\.general/issues/8784](https\://github\.com/ansible\-collections/community\.general/issues/8784)\, [https\://github\.com/ansible\-collections/community\.general/pull/13074](https\://github\.com/ansible\-collections/community\.general/pull/13074)\)\.
|
||||
* tss lookup plugin \- mark the <code>password</code> and <code>token</code> options as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* udm\_dns\_record \- normalize IPv6 addresses in <code>data</code> to expanded form to fix idempotency \([https\://github\.com/ansible\-collections/community\.general/issues/317](https\://github\.com/ansible\-collections/community\.general/issues/317)\, [https\://github\.com/ansible\-collections/community\.general/pull/12149](https\://github\.com/ansible\-collections/community\.general/pull/12149)\)\.
|
||||
* ufw \- do not reload the default policy when it is already set to the requested value \([https\://github\.com/ansible\-collections/community\.general/issues/1843](https\://github\.com/ansible\-collections/community\.general/issues/1843)\, [https\://github\.com/ansible\-collections/community\.general/pull/12590](https\://github\.com/ansible\-collections/community\.general/pull/12590)\)\.
|
||||
* ufw \- fix IPv6 rule determination and <code>insert\_relative\_to</code> \([https\://github\.com/ansible\-collections/community\.general/pull/12531](https\://github\.com/ansible\-collections/community\.general/pull/12531)\)\.
|
||||
* unixy callback \- handle missing <code>ansible\_host</code> in delegated vars when a task is delegated to a host without it set\, such as <code>localhost</code> \([https\://github\.com/ansible\-collections/community\.general/issues/12112](https\://github\.com/ansible\-collections/community\.general/issues/12112)\, [https\://github\.com/ansible\-collections/community\.general/pull/12113](https\://github\.com/ansible\-collections/community\.general/pull/12113)\)\.
|
||||
* wsl connection plugin \- mark the <code>password</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* xen\_orchestra inventory plugin \- mark the <code>password</code> option as sensitive so that ansible\-core 2\.22\+ will automatically redact its values in outputs \([https\://github\.com/ansible\-collections/community\.general/pull/12723](https\://github\.com/ansible\-collections/community\.general/pull/12723)\)\.
|
||||
* xenserver\_guest \- skip provisioning when existing VM is used as a template \([https\://github\.com/ansible\-collections/community\.general/issues/12576](https\://github\.com/ansible\-collections/community\.general/issues/12576)\, [https\://github\.com/ansible\-collections/community\.general/pull/12717](https\://github\.com/ansible\-collections/community\.general/pull/12717)\)\.
|
||||
* xenserver\_guest\_info \- use fallback chain for determining VDI format from <code>sm\_config</code> keys <code>image\-format</code>\, <code>vdi\_type</code>\, <code>type</code>\, defaulting to <code>raw</code> \([https\://github\.com/ansible\-collections/community\.general/pull/12119](https\://github\.com/ansible\-collections/community\.general/pull/12119)\, [https\://github\.com/ansible\-collections/community\.general/pull/12215](https\://github\.com/ansible\-collections/community\.general/pull/12215)\)\.
|
||||
* xml \- fix crash and idempotency of namespaced <code>attribute</code> values \([https\://github\.com/ansible\-collections/community\.general/issues/10683](https\://github\.com/ansible\-collections/community\.general/issues/10683)\, [https\://github\.com/ansible\-collections/community\.general/pull/13121](https\://github\.com/ansible\-collections/community\.general/pull/13121)\)\.
|
||||
* xml \- preserve DOCTYPE declaration when writing modified XML files \([https\://github\.com/ansible\-collections/community\.general/issues/2762](https\://github\.com/ansible\-collections/community\.general/issues/2762)\, [https\://github\.com/ansible\-collections/community\.general/pull/12148](https\://github\.com/ansible\-collections/community\.general/pull/12148)\)\.
|
||||
* zpool \- fix idempotency of <code>vdevs</code> with short device names\, symbolic links\, partitions\, multi\-disk stripes\, and role groups \([https\://github\.com/ansible\-collections/community\.general/issues/10771](https\://github\.com/ansible\-collections/community\.general/issues/10771)\, [https\://github\.com/ansible\-collections/community\.general/issues/10744](https\://github\.com/ansible\-collections/community\.general/issues/10744)\, [https\://github\.com/ansible\-collections/community\.general/pull/12948](https\://github\.com/ansible\-collections/community\.general/pull/12948)\)\.
|
||||
* zpool \- fix idempotency of vdevs <code>special</code> and <code>dedup</code> \([https\://github\.com/ansible\-collections/community\.general/issues/12744](https\://github\.com/ansible\-collections/community\.general/issues/12744)\, [https\://github\.com/ansible\-collections/community\.general/pull/12745](https\://github\.com/ansible\-collections/community\.general/pull/12745)\)\.
|
||||
* zypper \- do not fail when zypper returns <code>102</code> \(reboot needed\) after a successful run\, for example when applying patches with <code>\-\-with\-interactive</code> \([https\://github\.com/ansible\-collections/community\.general/issues/12960](https\://github\.com/ansible\-collections/community\.general/issues/12960)\, [https\://github\.com/ansible\-collections/community\.general/pull/12965](https\://github\.com/ansible\-collections/community\.general/pull/12965)\)\.
|
||||
* zypper \- do not pass <code>extra\_args</code> to the <code>zypper search</code> command used to determine the installed packages \([https\://github\.com/ansible\-collections/community\.general/issues/4242](https\://github\.com/ansible\-collections/community\.general/issues/4242)\, [https\://github\.com/ansible\-collections/community\.general/pull/12958](https\://github\.com/ansible\-collections/community\.general/pull/12958)\)\.
|
||||
* zypper \- fail when <code>zypper</code> reports errors while run through <code>transactional\-update</code> versions that return success regardless \([https\://github\.com/ansible\-collections/community\.general/issues/9011](https\://github\.com/ansible\-collections/community\.general/issues/9011)\, [https\://github\.com/ansible\-collections/community\.general/pull/12957](https\://github\.com/ansible\-collections/community\.general/pull/12957)\)\.
|
||||
* zypper \- fix version specifier parsing when the version contains non\-numeric characters\, which caused packages to not be removed or installed \([https\://github\.com/ansible\-collections/community\.general/pull/12588](https\://github\.com/ansible\-collections/community\.general/pull/12588)\, [https\://github\.com/ansible\-collections/community\.general/issues/6564](https\://github\.com/ansible\-collections/community\.general/issues/6564)\)\.
|
||||
* zypper\_repository \- fix <code>enabled</code>\, <code>autorefresh</code>\, and <code>gpgcheck</code> module parameters being overridden by values read from a <code>\.repo</code> file \([https\://github\.com/ansible\-collections/community\.general/issues/8783](https\://github\.com/ansible\-collections/community\.general/issues/8783)\, [https\://github\.com/ansible\-collections/community\.general/pull/12022](https\://github\.com/ansible\-collections/community\.general/pull/12022)\)\.
|
||||
* zypper\_repository \- fix idempotency when the repository URL contains <code>\$releasever</code> on openSUSE Leap 16\.0 \([https\://github\.com/ansible\-collections/community\.general/pull/13017](https\://github\.com/ansible\-collections/community\.general/pull/13017)\)\.
|
||||
|
||||
<a id="new-plugins"></a>
|
||||
### New Plugins
|
||||
|
||||
<a id="callback"></a>
|
||||
#### Callback
|
||||
|
||||
* community\.general\.oneline \- One\-line Ansible screen output\.
|
||||
|
||||
<a id="filter"></a>
|
||||
#### Filter
|
||||
|
||||
* community\.general\.from\_toml \- Convert TOML string into dictionary\.
|
||||
|
||||
<a id="lookup"></a>
|
||||
#### Lookup
|
||||
|
||||
* community\.general\.proton\_pass \- Fetch secrets from Proton Pass via the <code>pass\-cli</code> command\-line tool\.
|
||||
|
||||
<a id="new-modules"></a>
|
||||
### New Modules
|
||||
|
||||
* community\.general\.appimage \- Manage AppImage packages\.
|
||||
* community\.general\.consul\_kv\_info \- Retrieve entries from the key/value store of a Consul cluster\.
|
||||
* community\.general\.django\_flush \- Wrapper for <code>django\-admin flush</code>\.
|
||||
* community\.general\.django\_makemigrations \- Wrapper for <code>django\-admin makemigrations</code>\.
|
||||
* community\.general\.flatpak\_mask \- Mask Flatpak applications\.
|
||||
* community\.general\.gitlab\_project\_approvals \- Manage project\-level merge request approvals settings on GitLab Server\.
|
||||
* community\.general\.golang\_package \- Manage Go packages with <code>go install</code>\.
|
||||
* community\.general\.google\_chat \- Send Google Chat notifications\.
|
||||
* community\.general\.kopia\_repository \- Manage Kopia repository\.
|
||||
* community\.general\.kopia\_repository\_info \- Gather information about a Kopia repository\.
|
||||
* community\.general\.packer \- Manage HashiCorp Packer builds\.
|
||||
* community\.general\.serestorecon \- Restore SELinux file contexts\.
|
||||
* community\.general\.write\_binary\_file \- Write binary file from Base64 encoded input\.
|
||||
* community\.general\.xattr\_info \- Retrieve filesystem extended attributes\.
|
||||
* community\.general\.xml\_info \- Query XML files or strings\.
|
||||
* community\.general\.zypper\_updates\_info \- List available Zypper updates\.
|
||||
@@ -0,0 +1,3 @@
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
SPDX-FileCopyrightText: Ansible Project
|
||||
@@ -0,0 +1,635 @@
|
||||
===============================
|
||||
Community General Release Notes
|
||||
===============================
|
||||
|
||||
.. contents:: Topics
|
||||
|
||||
This changelog describes changes after version 13.0.0.
|
||||
|
||||
v14.0.1
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
Bugfix release for inclusion in Ansible 15.0.0rc1.
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- sysrc - remove case that occurred for FreeBSD 11 and prior (https://github.com/ansible-collections/community.general/pull/13185).
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- archive - do not add the destination archive to itself when it is located under one of the archived paths (https://github.com/ansible-collections/community.general/issues/1420, https://github.com/ansible-collections/community.general/pull/13208).
|
||||
- btrfs module utils - fix path of nested subvolumes when a parent subvolume is inside a directory (https://github.com/ansible-collections/community.general/issues/7454, https://github.com/ansible-collections/community.general/pull/13071).
|
||||
- ipa module utils - do not fail a task when the ``failed`` field of the API response only contains empty member lists. This fixes failures on success in ``ipa_group``, ``ipa_hbacrule``, ``ipa_sudorule`` and other modules that add members (https://github.com/ansible-collections/community.general/issues/12294, https://github.com/ansible-collections/community.general/pull/13188).
|
||||
- lvm_pv - determine the parent disk of a partition from sysfs instead of from its name, which fixes rescanning partitions of devices such as ``mmcblk0p1`` (https://github.com/ansible-collections/community.general/issues/13212, https://github.com/ansible-collections/community.general/pull/13218).
|
||||
- lvm_pv - do not warn on every run with ``resize=true`` when the underlying disk has no rescan attribute, for example virtio-blk disks (https://github.com/ansible-collections/community.general/issues/13212, https://github.com/ansible-collections/community.general/pull/13218).
|
||||
- lvm_pv - resolve symbolic links such as ``/dev/disk/by-id/...`` before looking up the device in sysfs, so the disk is rescanned before resizing (https://github.com/ansible-collections/community.general/issues/13212, https://github.com/ansible-collections/community.general/pull/13218).
|
||||
- pamd - keep comments and empty lines next to rules inserted with ``state=before`` or ``state=after`` (https://github.com/ansible-collections/community.general/issues/9374, https://github.com/ansible-collections/community.general/pull/13114).
|
||||
- splunk callback plugin - report ``ansible_check_mode`` per task instead of keeping it set to ``true`` for the rest of the run once a single task ran in check mode (https://github.com/ansible-collections/community.general/issues/13194, https://github.com/ansible-collections/community.general/pull/13195).
|
||||
- zypper_repository - keep the ``description`` option when adding a ``.repo`` file instead of using the name from the file (https://github.com/ansible-collections/community.general/issues/4532, https://github.com/ansible-collections/community.general/pull/13168).
|
||||
- zypper_updates_info - list the updates from the other repositories and warn instead of failing when zypper skips a repository that cannot be refreshed (https://github.com/ansible-collections/community.general/pull/13191).
|
||||
|
||||
v14.0.0
|
||||
=======
|
||||
|
||||
Release Summary
|
||||
---------------
|
||||
|
||||
This is release 14.0.0 of ``community.general``, released on 2026-11-02.
|
||||
|
||||
Minor Changes
|
||||
-------------
|
||||
|
||||
- The collection now depends on community.library_inventory_filtering_v1. This runtime dependency is used by inventory plugins only, and will be automatically installed by ``ansible-galaxy collection install``. If you install community.general by cloning its repository or extracting its release tarball to a specific location, you also need to make sure to install community.library_inventory_filtering_v1 manually if you use one of the affected inventory plugins (https://github.com/ansible-collections/community.general/pull/12302).
|
||||
- _alicloud_ecs module utils - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12984).
|
||||
- _hwc_utils module utils - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12984).
|
||||
- _ipa module utils - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12984).
|
||||
- _online module utils - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12984).
|
||||
- _opennebula module utils - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12984).
|
||||
- _pritunl_api module utils - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12984).
|
||||
- _redfish_utils module utils - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12984).
|
||||
- _scaleway module utils - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12984).
|
||||
- _utm_utils module utils - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12984).
|
||||
- _vexata module utils - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12984).
|
||||
- airbrake_deployment - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- aix_filesystem - use string operations instead of regular expressions for plain-string patterns (https://github.com/ansible-collections/community.general/pull/12996).
|
||||
- aix_lvol - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- alerta_customer - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- alternatives - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12966).
|
||||
- ansible_type test plugin - remove compatibility code for < ansible-core 2.19 (https://github.com/ansible-collections/community.general/pull/12919).
|
||||
- apk - refactor code to remove use of ``global`` (https://github.com/ansible-collections/community.general/pull/12925).
|
||||
- archive - add ``zstd`` as a format choice (https://github.com/ansible-collections/community.general/issues/3455, https://github.com/ansible-collections/community.general/pull/12497).
|
||||
- archive - use context managers when reading tar checksums (https://github.com/ansible-collections/community.general/pull/12569).
|
||||
- awall - refactor code to remove use of ``global`` (https://github.com/ansible-collections/community.general/pull/12926).
|
||||
- bitwarden lookup plugin - add ``sync`` option to sync items from the vault before lookup (https://github.com/ansible-collections/community.general/pull/12377).
|
||||
- bundler - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12967).
|
||||
- cloud_init_data_facts - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- cloudflare_dns - add diff mode support (https://github.com/ansible-collections/community.general/issues/10797, https://github.com/ansible-collections/community.general/pull/12817).
|
||||
- composer - relay composer's own warning about running as root/super user as an Ansible warning (https://github.com/ansible-collections/community.general/issues/2388, https://github.com/ansible-collections/community.general/pull/12090).
|
||||
- composer - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- consul - remove Python < 2.5 compatibility (https://github.com/ansible-collections/community.general/pull/12893).
|
||||
- consul modules - add a ``url`` option taking the address of the Consul agent as a whole; the existing ``host``, ``port`` and ``scheme`` options each override the matching component of it. This does not cover ``community.general.consul`` (https://github.com/ansible-collections/community.general/pull/12216).
|
||||
- consul modules - connection options now fall back to the ``CONSUL_HTTP_ADDR``, ``CONSUL_HTTP_SSL``, ``CONSUL_HTTP_SSL_VERIFY``, ``CONSUL_HTTP_TOKEN`` and ``CONSUL_CACERT`` environment variables when not specified. This applies to all consul modules except ``community.general.consul``, which does not use the shared connection option handling yet (https://github.com/ansible-collections/community.general/pull/12216).
|
||||
- consul_kv - refactored KV store helpers into shared ``_ConsulModule`` methods to prepare for the ``consul_kv_info`` module (https://github.com/ansible-collections/community.general/pull/12515).
|
||||
- consul_kv - the module no longer requires the ``py-consul`` Python library, and is now part of the ``community.general.consul`` action group (https://github.com/ansible-collections/community.general/pull/12221).
|
||||
- consul_kv lookup plugin - add ``empty_value`` option to control what is returned for null Consul values (https://github.com/ansible-collections/community.general/issues/11039, https://github.com/ansible-collections/community.general/pull/12120).
|
||||
- consul_kv lookup plugin - the plugin no longer requires the ``py-consul`` Python library, it now uses ``ansible.module_utils.urls.open_url`` directly (https://github.com/ansible-collections/community.general/issues/5251, https://github.com/ansible-collections/community.general/pull/12659).
|
||||
- consul_session - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12967).
|
||||
- copr - improve the error message when the ``dnf`` Python library is missing on systems where dnf5 is the default package manager (https://github.com/ansible-collections/community.general/issues/12501, https://github.com/ansible-collections/community.general/pull/12913).
|
||||
- cronvar - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- dependent lookup plugin - remove compatibility code for < ansible-core 2.19 (https://github.com/ansible-collections/community.general/pull/12919).
|
||||
- dnf_config_manager - lookup path to the ``dnf`` binary in ``PATH``. It used to be fixed to ``/usr/bin/dnf`` (https://github.com/ansible-collections/community.general/pull/12219).
|
||||
- dnsimple - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12967).
|
||||
- dpkg_divert - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- ejabberd_user - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- elastic callback plugin - internal refactoring that has no visible behavior changes (https://github.com/ansible-collections/community.general/pull/12791).
|
||||
- elastic callback plugin - redact sensitive output on ansible-core 2.22+ (https://github.com/ansible-collections/community.general/pull/12829).
|
||||
- etcd3 - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- etcd3 lookup plugin - change the type of the ``ca_cert``, ``cert_cert``, and ``cert_key`` options from string to path, since they specify paths to certificates/keys (https://github.com/ansible-collections/community.general/pull/12860).
|
||||
- filesystem - adds GFS2 support (https://github.com/ansible-collections/community.general/pull/12285).
|
||||
- filesystem - print a warning if ``blkid -c`` probe fails and show the error message from ``blkid`` (https://github.com/ansible-collections/community.general/pull/12500).
|
||||
- from_csv filter plugin - remove Python 2 compatibility (https://github.com/ansible-collections/community.general/pull/12893).
|
||||
- gem - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- github_app_access_token lookup plugin - add ``client_id`` as an alias for ``app_id`` so the GitHub App's client ID can be specified without using a confusing option name (https://github.com/ansible-collections/community.general/issues/12802, https://github.com/ansible-collections/community.general/pull/12804).
|
||||
- github_deploy_key - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- github_deploy_key - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12952).
|
||||
- github_key - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- github_release - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12952).
|
||||
- github_repo - added ``visibility`` option to set repository visibility to ``public``, ``private``, or ``internal`` (https://github.com/ansible-collections/community.general/issues/6219, https://github.com/ansible-collections/community.general/pull/12557).
|
||||
- github_secrets - add support for managing repository environment secrets (https://github.com/ansible-collections/community.general/pull/12756, https://github.com/ansible-collections/community.general/issues/12755).
|
||||
- github_secrets - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- github_secrets_info - add support for listing repository environment secrets (https://github.com/ansible-collections/community.general/pull/12756, https://github.com/ansible-collections/community.general/issues/12755).
|
||||
- github_webhook - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- github_webhook_info - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- gitlab_group - add new value ``unchanged`` for ``visibility`` parameter (https://github.com/ansible-collections/community.general/pull/12694).
|
||||
- gitlab_hook - add ``branch_filter_strategy`` option to control how ``push_events_branch_filter`` filters push events, which allows filtering branches by a regular expression (https://github.com/ansible-collections/community.general/pull/12618).
|
||||
- gitlab_hook - add ``custom_webhook_template`` option to configure a custom webhook payload template on project hooks (https://github.com/ansible-collections/community.general/issues/11233, https://github.com/ansible-collections/community.general/pull/12496).
|
||||
- gitlab_issue - add ``all`` as a valid value for the ``state_filter`` parameter (https://github.com/ansible-collections/community.general/pull/12821).
|
||||
- gitlab_project - added ``archived`` and ``unarchived`` values for ``state`` (https://github.com/ansible-collections/community.general/pull/12698).
|
||||
- gitlab_runners inventory plugin - wrap the Gitlab API object in a context mananger, and only create the ``gitlab_runners`` group after the API request was successful (https://github.com/ansible-collections/community.general/pull/12378).
|
||||
- homebrew - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- homebrew_cask - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- homebrew_cask - use string operations instead of regular expressions for plain-string patterns (https://github.com/ansible-collections/community.general/pull/12996).
|
||||
- homebrew_services - replace ``NamedTuple`` with dataclass (https://github.com/ansible-collections/community.general/pull/12094).
|
||||
- homebrew_tap - add ``trust`` option to control whether Homebrew trusts the tapped repositories (https://github.com/ansible-collections/community.general/issues/12220, https://github.com/ansible-collections/community.general/pull/12503).
|
||||
- honeybadger_deployment - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- hpilo_boot - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- hpilo_info - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- hpilo_info - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- hwc_ecs_instance - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12974).
|
||||
- hwc_evs_disk - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12968).
|
||||
- hwc_network_vpc - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12952).
|
||||
- hwc_network_vpc - use string operations instead of regular expressions for plain-string patterns (https://github.com/ansible-collections/community.general/pull/12996).
|
||||
- hwc_smn_topic - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12952).
|
||||
- hwc_vpc_eip - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12953).
|
||||
- hwc_vpc_peering_connect - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- hwc_vpc_port - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12953).
|
||||
- hwc_vpc_private_ip - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- hwc_vpc_route - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12952).
|
||||
- hwc_vpc_security_group - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- hwc_vpc_security_group_rule - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12966).
|
||||
- hwc_vpc_subnet - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12953).
|
||||
- ibm_sa_host_ports - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- ibm_sa_vol - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- ibm_sa_vol_map - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- icinga2_feature - use string operations instead of regular expressions for plain-string patterns (https://github.com/ansible-collections/community.general/pull/12996).
|
||||
- icinga2_host - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- incus connection plugin - add ``remote_user_id_command`` option to configure the command used to retrieve the UID and GID of the remote user (https://github.com/ansible-collections/community.general/pull/12646).
|
||||
- influxdb_query - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- influxdb_user - add ``force_password_update`` option to always update the password when ``user_password`` is set, working around InfluxDB installations that do not enforce authentication (https://github.com/ansible-collections/community.general/issues/3824, https://github.com/ansible-collections/community.general/pull/12654).
|
||||
- influxdb_write - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- ini_file - use named groups in the internal option-matching regular expressions (https://github.com/ansible-collections/community.general/pull/12493).
|
||||
- installp - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- iocage inventory plugin - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- ip2location_info - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- ipa_config - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12968).
|
||||
- ipa_dnsrecord - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- ipa_host - return all attributes of the host, including ``has_keytab`` and ``has_password``, whenever the host exists (https://github.com/ansible-collections/community.general/issues/4929, https://github.com/ansible-collections/community.general/pull/13166).
|
||||
- ipa_host - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- ipa_otpconfig - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- ipa_otptoken - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12968).
|
||||
- ipa_pwpolicy - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12967).
|
||||
- ipa_user - add ``enable_on_present`` option to keep disabled users disabled with ``state=present`` (https://github.com/ansible-collections/community.general/issues/8296, https://github.com/ansible-collections/community.general/pull/13078).
|
||||
- ipa_user - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12953).
|
||||
- ipify_facts - refactor code to remove use of ``global`` (https://github.com/ansible-collections/community.general/pull/12909).
|
||||
- ipify_facts - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- ipinfoio_facts - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- iptables_state - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- irc - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- iso_create - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12952).
|
||||
- jabber callback plugin - redact sensitive output on ansible-core 2.22+ (https://github.com/ansible-collections/community.general/pull/12785).
|
||||
- java_cert - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12968).
|
||||
- jenkins_build - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12967).
|
||||
- jenkins_build_info - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12952).
|
||||
- jenkins_job - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12953).
|
||||
- jenkins_job_info - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12953).
|
||||
- jenkins_node - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- kopia_repository, kopia_repository_info - normalize handling of CLI parameters across all ``kopia_*`` modules (https://github.com/ansible-collections/community.general/pull/12360).
|
||||
- ldap_* modules - add support for specifying a SASL authorization identity (equivalent to ``-X 'dn:...' flag``) (https://github.com/ansible-collections/community.general/pull/12781).
|
||||
- ldap_attrs - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- log_plays callback plugin - redact sensitive output on ansible-core 2.22+ (https://github.com/ansible-collections/community.general/pull/12785).
|
||||
- loganalytics_ingestion callback plugin - refactor to use ansible-core 2.22's new secrets API in order to properly mark and mask secrets (https://github.com/ansible-collections/community.general/pull/12758).
|
||||
- logrotate - add diff mode support, showing before/after content of the configuration file when running with ``--diff`` (https://github.com/ansible-collections/community.general/issues/12845, https://github.com/ansible-collections/community.general/pull/12846).
|
||||
- logrotate - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- logrotate - refactor without changing functionality (https://github.com/ansible-collections/community.general/pull/12866).
|
||||
- logrotate - refactor without changing functionality (https://github.com/ansible-collections/community.general/pull/12873).
|
||||
- logstash callback plugin - add ``ANSIBLE_CALLBACK_LOGSTASH_`` prefixed environment variables and Ansible variables for all options (https://github.com/ansible-collections/community.general/pull/12939).
|
||||
- logstash callback plugin - add support for sending events over HTTP(S), with Basic authentication and TLS client certificate options (https://github.com/ansible-collections/community.general/issues/12897, https://github.com/ansible-collections/community.general/pull/12939).
|
||||
- logstash callback plugin - redact sensitive output on ansible-core 2.22+ (https://github.com/ansible-collections/community.general/pull/12785).
|
||||
- lvm_pv - add ``zero``, ``metadatasize``, ``dataalignment``, and ``pvmetadatacopies`` options to control ``pvcreate`` behavior, and ``allocatable``, ``metadataignore``, and ``tags`` options to manage existing physical volume attributes with ``pvchange`` (https://github.com/ansible-collections/community.general/pull/12701).
|
||||
- lvol - add ``pool_metadata_size`` option to set the metadata volume size when creating a thin pool (https://github.com/ansible-collections/community.general/issues/10050, https://github.com/ansible-collections/community.general/pull/12936).
|
||||
- lxc_container - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- lxd inventory plugin - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- lxd_container - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- lxd_profile - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- lxd_project - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- macports - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- macports - use string operations instead of regular expressions for plain-string patterns (https://github.com/ansible-collections/community.general/pull/12996).
|
||||
- mail - add the ``inline`` option to embed images in the message body via ``Content-ID``, so an HTML body can reference them with ``cid:...`` instead of an external URL (https://github.com/ansible-collections/community.general/pull/12480).
|
||||
- mail - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12974).
|
||||
- mail callback plugin - redact sensitive output on ansible-core 2.22+ (https://github.com/ansible-collections/community.general/pull/12785).
|
||||
- maven_artifact - add SHA-256 and SHA-512 support to ``checksum_alg`` (https://github.com/ansible-collections/community.general/pull/12747).
|
||||
- maven_artifact - add ``keep_name_only_when_resolved`` option to opt in to the documented scope of ``keep_name``, where it only controls the destination filename when ``version`` is resolved dynamically (``latest`` or ``version_by_spec``); previously ``keep_name`` also affected the filename with a fixed ``version``, contradicting its documentation (https://github.com/ansible-collections/community.general/pull/12606, https://github.com/ansible-collections/community.general/issues/4796).
|
||||
- maven_artifact - internal refactoring, no change in behavior (https://github.com/ansible-collections/community.general/pull/12776).
|
||||
- maven_artifact - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- maven_artifact - use Ansible construct to express the default value of parameter (https://github.com/ansible-collections/community.general/pull/12411).
|
||||
- memset_zone - use existing module utils helper to look up zones (https://github.com/ansible-collections/community.general/pull/12912).
|
||||
- memset_zone_domain - use existing module utils helper to look up zone domains (https://github.com/ansible-collections/community.general/pull/12912).
|
||||
- mqtt - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12967).
|
||||
- netcup_dns - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12966).
|
||||
- nexmo - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- nginx_status_info - stop using a module-level global variable (https://github.com/ansible-collections/community.general/pull/12910).
|
||||
- nginx_status_info - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- nmap inventory plugin - allow ``address`` to be a list of networks/IP ranges to scan, in addition to a single string (https://github.com/ansible-collections/community.general/issues/12379, https://github.com/ansible-collections/community.general/pull/12384).
|
||||
- nmcli - add ``route_table4`` and ``route_table6`` options to set the routing table of a connection (https://github.com/ansible-collections/community.general/issues/12454, https://github.com/ansible-collections/community.general/pull/13052).
|
||||
- nmcli - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- npm - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- nrdp callback plugin - redact sensitive output on ansible-core 2.22+ (https://github.com/ansible-collections/community.general/pull/12785).
|
||||
- ocapi_command - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- ocapi_info - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- odbc - add ``autocommit`` option to support statements that must run outside of a transaction (https://github.com/ansible-collections/community.general/issues/4173, https://github.com/ansible-collections/community.general/issues/8577, https://github.com/ansible-collections/community.general/pull/12595).
|
||||
- odbc - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- one_service - replace function-local ``namedtuple`` with module-level dataclass (https://github.com/ansible-collections/community.general/pull/12094).
|
||||
- one_service - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- one_vm - add ``update_attributes`` parameter to merge USER_TEMPLATE key/value pairs onto existing VMs via the ``one.vm.update`` API with append/merge semantics, enabling idempotent attribute updates on running VMs without teardown (https://github.com/ansible-collections/community.general/issues/12498, https://github.com/ansible-collections/community.general/pull/12536).
|
||||
- one_vm - replace function-local ``namedtuple`` with module-level dataclass (https://github.com/ansible-collections/community.general/pull/12094).
|
||||
- one_vm - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- onepassword_info - rewrite module to support op CLI v2 (https://github.com/ansible-collections/community.general/issues/5303, https://github.com/ansible-collections/community.general/issues/7321, https://github.com/ansible-collections/community.general/pull/12089).
|
||||
- onepassword_info - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- oneview_datacenter_info - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- oneview_ethernet_network_info - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- oneview_logical_interconnect_group_info - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- oneview_network_set_info - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- oneview_san_manager_info - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- open_iscsi - refactor code to remove use of ``global`` (https://github.com/ansible-collections/community.general/pull/12927).
|
||||
- openbsd_pkg - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- openbsd_pkg - use string operations instead of regular expressions for plain-string patterns (https://github.com/ansible-collections/community.general/pull/12996).
|
||||
- opennebula inventory plugin - add ``prefer_existing_ansible_host`` option to skip setting ``ansible_host`` when the host already has one from an earlier inventory source (https://github.com/ansible-collections/community.general/pull/12417).
|
||||
- opennebula inventory plugin - add ``set_name_variable`` option to allow disabling the ``name`` host variable, avoiding the ``Found variable using reserved name 'name'`` warning. ``inventory_hostname`` is unaffected (https://github.com/ansible-collections/community.general/pull/12695).
|
||||
- opennebula inventory plugin - add new option ``filter`` that allows to filter hosts by variables (https://github.com/ansible-collections/community.general/pull/12302).
|
||||
- opennebula inventory plugin - expose ``UNAME`` (VM owner) and ``GNAME`` (VM group) as host variables, enabling ``keyed_groups`` based on ownership (https://github.com/ansible-collections/community.general/pull/12417).
|
||||
- opennebula inventory plugin - replace function-local ``namedtuple`` with module-level dataclass (https://github.com/ansible-collections/community.general/pull/12094).
|
||||
- opentelemetry callback plugin - internal refactoring that has no visible behavior changes (https://github.com/ansible-collections/community.general/pull/12791).
|
||||
- opentelemetry callback plugin - redact sensitive output on ansible-core 2.22+ (https://github.com/ansible-collections/community.general/pull/12787).
|
||||
- openwrt_init - refactor code to remove use of ``global`` (https://github.com/ansible-collections/community.general/pull/12911).
|
||||
- osx_defaults - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- ovh_ip_failover - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- ovh_ip_loadbalancing_backend - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12952).
|
||||
- ovh_monthly_billing - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12952).
|
||||
- pacemaker_cluster - add support for unmaintenance state (https://github.com/ansible-collections/community.general/issues/12362, https://github.com/ansible-collections/community.general/pull/12364).
|
||||
- pacemaker_cluster - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- packet_device - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12975).
|
||||
- packet_ip_subnet - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12966).
|
||||
- packet_project - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12953).
|
||||
- packet_sshkey - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12968).
|
||||
- packet_volume - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12966).
|
||||
- packet_volume_attachment - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12952).
|
||||
- pacman - replace ``namedtuple`` with dataclass for ``VersionTuple`` (https://github.com/ansible-collections/community.general/pull/12094).
|
||||
- pagerduty_alert - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12974).
|
||||
- pam_limits - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- parted - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- passwordstore lookup plugin - add ``keep_trailing_newline`` option to preserve the trailing newline when ``returnall=true`` (https://github.com/ansible-collections/community.general/pull/12589, https://github.com/ansible-collections/community.general/issues/3616).
|
||||
- passwordstore lookup plugin - make ``directory`` configurable through ``ansible.cfg`` (https://github.com/ansible-collections/community.general/pull/12298).
|
||||
- pkg5 - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- pkgin - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- pkgng - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- pkgng - support installing packages from local package files (https://github.com/ansible-collections/community.general/issues/3428, https://github.com/ansible-collections/community.general/pull/12233).
|
||||
- portage - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- portinstall - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- pritunl_org - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- pritunl_org_info - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- pritunl_user - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12966).
|
||||
- pritunl_user_info - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- proton_pass lookup plugin - return fields inside custom sections of Custom, SSH Key, Wi-Fi, and Identity items (https://github.com/ansible-collections/community.general/issues/12711, https://github.com/ansible-collections/community.general/pull/13051).
|
||||
- random_mac filter plugin - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- read_csv - remove Python 2 compatibility (https://github.com/ansible-collections/community.general/pull/12893).
|
||||
- redhat_subscription - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- reveal_ansible_type filter plugin - remove compatibility code for < ansible-core 2.19 (https://github.com/ansible-collections/community.general/pull/12919).
|
||||
- rhevm - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12976).
|
||||
- riak - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12952).
|
||||
- rollbar_deployment - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- rundeck_acl_policy - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- say callback plugin - redact sensitive output on ansible-core 2.22+ (https://github.com/ansible-collections/community.general/pull/12785).
|
||||
- scaleway_compute - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- scaleway_database_backup - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12952).
|
||||
- selective callback plugin - refactor code to remove use of ``global`` (https://github.com/ansible-collections/community.general/pull/12923).
|
||||
- serverless - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12953).
|
||||
- sl_vm - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12976).
|
||||
- slack - add ``reply_broadcast`` option to allow a threaded reply (``thread_id``) to also be broadcast to the main channel (https://github.com/ansible-collections/community.general/pull/12535).
|
||||
- slack - added support for uploading files to channels and threads using the new Slack WebAPI (https://github.com/ansible-collections/community.general/pull/12032).
|
||||
- slack - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- slack callback plugin - redact sensitive output on ansible-core 2.22+ (https://github.com/ansible-collections/community.general/pull/12785).
|
||||
- spectrum_device - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12966).
|
||||
- splunk callback plugin - redact sensitive output on ansible-core 2.22+ (https://github.com/ansible-collections/community.general/pull/12785).
|
||||
- sssd_info - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- statsd - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12953).
|
||||
- sudoers - add ``defaults`` parameter to allow specifying ``Defaults`` directives scoped to the user or group in the generated sudoers file (https://github.com/ansible-collections/community.general/pull/12186).
|
||||
- sumologic callback plugin - redact sensitive output on ansible-core 2.22+ (https://github.com/ansible-collections/community.general/pull/12785).
|
||||
- supervisorctl - add ``wait`` option to wait for programs to reach the ``RUNNING`` state (https://github.com/ansible-collections/community.general/issues/5599, https://github.com/ansible-collections/community.general/pull/13053).
|
||||
- supervisorctl - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12952).
|
||||
- svc - use string operations instead of regular expressions for plain-string patterns (https://github.com/ansible-collections/community.general/pull/12996).
|
||||
- syslog_json callback plugin - redact sensitive output on ansible-core 2.22+ (https://github.com/ansible-collections/community.general/pull/12785).
|
||||
- terraform - refactor code to remove use of ``global`` (https://github.com/ansible-collections/community.general/pull/12922).
|
||||
- terraform - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12975).
|
||||
- timezone - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- to_time_unit filter plugin - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- tss lookup plugin - cache the ``TSSClient`` per process and credential identity so OAuth2 token grants are reused across lookups (rebuilding the client and retrying the lookup once on a stale-token 4xx, while 5xx and other errors propagate unchanged), and add a ``token_path_source`` option whose ``auto`` value lets ``python-tss-sdk`` auto-detect the Secret Server or Delinea Platform token endpoint (https://github.com/ansible-collections/community.general/pull/12328).
|
||||
- ufw - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- usb_facts - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- uv_python - simplify result handling in the module code (https://github.com/ansible-collections/community.general/pull/12981).
|
||||
- version_sort filter plugin - add ``style`` option to choose the version comparison strategy (https://github.com/ansible-collections/community.general/issues/4451, https://github.com/ansible-collections/community.general/pull/12657).
|
||||
- vertica_* modules - remove Python < 2.5 compatibility (https://github.com/ansible-collections/community.general/pull/12893).
|
||||
- vexata module utils - refactor code to remove use of ``global`` (https://github.com/ansible-collections/community.general/pull/12924).
|
||||
- vexata_volume - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- vmadm - add ``bootrom`` option to support UEFI boot for ``bhyve`` VMs (https://github.com/ansible-collections/community.general/pull/12601, https://github.com/ansible-collections/community.general/issues/4282).
|
||||
- wdc_redfish_command - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- wdc_redfish_info - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12950).
|
||||
- xattr - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12952).
|
||||
- xbps - include ``stdout`` and ``stderr`` from the last executed command in module output (https://github.com/ansible-collections/community.general/issues/2478, https://github.com/ansible-collections/community.general/pull/12234).
|
||||
- xenserver_guest_info - add VDI ``uuid`` and ``vdi_type`` (VHD/QCOW2) fields to disk info output (https://github.com/ansible-collections/community.general/issues/11998, https://github.com/ansible-collections/community.general/pull/12119).
|
||||
- zfs - do not try to change create-only properties on existing datasets and compare size properties as byte counts (https://github.com/ansible-collections/community.general/issues/4699, https://github.com/ansible-collections/community.general/pull/12868).
|
||||
- zfs - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12951).
|
||||
- zfs_delegate_admin - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12953).
|
||||
- zpool - compile regular expressions once outside of loops (https://github.com/ansible-collections/community.general/pull/12999).
|
||||
- zpool - make ``vdevs`` optional when the pool already exists, leaving its vdev layout unchanged (https://github.com/ansible-collections/community.general/issues/10766, https://github.com/ansible-collections/community.general/pull/12816).
|
||||
- zpool - update code to follow coding conventions, without changing functionality (https://github.com/ansible-collections/community.general/pull/12966).
|
||||
- zypper - ``allow_vendor_change`` now also applies to the ``install``, ``update`` and ``patch`` commands, not only to ``dist-upgrade`` (https://github.com/ansible-collections/community.general/issues/10851, https://github.com/ansible-collections/community.general/pull/13076).
|
||||
- zypper - ``state=absent`` no longer silently ignores names containing the wildcards ``*`` or ``?``; they are now matched against the installed packages and removed like ``zypper remove`` does (https://github.com/ansible-collections/community.general/issues/3138, https://github.com/ansible-collections/community.general/pull/13075).
|
||||
- zypper - add ``install_recommends`` option to explicitly control installation of recommended packages (https://github.com/ansible-collections/community.general/issues/3497, https://github.com/ansible-collections/community.general/pull/12648).
|
||||
- zypper - add ``reboot_required`` return value (https://github.com/ansible-collections/community.general/issues/12960, https://github.com/ansible-collections/community.general/pull/12977, https://github.com/ansible-collections/community.general/pull/13180).
|
||||
- zypper_repository - add ``allow_unsigned_metadata`` option to accept unsigned repository metadata while keeping the package GPG check (``--gpgcheck-allow-unsigned-repo``) (https://github.com/ansible-collections/community.general/issues/2519, https://github.com/ansible-collections/community.general/pull/13092).
|
||||
|
||||
Breaking Changes / Porting Guide
|
||||
--------------------------------
|
||||
|
||||
- pfexec become plugin - the default for ``wrap_exe`` changed from ``false`` to ``true`` (https://github.com/ansible-collections/community.general/pull/12891).
|
||||
|
||||
Deprecated Features
|
||||
-------------------
|
||||
|
||||
- All redirections of Dell iDRAC/OME content to dellemc.openmanage are deprecated and will be removed in community.general 18.0.0. Please update your roles/playbooks (https://github.com/ansible-collections/community.general/pull/12489).
|
||||
- All redirections of Docker content to community.docker are deprecated and will be removed in community.general 18.0.0. Please update your roles/playbooks (https://github.com/ansible-collections/community.general/pull/12489).
|
||||
- All redirections of Google Cloud content to community.google are deprecated and will be removed in community.general 18.0.0. Please update your roles/playbooks (https://github.com/ansible-collections/community.general/pull/12489).
|
||||
- All redirections of HashiCorp Vault content to community.hashi_vault are deprecated and will be removed in community.general 18.0.0. Please update your roles/playbooks (https://github.com/ansible-collections/community.general/pull/12489).
|
||||
- All redirections of Hetzner content to community.hrobot are deprecated and will be removed in community.general 18.0.0. Please update your roles/playbooks (https://github.com/ansible-collections/community.general/pull/12489).
|
||||
- All redirections of Kubevirt content to community.kubevirt are deprecated and will be removed in community.general 18.0.0. Please update your roles/playbooks (https://github.com/ansible-collections/community.general/pull/12489).
|
||||
- All redirections of NIOS content to infoblox.nios_modules are deprecated and will be removed in community.general 18.0.0. Please update your roles/playbooks (https://github.com/ansible-collections/community.general/pull/12489).
|
||||
- All redirections of OKD content to community.okd are deprecated and will be removed in community.general 18.0.0. Please update your roles/playbooks (https://github.com/ansible-collections/community.general/pull/12489).
|
||||
- All redirections of PostgreSQL content to community.postgresql are deprecated and will be removed in community.general 18.0.0. Please update your roles/playbooks (https://github.com/ansible-collections/community.general/pull/12489).
|
||||
- All redirections of SAP/HANA content to community.sap_libs are deprecated and will be removed in community.general 18.0.0. Please update your roles/playbooks (https://github.com/ansible-collections/community.general/pull/12489).
|
||||
- cisco_spark - the redirect to community.general.cisco_webex is deprecated and will be removed in community.general 18.0.0. Please update your roles/playbooks (https://github.com/ansible-collections/community.general/pull/12489).
|
||||
- django_check - the ``skip_checks`` option is ignored and deprecated, it will be removed in community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/13001).
|
||||
- django_command - the ``skip_checks`` option is ignored and deprecated, it will be removed in community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/13001).
|
||||
- django_createcachetable - the ``skip_checks`` option is ignored and deprecated, it will be removed in community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/13001).
|
||||
- keycloak_authentication - the redirect to ``middleware_automation.keycloak.keycloak_authentication`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_authentication_required_actions - the redirect to ``middleware_automation.keycloak.keycloak_authentication_required_actions`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_authentication_v2 - the redirect to ``middleware_automation.keycloak.keycloak_authentication_v2`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_authz_authorization_scope - the redirect to ``middleware_automation.keycloak.keycloak_authz_authorization_scope`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_authz_custom_policy - the redirect to ``middleware_automation.keycloak.keycloak_authz_custom_policy`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_authz_permission - the redirect to ``middleware_automation.keycloak.keycloak_authz_permission`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_authz_permission_info - the redirect to ``middleware_automation.keycloak.keycloak_authz_permission_info`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_client - the redirect to ``middleware_automation.keycloak.keycloak_client`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_client_rolemapping - the redirect to ``middleware_automation.keycloak.keycloak_client_rolemapping`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_client_rolescope - the redirect to ``middleware_automation.keycloak.keycloak_client_rolescope`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_clientscope - the redirect to ``middleware_automation.keycloak.keycloak_client_scope`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_clientscope_rolemappings - the redirect to ``middleware_automation.keycloak.keycloak_client_scope_rolemappings`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_clientscope_type - the redirect to ``middleware_automation.keycloak.keycloak_client_scope_type`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_clientsecret_info - the redirect to ``middleware_automation.keycloak.keycloak_clientsecret_info`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_clientsecret_regenerate - the redirect to ``middleware_automation.keycloak.keycloak_clientsecret_regenerate`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_clienttemplate - the redirect to ``middleware_automation.keycloak.keycloak_clienttemplate`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_component - the redirect to ``middleware_automation.keycloak.keycloak_component`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_component_info - the redirect to ``middleware_automation.keycloak.keycloak_component_info`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_group - the redirect to ``middleware_automation.keycloak.keycloak_group`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_identity_provider - the redirect to ``middleware_automation.keycloak.keycloak_identity_provider`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_realm - the redirect to ``middleware_automation.keycloak.keycloak_realm`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_realm_info - the redirect to ``middleware_automation.keycloak.keycloak_realm_info`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_realm_key - the redirect to ``middleware_automation.keycloak.keycloak_realm_key`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_realm_keys_metadata_info - the redirect to ``middleware_automation.keycloak.keycloak_realm_keys_metadata_info`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_realm_localization - the redirect to ``middleware_automation.keycloak.keycloak_realm_localization`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_realm_rolemapping - the redirect to ``middleware_automation.keycloak.keycloak_realm_rolemapping`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_realm_users_info - the redirect to ``middleware_automation.keycloak.keycloak_realm_users_info`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_role - the redirect to ``middleware_automation.keycloak.keycloak_role`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_user - the redirect to ``middleware_automation.keycloak.keycloak_user`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_user_execute_actions_email - the redirect to ``middleware_automation.keycloak.keycloak_user_execute_actions_email`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_user_federation - the redirect to ``middleware_automation.keycloak.keycloak_user_federation`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_user_rolemapping - the redirect to ``middleware_automation.keycloak.keycloak_user_rolemapping`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_userprofile - the redirect to ``middleware_automation.keycloak.keycloak_userprofile`` is deprecated and will be removed from community.general 16.0.0 (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- lldp - the redirect to community.general.lldp_facts is now deprecated and will be removed from community.general 16.0.0. Please update your roles and playbooks to use the new name (https://github.com/ansible-collections/community.general/pull/12488).
|
||||
- osx_say - the redirect to community.general.say is deprecated and will be removed in community.general 18.0.0. Please update your roles/playbooks (https://github.com/ansible-collections/community.general/pull/12489).
|
||||
- yum_versionlock - the module is deprecated and will be removed from community.general 16.0.0. Use ``community.general.dnf_versionlock`` instead (https://github.com/ansible-collections/community.general/pull/13173).
|
||||
|
||||
Removed Features (previously deprecated)
|
||||
----------------------------------------
|
||||
|
||||
- The collection no longer supports ansible-core 2.18. It requires at least ansible-core 2.19.0+ (https://github.com/ansible-collections/community.general/pull/12891).
|
||||
- jboss - the deprecated module has been removed. Please migrate to the role middleware_automation.wildfly.wildfly_app_deploy instead (https://github.com/ansible-collections/community.general/pull/12891).
|
||||
- keycloak_authentication - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_authentication``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_authentication_required_actions - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_authentication_required_actions``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_authentication_v2 - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_authentication_v2``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_authz_authorization_scope - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_authz_authorization_scope``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_authz_custom_policy - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_authz_custom_policy``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_authz_permission - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_authz_permission``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_authz_permission_info - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_authz_permission_info``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_client - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_client``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_client_rolemapping - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_client_rolemapping``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_client_rolescope - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_client_rolescope``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_clientscope - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_client_scope``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_clientscope_rolemappings - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_client_scope_rolemappings``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_clientscope_type - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_client_scope_type``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_clientsecret_info - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_clientsecret_info``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_clientsecret_regenerate - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_clientsecret_regenerate``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_clienttemplate - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_clienttemplate``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_component - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_component``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_component_info - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_component_info``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_group - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_group``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_identity_provider - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_identity_provider``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_realm - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_realm``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_realm_info - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_realm_info``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_realm_key - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_realm_key``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_realm_keys_metadata_info - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_realm_keys_metadata_info``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_realm_localization - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_realm_localization``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_realm_rolemapping - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_realm_rolemapping``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_realm_users_info - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_realm_users_info``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_role - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_role``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_user - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_user``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_user_execute_actions_email - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_user_execute_actions_email``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_user_federation - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_user_federation``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_user_rolemapping - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_user_rolemapping``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- keycloak_userprofile - the module has been replaced by a redirect to ``middleware_automation.keycloak.keycloak_userprofile``. You need to install ``middleware_automation.keycloak`` to make this redirect work (https://github.com/ansible-collections/community.general/pull/12483).
|
||||
- layman - the deprecated module has been removed (https://github.com/ansible-collections/community.general/pull/12891).
|
||||
- linode - the deprecated module has been removed. Use community.general.linode_v4 instead (https://github.com/ansible-collections/community.general/pull/12891).
|
||||
- loganalytics callback plugin - the deprecated plugin has been removed. Please migrate to the community.general.loganalytics_ingestion callback plugin instead (https://github.com/ansible-collections/community.general/pull/12891).
|
||||
- monit - no longer supports monit < 5.19 (https://github.com/ansible-collections/community.general/pull/12891).
|
||||
- pacemaker_cluster - the deprecated ``cleanup`` state has been removed. Use the community.general.pacemaker_resource module instead (https://github.com/ansible-collections/community.general/pull/12891).
|
||||
- puppet - the deprecated ``timeout`` option has been removed. Use the task-level ``timeout`` instead (https://github.com/ansible-collections/community.general/pull/12891).
|
||||
|
||||
Security Fixes
|
||||
--------------
|
||||
|
||||
- proton_pass lookup plugin - no longer exposes the personal access token in error messages, verbose output, or the process list (https://github.com/ansible-collections/community.general/issues/12710, https://github.com/ansible-collections/community.general/pull/12726).
|
||||
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- aix_devices - fix ``chdev`` command failures being incorrectly reported as successful results, now properly fails the task when device attribute changes cannot be applied (https://github.com/ansible-collections/community.general/pull/12185).
|
||||
- apache2_module - determine ``changed`` from the output of ``a2enmod``/``a2dismod`` when ``ignore_configcheck=true`` and the Apache configuration check fails (https://github.com/ansible-collections/community.general/issues/3510, https://github.com/ansible-collections/community.general/pull/13147).
|
||||
- apache2_module - fix ``state=absent`` doing nothing when ``ignore_configcheck=true`` and the Apache configuration check fails (https://github.com/ansible-collections/community.general/issues/3510, https://github.com/ansible-collections/community.general/pull/13147).
|
||||
- apache2_module - fix false failures when ``ignore_configcheck`` is set and the configuration is broken for a reason unrelated to the module being changed (https://github.com/ansible-collections/community.general/issues/4592, https://github.com/ansible-collections/community.general/pull/12597).
|
||||
- apk - fail cleanly when the ``world`` file cannot be read (https://github.com/ansible-collections/community.general/issues/10739, https://github.com/ansible-collections/community.general/pull/13179).
|
||||
- apk - the ``upgrade`` operation no longer reports ``changed=true`` when nothing was upgraded but an apk commit hook (for example ``mrtest``, or anything installed in ``/etc/apk/commit_hooks.d/``) printed output before the trailing ``OK:`` summary line; the change status is now derived from the packages apk actually reports upgrading (https://github.com/ansible-collections/community.general/issues/12223, https://github.com/ansible-collections/community.general/pull/12376).
|
||||
- bitwarden lookup plugin - mark the ``bw_session`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- bitwarden_secrets_manager lookup plugin - mark the ``bws_access_token`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- capabilities - fix idempotency when the installed ``libcap`` normalizes capability operators or flags, or when multiple capabilities are set at once (https://github.com/ansible-collections/community.general/issues/4067, https://github.com/ansible-collections/community.general/pull/12650).
|
||||
- cloudflare_dns - fix detection of existing CAA, SRV, and TLSA records (https://github.com/ansible-collections/community.general/issues/7766, https://github.com/ansible-collections/community.general/issues/7780, https://github.com/ansible-collections/community.general/pull/13170).
|
||||
- cloudflare_dns - fix failure when looking up records whose value contains a comma (https://github.com/ansible-collections/community.general/issues/10208, https://github.com/ansible-collections/community.general/pull/13119).
|
||||
- cobbler inventory plugin - do not use TLS when connecting to ``http://`` URLs (https://github.com/ansible-collections/community.general/issues/11246, https://github.com/ansible-collections/community.general/pull/12847).
|
||||
- cobbler inventory plugin - fix crash about a missing ``_cache`` attribute when inventory caching is disabled (https://github.com/ansible-collections/community.general/pull/12848).
|
||||
- cobbler inventory plugin - mark the ``password`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- composer - fix ``apcu_autoloader`` never passing ``--apcu-autoloader`` to composer, because the option was mapped to the misspelled ``acpu-autoloader`` (https://github.com/ansible-collections/community.general/pull/12988).
|
||||
- composer - pass ``--apcu`` for ``apcu_autoloader`` to ``dump-autoload``, which has no ``--apcu-autoloader`` flag (https://github.com/ansible-collections/community.general/pull/12989).
|
||||
- composer - restore compatibility with older compose versions when using ``working_dir`` (https://github.com/ansible-collections/community.general/issues/12293, https://github.com/ansible-collections/community.general/pull/12339).
|
||||
- composer - the ``--working-dir`` option is now always placed first on the command line, before the subcommand, to ensure consistent behavior across all composer commands (https://github.com/ansible-collections/community.general/issues/5204, https://github.com/ansible-collections/community.general/pull/12084).
|
||||
- composer - use file checksum to determine ``changed`` status when ``command=config``, instead of relying on the command return output. The module now compares SHA256 checksums of relevant configuration files (``composer.json``, ``auth.json``, or their global equivalents) before and after running the command (https://github.com/ansible-collections/community.general/pull/12084).
|
||||
- consul_kv lookup plugin - mark the ``token`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- counter_enabled callback - fix missing output for looped tasks, including tasks using ``delegate_to`` (https://github.com/ansible-collections/community.general/issues/8187, https://github.com/ansible-collections/community.general/pull/12067).
|
||||
- credstash lookup plugin - mark the ``aws_secret_access_key`` and ``aws_session_token`` options as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- diy callback plugin - no longer emits deprecation warnings about ``v2_on_any`` and ``convert_data`` with ansible-core 2.19 and later (https://github.com/ansible-collections/community.general/issues/10545, https://github.com/ansible-collections/community.general/pull/13093).
|
||||
- django_createcachetable - do not pass the unsupported ``--noinput`` option to ``django-admin createcachetable`` (https://github.com/ansible-collections/community.general/pull/13002).
|
||||
- dnf_config_manager - fix incompatibility with DNF5. The module was crashing on systems with DNF5 due to CLI changes since DNF4 (https://github.com/ansible-collections/community.general/issues/9127, https://github.com/ansible-collections/community.general/pull/12206).
|
||||
- doas become plugin - mark the ``become_pass`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- dsv lookup plugin - mark the ``client_secret`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- dzdo become plugin - mark the ``become_pass`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- elastic callback plugin - mark the ``apm_secret_token`` and ``apm_api_key`` options as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- etcd3 lookup plugin - mark the ``password`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- filesystem - handle BusyBox ``blkid`` output to correctly detect existing filesystems on systems like Alpine Linux (https://github.com/ansible-collections/community.general/issues/7283, https://github.com/ansible-collections/community.general/pull/12235).
|
||||
- filesystem - the module now also handles the output format of bcachefs-tools v1.38.4 and above (https://github.com/ansible-collections/community.general/issues/12259, https://github.com/ansible-collections/community.general/pull/12291).
|
||||
- filetree lookup plugin - raise ``AnsibleLookupError`` when the ``exclude`` option contains an invalid regular expression instead of an uncaught ``re.error`` (https://github.com/ansible-collections/community.general/pull/12140).
|
||||
- git_config and git_config_info - allow empty string values and preserve idempotency (https://github.com/ansible-collections/community.general/issues/12502, https://github.com/ansible-collections/community.general/pull/12708).
|
||||
- github_app_access_token lookup plugin - mark the ``private_key`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- github_app_access_token lookup plugin - mark the return value as a secret on ansible-core 2.22+ (https://github.com/ansible-collections/community.general/pull/12884).
|
||||
- github_deploy_key - do not delete an existing deploy key when running with ``state=absent`` in check mode (https://github.com/ansible-collections/community.general/issues/12348, https://github.com/ansible-collections/community.general/pull/13132).
|
||||
- gitlab_instance_variable - ignore the ``hidden`` attribute that GitLab 19.1 and newer return for instance variables when comparing them with the requested variables. Before, ``purge=true`` deleted every instance variable, including the ones the task had just created, and every run reported a change (https://github.com/ansible-collections/community.general/issues/12349, https://github.com/ansible-collections/community.general/pull/13029).
|
||||
- gitlab_project - fix ``'bool' object has no attribute 'attributes'`` (https://github.com/ansible-collections/community.general/issues/12902, https://github.com/ansible-collections/community.general/pull/12903).
|
||||
- gitlab_project - return ``project`` in the result when running in check mode (https://github.com/ansible-collections/community.general/pull/12689, https://github.com/ansible-collections/community.general/issues/5689).
|
||||
- gitlab_runner - do not fail with ``'<' not supported between instances of 'str' and 'int'`` when python-gitlab cannot read the GitLab server version. The module now assumes that the server is new enough and emits a warning (https://github.com/ansible-collections/community.general/issues/12707, https://github.com/ansible-collections/community.general/pull/12899).
|
||||
- gitlab_runners inventory plugin - mark the ``api_token`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- gitlab_user - fix lookup of existing users whose username contains uppercase letters (https://github.com/ansible-collections/community.general/issues/5999, https://github.com/ansible-collections/community.general/pull/13064).
|
||||
- haproxy - fix ``state=disabled`` with ``drain=true`` timing out instead of putting a server that is already down into maintenance mode (https://github.com/ansible-collections/community.general/issues/9020, https://github.com/ansible-collections/community.general/pull/12640).
|
||||
- homebrew_cask - fix ``brew --version`` parsing to handle version strings with more than three dot-separated segments (for example, some vendor Homebrew builds report a fourth segment). The previous regex could silently drop the leading segment, misjudging whether the deprecated ``brew cask`` command syntax is still required and causing installs to fail with an unknown-command error (https://github.com/ansible-collections/community.general/pull/12559).
|
||||
- htpasswd - fix ``hash_scheme`` aliases and Apache-compatible ``bcrypt`` hashes (https://github.com/ansible-collections/community.general/issues/6135, https://github.com/ansible-collections/community.general/pull/12123).
|
||||
- icinga2 inventory plugin - mark the ``password`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- icinga2_host - fix ``JSONDecodeError`` raised when the Icinga2 API returns an HTTP error response (https://github.com/ansible-collections/community.general/pull/12687, https://github.com/ansible-collections/community.general/issues/4948).
|
||||
- idrac_redfish_config - fix setting attributes on iDRAC10 (https://github.com/ansible-collections/community.general/issues/10232, https://github.com/ansible-collections/community.general/pull/13141).
|
||||
- incus connection plugin - detect failed ``incus file push``/``incus file pull`` transfers and raise a clear error naming the instance and the CLI stderr, instead of silently reporting success and failing later with a misleading ``chmod: No such file or directory`` error (https://github.com/ansible-collections/community.general/pull/12464).
|
||||
- incus connection plugin - improve Windows PowerShell argv handling by stripping wrapper quotes from payload arguments for ``-enc``, ``-encodedcommand``, ``-command``, ``-c``, ``-file`` and ``-f`` (https://github.com/ansible-collections/community.general/issues/12161, https://github.com/ansible-collections/community.general/pull/12158).
|
||||
- incus connection plugin - return ``stdout``/``stderr`` as bytes instead of strings to restore compatibility with ansible-core 2.21 module execution (https://github.com/ansible-collections/community.general/issues/12161, https://github.com/ansible-collections/community.general/pull/12158).
|
||||
- influxdb_retention_policy - fix ``TypeError`` when altering a retention policy without ``shard_group_duration`` set (https://github.com/ansible-collections/community.general/issues/3897, https://github.com/ansible-collections/community.general/pull/12652).
|
||||
- ini_file - do not add an option without value when ``allow_no_value=true`` and the requested values already exist (https://github.com/ansible-collections/community.general/issues/9296, https://github.com/ansible-collections/community.general/pull/13089).
|
||||
- ini_file - do not delete comment-only lines that contain the option name (https://github.com/ansible-collections/community.general/issues/11919, https://github.com/ansible-collections/community.general/pull/12083).
|
||||
- ip_netns - fix namespace existence checks when one namespace name is a prefix of another (https://github.com/ansible-collections/community.general/issues/12731, https://github.com/ansible-collections/community.general/pull/12743).
|
||||
- ip_netns - report no change in check mode for ``state=present`` when the requested namespace already exists (https://github.com/ansible-collections/community.general/issues/12839, https://github.com/ansible-collections/community.general/pull/12842).
|
||||
- ipa_hostgroup - fix task failure when it actually succeeded (https://github.com/ansible-collections/community.general/issues/12853, https://github.com/ansible-collections/community.general/pull/12854).
|
||||
- ipa_user - send only changed attributes when modifying a user (https://github.com/ansible-collections/community.general/issues/8296, https://github.com/ansible-collections/community.general/pull/13078).
|
||||
- ipa_user - set ``krbpasswordexpiration`` in a separate request after the password, because FreeIPA resets the expiration date when an administrator sets the password (https://github.com/ansible-collections/community.general/issues/12850, https://github.com/ansible-collections/community.general/pull/13171).
|
||||
- iptables_state - refactor code to avoid unnecessary unused variables and improve internal state handling (https://github.com/ansible-collections/community.general/pull/12093).
|
||||
- iso_create - fix failure with non-conforming ISO9660 path characters (https://github.com/ansible-collections/community.general/issues/5103, https://github.com/ansible-collections/community.general/pull/12028).
|
||||
- jabber - do not send an unnecessary ``muc#user`` tag on groupchat messages (https://github.com/ansible-collections/community.general/pull/12658, https://github.com/ansible-collections/community.general/issues/5343).
|
||||
- jabber callback plugin - mark the ``password`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- java_cert - detect silent ``keytool`` failures by verifying the import outcome after the command exits with ``rc=0`` (https://github.com/ansible-collections/community.general/issues/6685, https://github.com/ansible-collections/community.general/pull/12238).
|
||||
- java_cert - fix ``NullPointerException`` when importing from a PKCS12 file with a password on Java 8 (https://github.com/ansible-collections/community.general/issues/3023, https://github.com/ansible-collections/community.general/pull/12151).
|
||||
- jenkins_job_info - fix ``KeyError: 'color'`` when filtering folder jobs by color (https://github.com/ansible-collections/community.general/issues/12232), https://github.com/ansible-collections/community.general/pull/12369).
|
||||
- ksu become plugin - mark the ``become_pass`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- launchd - fix ``restarted`` and ``reloaded`` states always reporting ``changed=False`` (https://github.com/ansible-collections/community.general/issues/6199, https://github.com/ansible-collections/community.general/pull/12122).
|
||||
- ldap_attrs - when the server raises ``INAPPROPRIATE_MATCHING`` because an attribute has no EQUALITY matching rule (for example, certain ``olcTLS*`` attributes on older OpenLDAP versions), the module now falls back to Python-side value comparison instead of crashing (https://github.com/ansible-collections/community.general/issues/3559, https://github.com/ansible-collections/community.general/issues/12596, https://github.com/ansible-collections/community.general/pull/12628).
|
||||
- linode inventory plugin - mark the ``access_token`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- log_plays callback plugin - change type of the ``log_folder`` option from ``str`` to ``path`` (https://github.com/ansible-collections/community.general/issues/5389, https://github.com/ansible-collections/community.general/pull/13047).
|
||||
- loganalytics_ingestion callback plugin - mark the ``shared_key`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- logdna callback plugin - mark the ``conf_key`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- logentries callback plugin - mark the ``token`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- lvol - fix a hang when ensuring an LVM snapshot that already exists (https://github.com/ansible-collections/community.general/issues/12477, https://github.com/ansible-collections/community.general/pull/12810).
|
||||
- lxc_container - fix ``create_script`` to accept a single tuple argument, resolving a ``TypeError`` that silently prevented ``container_command`` from being executed (https://github.com/ansible-collections/community.general/issues/11360, https://github.com/ansible-collections/community.general/pull/12106).
|
||||
- lxc_container - fix archiving containers on LXC 2.1 and newer, which failed with ``KeyError`` because the module read the removed ``lxc.rootfs`` config key instead of ``lxc.rootfs.path`` (https://github.com/ansible-collections/community.general/issues/12562, https://github.com/ansible-collections/community.general/pull/12982).
|
||||
- lxd connection plugin - detect failed ``lxc file push``/``lxc file pull`` transfers and raise a clear error naming the instance and the CLI stderr, instead of silently reporting success and failing later with a misleading ``chmod: No such file or directory`` error (https://github.com/ansible-collections/community.general/pull/12464).
|
||||
- lxd inventory plugin - mark the ``trust_password`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- machinectl become plugin - mark the ``become_pass`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- mail - fail when an encrypted connection cannot be established with ``secure=always``, instead of sending the mail unencrypted (https://github.com/ansible-collections/community.general/pull/13068).
|
||||
- mail - open only one connection to the SMTP server instead of two (https://github.com/ansible-collections/community.general/pull/13069).
|
||||
- mail - report connection errors such as a refused connection as a module failure instead of a traceback (https://github.com/ansible-collections/community.general/issues/7122, https://github.com/ansible-collections/community.general/pull/13067).
|
||||
- modules using ``CmdRunner`` - environment variables set for a single command are no longer passed to subsequent commands (https://github.com/ansible-collections/community.general/issues/12904, https://github.com/ansible-collections/community.general/pull/12905).
|
||||
- nmcli - add ``bond_mode_behavior`` to control whether omitted ``mode`` preserves the existing bond mode or uses the legacy ``balance-rr`` default on existing connections (https://github.com/ansible-collections/community.general/issues/9201, https://github.com/ansible-collections/community.general/pull/12114).
|
||||
- nmcli - fail when the connection editor reports an error instead of reporting a change (https://github.com/ansible-collections/community.general/issues/9091, https://github.com/ansible-collections/community.general/pull/13116).
|
||||
- nmcli - fix ``wifi_sec`` flags options always reporting changes and failing with integer values (https://github.com/ansible-collections/community.general/issues/9121, https://github.com/ansible-collections/community.general/pull/13080).
|
||||
- nmcli - fix check/diff reporting changes for bond ``arp_interval`` and ``arp_ip_target`` options when they are already configured (https://github.com/ansible-collections/community.general/issues/11588, https://github.com/ansible-collections/community.general/pull/12085).
|
||||
- nmcli - fix incorrectly reports diff for bond connections when ``mtu`` is unset and NetworkManager reports no explicit MTU value (https://github.com/ansible-collections/community.general/pull/12085).
|
||||
- nmcli - fix list suboptions of ``wifi`` and ``wifi_sec`` being sent to nmcli one character at a time when given as a string (https://github.com/ansible-collections/community.general/issues/7500, https://github.com/ansible-collections/community.general/pull/13072).
|
||||
- nmcli - now handles connection names derived from MAC addresses, and generally names that contain ``:`` or ``\\`` (https://github.com/ansible-collections/community.general/issues/12386, https://github.com/ansible-collections/community.general/pull/12387).
|
||||
- npm - fix ``JSONDecodeError`` when npm's stdout output contains warnings or notices alongside the JSON payload (https://github.com/ansible-collections/community.general/pull/12665, https://github.com/ansible-collections/community.general/issues/4960).
|
||||
- nrdp callback plugin - mark the ``token`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- onepassword lookup plugin - the ``op://`` secret reference lookup returned raw bytes instead of a string, which broke passing the value into other modules (https://github.com/ansible-collections/community.general/pull/11958).
|
||||
- onepassword, onepassword_doc, onepassword_raw, and onepassword_ssh_key lookup plugins - mark the ``master_password``, ``secret_key``, ``service_account_token``, and ``connect_token`` options as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- online inventory plugin - mark the ``oauth_token`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- open_iscsi - fix login to a single target ignoring login failures and the ``portal`` option (https://github.com/ansible-collections/community.general/pull/12928).
|
||||
- opennebula inventory plugin - coerce ``SSH_PORT`` to an integer before setting ``ansible_port`` (https://github.com/ansible-collections/community.general/pull/12437).
|
||||
- opennebula inventory plugin - fix crash when retrieving VM without NIC (https://github.com/ansible-collections/community.general/pull/12361).
|
||||
- opennebula inventory plugin - mark the ``api_password`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- opentelemetry callback plugin - each host's span event now carries that host's task result instead of the result of the host that reported last (https://github.com/ansible-collections/community.general/issues/12987, https://github.com/ansible-collections/community.general/pull/13011).
|
||||
- opentelemetry callback plugin - fix ``KeyError`` when a meta task is skipped by its ``when`` condition (https://github.com/ansible-collections/community.general/issues/12833, https://github.com/ansible-collections/community.general/pull/12837).
|
||||
- opkg - correctly set executable search path (https://github.com/ansible-collections/community.general/pull/12182).
|
||||
- pacemaker_cluster - skip ``pcs cluster start`` in ``state=online`` when the cluster is already running, improving idempotency and allowing maintenance mode to be disabled without pcsd connectivity (https://github.com/ansible-collections/community.general/issues/12362, https://github.com/ansible-collections/community.general/pull/12403).
|
||||
- pacemaker_resource - fix bug where the resource-ready state check did not recognize all valid ready states, causing the module to time out on resources that never reach the ``Started`` state (https://github.com/ansible-collections/community.general/issues/12351, https://github.com/ansible-collections/community.general/pull/12355).
|
||||
- pacemaker_resource - fix non-idempotent behaviour when ``state=cloned`` is applied to a resource or group that is already part of a clone set (https://github.com/ansible-collections/community.general/issues/12217, https://github.com/ansible-collections/community.general/pull/12288).
|
||||
- pacman - tolerate the AUR package age badge (for example ``[9d2h]``) that AUR helpers such as ``yay`` append to the ``--query --upgrades`` output, instead of failing with an ``Invalid line`` error (https://github.com/ansible-collections/community.general/pull/12857).
|
||||
- pamd - fix crash when removing a rule that is the only line in the file with ``state=absent`` (https://github.com/ansible-collections/community.general/pull/13115).
|
||||
- pamd - handle non-PAM lines such as authselect template directives without crashing (https://github.com/ansible-collections/community.general/issues/5850, https://github.com/ansible-collections/community.general/pull/12137).
|
||||
- parted - ignore MBR partition type codes (for example ``type=8e``) reported as flags by some parted builds (for example on SUSE), which cannot be managed via the ``set`` command (https://github.com/ansible-collections/community.general/issues/6292, https://github.com/ansible-collections/community.general/pull/12121).
|
||||
- passwordstore lookup plugin - do not return the folder tree as the password when the passname is a folder with ``backend=gopass`` (https://github.com/ansible-collections/community.general/issues/5028, https://github.com/ansible-collections/community.general/pull/13167).
|
||||
- passwordstore lookup plugin - mark the ``userpass`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- pbrun become plugin - mark the ``become_pass`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- pfexec become plugin - mark the ``become_pass`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- pkgng - fix ``state=latest`` for specific packages on FreeBSD 14.4+ (https://github.com/ansible-collections/community.general/issues/11907, https://github.com/ansible-collections/community.general/pull/12789).
|
||||
- pkgng - fix failure to install packages when the package repository has never been updated (https://github.com/ansible-collections/community.general/pull/12507).
|
||||
- pkgng - the module no longer hangs forever when ``pkg`` asks an interactive question, such as the one about an OS version mismatch; the question now takes its default answer, so the task fails instead of blocking (https://github.com/ansible-collections/community.general/issues/12896, https://github.com/ansible-collections/community.general/pull/12898).
|
||||
- pmrun become plugin - mark the ``become_pass`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- portage - fix ``depclean: true`` crashing with ``AnsibleModule.fail_json() missing 1 required positional argument: 'msg'`` instead of reporting the actual emerge failure (https://github.com/ansible-collections/community.general/pull/12168).
|
||||
- proton_pass lookup plugin - mark the ``pat`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- proton_pass lookup plugin - use ``pass-cli info`` instead of the removed ``pass-cli test`` command when checking for an active session, restoring session detection with ``pass-cli`` 2.2.4 and later (https://github.com/ansible-collections/community.general/pull/12639).
|
||||
- redfish_command - add workaround in ``VirtualMediaInsert`` for Supermicro systems to treat slots marked as ``NotConnected`` as empty (https://github.com/ansible-collections/community.general/issues/6969, https://github.com/ansible-collections/community.general/pull/12537).
|
||||
- redfish_config - fix ``KeyError: 'ret'`` when ``SetManagerNic`` cannot find a matching NIC (https://github.com/ansible-collections/community.general/issues/5892, https://github.com/ansible-collections/community.general/pull/12124).
|
||||
- revbitspss lookup plugin - mark the ``api_key`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- scaleway inventory plugin - mark the ``oauth_token`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- scaleway_ip - fix failure when creating an IP with ``reverse`` set, and show the error details from the API when updating an IP fails (https://github.com/ansible-collections/community.general/issues/11362, https://github.com/ansible-collections/community.general/pull/13140).
|
||||
- sefcontext - fix idempotence of ``<<none>>`` file contexts (https://github.com/ansible-collections/community.general/pull/12561)
|
||||
- sesu become plugin - mark the ``become_pass`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- snap - enforce ``snap refresh --hold`` after installing at a specific revision (https://github.com/ansible-collections/community.general/issues/12088, https://github.com/ansible-collections/community.general/pull/12097).
|
||||
- snap - fix ``IndexError`` when a single snap does not exist (https://github.com/ansible-collections/community.general/issues/12375, https://github.com/ansible-collections/community.general/pull/12570).
|
||||
- splunk callback plugin - mark the ``authtoken`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- sudosu become plugin - mark the ``become_pass`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- supervisorctl - treat the ``BACKOFF`` process state as active so that ``state=started`` does not fail on a program still being retried by ``supervisord`` (https://github.com/ansible-collections/community.general/issues/5599, https://github.com/ansible-collections/community.general/pull/12688).
|
||||
- sysrc - keep leading and trailing whitespace of the current value when comparing it, so setting a value that starts or ends with whitespace is idempotent, and report the correct change status for ``state=value_present`` and ``state=value_absent`` when a list item has leading or trailing whitespace (https://github.com/ansible-collections/community.general/issues/13108, https://github.com/ansible-collections/community.general/pull/13117).
|
||||
- terraform - allow ``project_path`` to be a relative path without a ``/``, such as ``myproject`` (https://github.com/ansible-collections/community.general/issues/6463, https://github.com/ansible-collections/community.general/pull/12937).
|
||||
- terraform - fix return value ``command``, showing terraform plan name twice (https://github.com/ansible-collections/community.general/issues/12530, https://github.com/ansible-collections/community.general/pull/12540).
|
||||
- terraform - pass ``state_file`` to the ``apply`` and ``destroy`` commands, not only to ``plan`` (https://github.com/ansible-collections/community.general/issues/6490, https://github.com/ansible-collections/community.general/pull/12997).
|
||||
- timezone - fix failure when setting timezone aliases on Debian and Ubuntu without systemd (https://github.com/ansible-collections/community.general/issues/7498, https://github.com/ansible-collections/community.general/pull/13169).
|
||||
- timezone - no longer requires the ``hwclock`` executable for name-only changes on non-systemd systems (https://github.com/ansible-collections/community.general/issues/12516, https://github.com/ansible-collections/community.general/pull/12526).
|
||||
- timezone - update ``/etc/timezone`` when using ``timedatectl`` (https://github.com/ansible-collections/community.general/issues/8784, https://github.com/ansible-collections/community.general/pull/13074).
|
||||
- tss lookup plugin - mark the ``password`` and ``token`` options as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- udm_dns_record - normalize IPv6 addresses in ``data`` to expanded form to fix idempotency (https://github.com/ansible-collections/community.general/issues/317, https://github.com/ansible-collections/community.general/pull/12149).
|
||||
- ufw - do not reload the default policy when it is already set to the requested value (https://github.com/ansible-collections/community.general/issues/1843, https://github.com/ansible-collections/community.general/pull/12590).
|
||||
- ufw - fix IPv6 rule determination and ``insert_relative_to`` (https://github.com/ansible-collections/community.general/pull/12531).
|
||||
- unixy callback - handle missing ``ansible_host`` in delegated vars when a task is delegated to a host without it set, such as ``localhost`` (https://github.com/ansible-collections/community.general/issues/12112, https://github.com/ansible-collections/community.general/pull/12113).
|
||||
- wsl connection plugin - mark the ``password`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- xen_orchestra inventory plugin - mark the ``password`` option as sensitive so that ansible-core 2.22+ will automatically redact its values in outputs (https://github.com/ansible-collections/community.general/pull/12723).
|
||||
- xenserver_guest - skip provisioning when existing VM is used as a template (https://github.com/ansible-collections/community.general/issues/12576, https://github.com/ansible-collections/community.general/pull/12717).
|
||||
- xenserver_guest_info - use fallback chain for determining VDI format from ``sm_config`` keys ``image-format``, ``vdi_type``, ``type``, defaulting to ``raw`` (https://github.com/ansible-collections/community.general/pull/12119, https://github.com/ansible-collections/community.general/pull/12215).
|
||||
- xml - fix crash and idempotency of namespaced ``attribute`` values (https://github.com/ansible-collections/community.general/issues/10683, https://github.com/ansible-collections/community.general/pull/13121).
|
||||
- xml - preserve DOCTYPE declaration when writing modified XML files (https://github.com/ansible-collections/community.general/issues/2762, https://github.com/ansible-collections/community.general/pull/12148).
|
||||
- zpool - fix idempotency of ``vdevs`` with short device names, symbolic links, partitions, multi-disk stripes, and role groups (https://github.com/ansible-collections/community.general/issues/10771, https://github.com/ansible-collections/community.general/issues/10744, https://github.com/ansible-collections/community.general/pull/12948).
|
||||
- zpool - fix idempotency of vdevs ``special`` and ``dedup`` (https://github.com/ansible-collections/community.general/issues/12744, https://github.com/ansible-collections/community.general/pull/12745).
|
||||
- zypper - do not fail when zypper returns ``102`` (reboot needed) after a successful run, for example when applying patches with ``--with-interactive`` (https://github.com/ansible-collections/community.general/issues/12960, https://github.com/ansible-collections/community.general/pull/12965).
|
||||
- zypper - do not pass ``extra_args`` to the ``zypper search`` command used to determine the installed packages (https://github.com/ansible-collections/community.general/issues/4242, https://github.com/ansible-collections/community.general/pull/12958).
|
||||
- zypper - fail when ``zypper`` reports errors while run through ``transactional-update`` versions that return success regardless (https://github.com/ansible-collections/community.general/issues/9011, https://github.com/ansible-collections/community.general/pull/12957).
|
||||
- zypper - fix version specifier parsing when the version contains non-numeric characters, which caused packages to not be removed or installed (https://github.com/ansible-collections/community.general/pull/12588, https://github.com/ansible-collections/community.general/issues/6564).
|
||||
- zypper_repository - fix ``enabled``, ``autorefresh``, and ``gpgcheck`` module parameters being overridden by values read from a ``.repo`` file (https://github.com/ansible-collections/community.general/issues/8783, https://github.com/ansible-collections/community.general/pull/12022).
|
||||
- zypper_repository - fix idempotency when the repository URL contains ``$releasever`` on openSUSE Leap 16.0 (https://github.com/ansible-collections/community.general/pull/13017).
|
||||
|
||||
New Plugins
|
||||
-----------
|
||||
|
||||
Callback
|
||||
~~~~~~~~
|
||||
|
||||
- community.general.oneline - One\-line Ansible screen output.
|
||||
|
||||
Filter
|
||||
~~~~~~
|
||||
|
||||
- community.general.from_toml - Convert TOML string into dictionary.
|
||||
|
||||
Lookup
|
||||
~~~~~~
|
||||
|
||||
- community.general.proton_pass - Fetch secrets from Proton Pass via the :literal:`pass\-cli` command\-line tool.
|
||||
|
||||
New Modules
|
||||
-----------
|
||||
|
||||
- community.general.appimage - Manage AppImage packages.
|
||||
- community.general.consul_kv_info - Retrieve entries from the key/value store of a Consul cluster.
|
||||
- community.general.django_flush - Wrapper for :literal:`django\-admin flush`.
|
||||
- community.general.django_makemigrations - Wrapper for :literal:`django\-admin makemigrations`.
|
||||
- community.general.flatpak_mask - Mask Flatpak applications.
|
||||
- community.general.gitlab_project_approvals - Manage project\-level merge request approvals settings on GitLab Server.
|
||||
- community.general.golang_package - Manage Go packages with :literal:`go install`.
|
||||
- community.general.google_chat - Send Google Chat notifications.
|
||||
- community.general.kopia_repository - Manage Kopia repository.
|
||||
- community.general.kopia_repository_info - Gather information about a Kopia repository.
|
||||
- community.general.packer - Manage HashiCorp Packer builds.
|
||||
- community.general.serestorecon - Restore SELinux file contexts.
|
||||
- community.general.write_binary_file - Write binary file from Base64 encoded input.
|
||||
- community.general.xattr_info - Retrieve filesystem extended attributes.
|
||||
- community.general.xml_info - Query XML files or strings.
|
||||
- community.general.zypper_updates_info - List available Zypper updates.
|
||||
@@ -0,0 +1,3 @@
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
SPDX-FileCopyrightText: Ansible Project
|
||||
@@ -0,0 +1,7 @@
|
||||
<!--
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
|
||||
Ingest @AGENTS.md
|
||||
@@ -0,0 +1,267 @@
|
||||
<!--
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
|
||||
# Contributing
|
||||
|
||||
We follow [Ansible Code of Conduct](https://docs.ansible.com/projects/ansible/latest/community/code_of_conduct.html) in all our contributions and interactions within this repository.
|
||||
|
||||
**Please note that using AI is accepted but you MUST comply with the [Ansible Community Policy for AI-Assisted Contributions](https://docs.ansible.com/projects/ansible/devel/community/ai_policy.html)**!
|
||||
|
||||
If you are a committer, also refer to the [collection's committer guidelines](https://github.com/ansible-collections/community.general/blob/main/commit-rights.md).
|
||||
|
||||
## Issue tracker
|
||||
|
||||
Whether you are looking for an opportunity to contribute or you found a bug and already know how to solve it, please go to the [issue tracker](https://github.com/ansible-collections/community.general/issues).
|
||||
There you can find feature ideas to implement, reports about bugs to solve, or submit an issue to discuss your idea before implementing it which can help choose the right direction at the beginning of your work and potentially save a lot of time and effort.
|
||||
Also somebody may already have started discussing or working on implementing the same or a similar idea,
|
||||
so you can cooperate to create a better solution together.
|
||||
|
||||
* If you are interested in starting with an easy issue, look for [issues with an `easyfix` label](https://github.com/ansible-collections/community.general/labels/easyfix).
|
||||
* Often issues that are waiting for contributors to pick up have [the `waiting_on_contributor` label](https://github.com/ansible-collections/community.general/labels/waiting_on_contributor).
|
||||
|
||||
## Review pull requests
|
||||
|
||||
Look through currently [open pull requests](https://github.com/ansible-collections/community.general/pulls).
|
||||
|
||||
You can help by reviewing them. Reviews help move pull requests to merge state. Some good pull requests cannot be merged only due to a lack of reviews. And it is always worth saying that good reviews are often more valuable than pull requests themselves.
|
||||
Note that reviewing does not only mean code review, but also offering comments on new interfaces added to existing plugins/modules, interfaces of new plugins/modules, improving language (not everyone is a native English speaker), or testing bugfixes and new features!
|
||||
|
||||
Also, consider taking up a valuable, reviewed, but abandoned pull request which you could politely ask the original authors to complete yourself.
|
||||
|
||||
## Open pull requests
|
||||
|
||||
Please read our ['Contributing to collections'](https://docs.ansible.com/projects/ansible/devel/dev_guide/developing_collections_contributing.html#contributing-to-a-collection-community-general) guide.
|
||||
|
||||
* Try committing your changes with an informative but short commit message.
|
||||
* Do not squash your commits and force-push to your branch if not needed. Reviews of your pull request are much easier with individual commits to comprehend the pull request history. All commits of your pull request branch will be squashed into one commit by GitHub upon merge.
|
||||
* Do not add merge commits to your PR. The bot will complain and you will have to rebase ([instructions for rebasing](https://docs.ansible.com/projects/ansible/latest/dev_guide/developing_rebasing.html)) to remove them before your PR can be merged. To avoid that git automatically does merges during pulls, you can configure it to do rebases instead by running `git config pull.rebase true` inside the repository checkout.
|
||||
* Make sure your PR includes a [changelog fragment](https://docs.ansible.com/projects/ansible/devel/community/collection_development_process.html#creating-a-changelog-fragment).
|
||||
* You must not include a fragment for new modules or new plugins. Also you shouldn't include one for docs-only changes. (If you're not sure, simply don't include one, we'll tell you whether one is needed or not :) )
|
||||
* Please always include a link to the pull request itself, and if the PR is about an issue, also a link to the issue. Also make sure the fragment ends with a period, and begins with a lower-case letter after `-`. (Again, if you don't do this, we'll add suggestions to fix it, so don't worry too much :) )
|
||||
* Note that we format the code with `ruff format`. If your change does not match the formatter's expectations, CI will fail and your PR will not get merged. See below for how to format code with antsibull-nox.
|
||||
|
||||
You can also read the Ansible community's [Quick-start development guide](https://docs.ansible.com/projects/ansible/devel/community/create_pr_quick_start.html).
|
||||
|
||||
## Test pull requests
|
||||
|
||||
If you want to test a PR locally, refer to [our testing guide](https://docs.ansible.com/projects/ansible/devel/community/collection_contributors/collection_test_pr_locally.html) for instructions on how do it quickly.
|
||||
|
||||
If you find any inconsistencies or places in this document which can be improved, feel free to raise an issue or pull request to fix it.
|
||||
|
||||
## Format code; and run sanity or unit tests locally (with antsibull-nox)
|
||||
|
||||
The easiest way to format the code, and to run sanity and unit tests locally is to use [antsibull-nox](https://docs.ansible.com/projects/antsibull-nox/).
|
||||
(If you have [nox](https://nox.thea.codes/en/stable/) installed, it will automatically install antsibull-nox in a virtual environment for you.)
|
||||
|
||||
### Format code
|
||||
|
||||
The following commands show how to run ruff format:
|
||||
|
||||
```.bash
|
||||
# Run all configured formatters:
|
||||
nox -Re formatters
|
||||
|
||||
# If you notice discrepancies between your local formatter and CI, you might
|
||||
# need to re-generate the virtual environment:
|
||||
nox -e formatters
|
||||
```
|
||||
|
||||
### Sanity tests
|
||||
|
||||
The following commands show how to run ansible-test sanity tests:
|
||||
|
||||
```.bash
|
||||
# Run basic sanity tests for all files in the collection:
|
||||
nox -Re ansible-test-sanity-devel
|
||||
|
||||
# Run basic sanity tests for the given files and directories:
|
||||
nox -Re ansible-test-sanity-devel -- plugins/modules/system/pids.py tests/integration/targets/pids/
|
||||
|
||||
# Run all other sanity tests for all files in the collection:
|
||||
nox -R
|
||||
```
|
||||
|
||||
If you replace `-Re` with `-e`, respectively. If you leave `-R` away, then the virtual environments will be re-created. The `-R` re-uses them (if they already exist).
|
||||
|
||||
### Unit tests
|
||||
|
||||
The following commands show how to run unit tests:
|
||||
|
||||
```.bash
|
||||
# Run all unit tests:
|
||||
nox -Re ansible-test-units-devel
|
||||
|
||||
# Run all unit tests for one Python version (a lot faster):
|
||||
nox -Re ansible-test-units-devel-3.14
|
||||
|
||||
# Run a specific unit test (for the nmcli module) for one Python version:
|
||||
nox -Re ansible-test-units-devel-3.14 -- tests/unit/plugins/modules/net_tools/test_nmcli.py
|
||||
```
|
||||
|
||||
If you replace `-Re` with `-e`, then the virtual environments will be re-created. The `-R` re-uses them (if they already exist).
|
||||
|
||||
### Heavy integration tests
|
||||
|
||||
Some integration test targets are not part of the regular `azp/posix/N` or `azp/generic/1` CI targets because they are too slow or need too many resources to run in CI.
|
||||
Those that can run without credentials or special hardware are also tagged with the `heavy` alias, and should be run every once in a while:
|
||||
|
||||
```.bash
|
||||
nox -Re ansible-test-integration-heavy
|
||||
```
|
||||
|
||||
Additional options for `ansible-test` can be passed after `--`.
|
||||
|
||||
## Run basic sanity, unit or integration tests locally (with ansible-test)
|
||||
|
||||
Instead of using antsibull-nox, you can also run sanity and unit tests with ansible-test directly.
|
||||
This also allows you to run integration tests.
|
||||
|
||||
You have to check out the repository into a specific path structure to be able to run `ansible-test`. The path to the git checkout must end with `.../ansible_collections/community/general`. Please see [our testing guide](https://docs.ansible.com/projects/ansible/devel/community/collection_contributors/collection_test_pr_locally.html) for instructions on how to check out the repository into a correct path structure. The short version of these instructions is:
|
||||
|
||||
```.bash
|
||||
mkdir -p ~/dev/ansible_collections/community
|
||||
git clone https://github.com/ansible-collections/community.general.git ~/dev/ansible_collections/community/general
|
||||
cd ~/dev/ansible_collections/community/general
|
||||
```
|
||||
|
||||
Then you can run `ansible-test` (which is a part of [ansible-core](https://pypi.org/project/ansible-core/)) inside the checkout. The following example commands expect that you have installed Docker or Podman. Note that Podman has only been supported by more recent ansible-core releases. If you are using Docker, the following will work with Ansible 2.9+.
|
||||
|
||||
### Basic sanity tests
|
||||
|
||||
The following commands show how to run basic sanity tests:
|
||||
|
||||
```.bash
|
||||
# Run basic sanity tests for all files in the collection:
|
||||
ansible-test sanity --docker -v
|
||||
|
||||
# Run basic sanity tests for the given files and directories:
|
||||
ansible-test sanity --docker -v plugins/modules/system/pids.py tests/integration/targets/pids/
|
||||
```
|
||||
|
||||
### Unit tests
|
||||
|
||||
Note that for running unit tests, you need to install required collections in the same folder structure that `community.general` is checked out in.
|
||||
Right now, you need to install [`community.internal_test_tools`](https://github.com/ansible-collections/community.internal_test_tools).
|
||||
If you want to use the latest version from GitHub, you can run:
|
||||
|
||||
```
|
||||
git clone https://github.com/ansible-collections/community.internal_test_tools.git ~/dev/ansible_collections/community/internal_test_tools
|
||||
```
|
||||
|
||||
The following commands show how to run unit tests:
|
||||
|
||||
```.bash
|
||||
# Run all unit tests:
|
||||
ansible-test units --docker -v
|
||||
|
||||
# Run all unit tests for one Python version (a lot faster):
|
||||
ansible-test units --docker -v --python 3.14
|
||||
|
||||
# Run a specific unit test (for the nmcli module) for one Python version:
|
||||
ansible-test units --docker -v --python 3.14 tests/unit/plugins/modules/net_tools/test_nmcli.py
|
||||
```
|
||||
|
||||
### Integration tests
|
||||
|
||||
Note that for running integration tests, you need to install required collections in the same folder structure that `community.general` is checked out in.
|
||||
Right now, depending on the test, you need to install [`ansible.posix`](https://github.com/ansible-collections/ansible.posix), [`community.crypto`](https://github.com/ansible-collections/community.crypto), and [`community.docker`](https://github.com/ansible-collections/community.docker):
|
||||
If you want to use the latest versions from GitHub, you can run:
|
||||
|
||||
```
|
||||
mkdir -p ~/dev/ansible_collections/ansible
|
||||
git clone https://github.com/ansible-collections/ansible.posix.git ~/dev/ansible_collections/ansible/posix
|
||||
git clone https://github.com/ansible-collections/community.crypto.git ~/dev/ansible_collections/community/crypto
|
||||
git clone https://github.com/ansible-collections/community.docker.git ~/dev/ansible_collections/community/docker
|
||||
```
|
||||
|
||||
The following commands show how to run integration tests:
|
||||
|
||||
#### In Docker
|
||||
|
||||
Integration tests on Docker have the following parameters:
|
||||
|
||||
- `image_name` (required): The name of the Docker image. To get the list of supported Docker images, run
|
||||
`ansible-test integration --help` and look for _target docker images_.
|
||||
- `test_name` (optional): The name of the integration test.
|
||||
For modules, this equals the short name of the module; for example, `pacman` in case of `community.general.pacman`.
|
||||
For plugins, the plugin type is added before the plugin's short name, for example `callback_yaml` for the `community.general.yaml` callback.
|
||||
|
||||
```.bash
|
||||
# Test all plugins/modules on fedora
|
||||
ansible-test integration -v --docker fedora
|
||||
|
||||
# Template
|
||||
ansible-test integration -v --docker image_name test_name
|
||||
|
||||
# Example community.general.ini_file module on fedora Docker image:
|
||||
ansible-test integration -v --docker fedora ini_file
|
||||
```
|
||||
|
||||
#### Without isolation
|
||||
|
||||
```.bash
|
||||
# Run integration tests for the flattened lookup **without any isolation**:
|
||||
ansible-test integration -v lookup_flattened
|
||||
```
|
||||
|
||||
If you are unsure about the integration test target name for a module or plugin, you can take a look in `tests/integration/targets/`. Tests for plugins have the plugin type prepended.
|
||||
|
||||
## Devcontainer
|
||||
|
||||
Since community.general 12.2.0, the project repository supports [devcontainers](https://containers.dev/). In short, it is a standard mechanism to
|
||||
create a container that is then used during the development cycle. Many tools are pre-installed in the container and will be already available
|
||||
to you as a developer. A number of different IDEs support that configuration, the most prominent ones being VSCode and PyCharm.
|
||||
|
||||
See the files under [.devcontainer](.devcontainer) for details on what is deployed inside that container.
|
||||
|
||||
Beware of:
|
||||
|
||||
- By default, the devcontainer installs the latest version of `ansible-core`.
|
||||
When testing your changes locally, keep in mind that the collection must support older versions of
|
||||
`ansible-core` and, depending on what is being tested, results may vary.
|
||||
- Integration tests executed directly inside the devcontainer without isolation (see above) may fail if
|
||||
they expected to be run in full fledged VMs. On the other hand, the devcontainer setup allows running
|
||||
containers inside the container (the `docker-in-docker` feature).
|
||||
- The devcontainer is built with a directory structure such that
|
||||
`.../ansible_collections/community/general` contains the project repository, so `ansible-test` and
|
||||
other standard tools should work without any additional setup
|
||||
- By default, the devcontainer installs `pre-commit` and configures it to perform `ruff check` and
|
||||
`ruff format` on the Python files, prior to committing. That configuration is going to be used by
|
||||
`git` even outside the devcontainer. To prevent errors, you have to either install `pre-commit` in
|
||||
your computer, outside the devcontainer, or run `pre-commit uninstall` from within the devcontainer
|
||||
before quitting it.
|
||||
|
||||
## Creating new modules or plugins
|
||||
|
||||
Creating new modules and plugins requires a bit more work than other Pull Requests.
|
||||
|
||||
1. Please make sure that your new module or plugin is of interest to a larger audience. Very specialized modules or plugins that
|
||||
can only be used by very few people should better be added to more specialized collections.
|
||||
|
||||
2. Please do not add more than one plugin/module in one PR, especially if it is the first plugin/module you are contributing.
|
||||
That makes it easier for reviewers, and increases the chance that your PR will get merged. If you plan to contribute a group
|
||||
of plugins/modules (say, more than a module and a corresponding `_info` module), please mention that in the first PR. In
|
||||
such cases, you also have to think whether it is better to publish the group of plugins/modules in a new collection.
|
||||
|
||||
3. When creating a new module or plugin, please make sure that you follow various guidelines:
|
||||
|
||||
- Follow [development conventions](https://docs.ansible.com/projects/ansible/devel/dev_guide/developing_modules_best_practices.html);
|
||||
- Follow [documentation standards](https://docs.ansible.com/projects/ansible/devel/dev_guide/developing_modules_documenting.html) and
|
||||
the [Ansible style guide](https://docs.ansible.com/projects/ansible/devel/dev_guide/style_guide/index.html#style-guide);
|
||||
- Make sure your modules and plugins are [GPL-3.0-or-later](https://www.gnu.org/licenses/gpl-3.0-standalone.html) licensed
|
||||
(new module_utils can also be [BSD-2-clause](https://opensource.org/licenses/BSD-2-Clause) licensed);
|
||||
- Make sure that new plugins and modules have tests (unit tests, integration tests, or both); it is preferable to have some tests
|
||||
which run in CI.
|
||||
|
||||
4. Action plugins need to be accompanied by a module, even if the module file only contains documentation
|
||||
(`DOCUMENTATION`, `EXAMPLES` and `RETURN`). The module must have the same name and directory path in `plugins/modules/`
|
||||
than the action plugin has in `plugins/action/`.
|
||||
|
||||
5. Make sure to add a BOTMETA entry for your new module/plugin in `.github/BOTMETA.yml`. Search for other plugins/modules in the
|
||||
same directory to see how entries could look. You should list all authors either as `maintainers` or under `ignore`. People
|
||||
listed as `maintainers` will be pinged for new issues and PRs that modify the module/plugin or its tests.
|
||||
|
||||
When you add a new plugin/module, we expect that you perform maintainer duty for at least some time after contributing it.
|
||||
@@ -0,0 +1,675 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,8 @@
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
../COPYING
|
||||
@@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) <year> <copyright holders>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"collection_info": {
|
||||
"namespace": "community",
|
||||
"name": "general",
|
||||
"version": "14.0.1",
|
||||
"authors": [
|
||||
"Ansible (https://github.com/ansible)"
|
||||
],
|
||||
"readme": "README.md",
|
||||
"tags": [
|
||||
"community"
|
||||
],
|
||||
"description": "The community.general collection is a part of the Ansible package and includes many modules and plugins supported by Ansible community which are not part of more specialized community collections.",
|
||||
"license": [],
|
||||
"license_file": "COPYING",
|
||||
"dependencies": {
|
||||
"community.library_inventory_filtering_v1": ">=1.0.0"
|
||||
},
|
||||
"repository": "https://github.com/ansible-collections/community.general",
|
||||
"documentation": "https://docs.ansible.com/projects/ansible/latest/collections/community/general/",
|
||||
"homepage": "https://github.com/ansible-collections/community.general",
|
||||
"issues": "https://github.com/ansible-collections/community.general/issues"
|
||||
},
|
||||
"file_manifest_file": {
|
||||
"name": "FILES.json",
|
||||
"ftype": "file",
|
||||
"chksum_type": "sha256",
|
||||
"chksum_sha256": "baee38621a6e869484d0d6860964dc10af57e3d5e0e96235690872486b51a803",
|
||||
"format": 1
|
||||
},
|
||||
"format": 1
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
|
||||
# Community General Collection
|
||||
|
||||
[](https://docs.ansible.com/projects/ansible/devel/collections/community/general/)
|
||||
[](https://dev.azure.com/ansible/community.general/_build?definitionId=31)
|
||||
[](https://github.com/ansible-collections/community.general/actions)
|
||||
[](https://codecov.io/gh/ansible-collections/community.general)
|
||||
[](https://api.reuse.software/info/github.com/ansible-collections/community.general)
|
||||
|
||||
This repository contains the `community.general` Ansible Collection. The collection is a part of the Ansible package and includes many modules and plugins supported by the Ansible community which are not part of more specialized community collections.
|
||||
|
||||
You can find [documentation for this collection on the Ansible docs site](https://docs.ansible.com/projects/ansible/latest/collections/community/general/).
|
||||
|
||||
Please note that this collection does **not** support Windows targets. Only connection plugins included in this collection might support Windows targets, and will explicitly mention that in their documentation if they do so.
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
We follow [Ansible Code of Conduct](https://docs.ansible.com/projects/ansible/latest/community/code_of_conduct.html) in all our interactions within this project.
|
||||
|
||||
If you encounter abusive behavior violating the [Ansible Code of Conduct](https://docs.ansible.com/projects/ansible/latest/community/code_of_conduct.html), please refer to the [policy violations](https://docs.ansible.com/projects/ansible/latest/community/code_of_conduct.html#policy-violations) section of the Code of Conduct for information on how to raise a complaint.
|
||||
|
||||
## Communication
|
||||
|
||||
* Join the Ansible forum:
|
||||
* [Get Help](https://forum.ansible.com/c/help/6): get help or help others. This is for questions about modules or plugins in the collection. Please add appropriate tags if you start new discussions.
|
||||
* [Tag `community-general`](https://forum.ansible.com/tag/community-general): discuss the *collection itself*, instead of specific modules or plugins.
|
||||
* [Social Spaces](https://forum.ansible.com/c/chat/4): gather and interact with fellow enthusiasts.
|
||||
* [News & Announcements](https://forum.ansible.com/c/news/5): track project-wide announcements including social events.
|
||||
|
||||
* The Ansible [Bullhorn newsletter](https://docs.ansible.com/projects/ansible/devel/community/communication.html#the-bullhorn): used to announce releases and important changes.
|
||||
|
||||
For more information about communication, see the [Ansible communication guide](https://docs.ansible.com/projects/ansible/devel/community/communication.html).
|
||||
|
||||
## Tested with Ansible
|
||||
|
||||
Tested with the current ansible-core 2.19, ansible-core 2.20, ansible-core 2.21, ansible-core 2.22 releases and the current development version of ansible-core. Ansible-core versions before 2.19.0 are not supported. This includes all ansible-base 2.10 and Ansible 2.9 releases.
|
||||
|
||||
## External requirements
|
||||
|
||||
Some modules and plugins require external libraries. Please check the requirements for each plugin or module you use in the documentation to find out which requirements are needed.
|
||||
|
||||
## Included content
|
||||
|
||||
Please check the included content on the [Ansible Galaxy page for this collection](https://galaxy.ansible.com/ui/repo/published/community/general/) or the [documentation on the Ansible docs site](https://docs.ansible.com/projects/ansible/latest/collections/community/general/).
|
||||
|
||||
## Using this collection
|
||||
|
||||
This collection is shipped with the Ansible package. So if you have it installed, no more action is required.
|
||||
|
||||
If you have a minimal installation (only Ansible Core installed) or you want to use the latest version of the collection along with the whole Ansible package, you need to install the collection from [Ansible Galaxy](https://galaxy.ansible.com/ui/repo/published/community/general/) manually with the `ansible-galaxy` command-line tool:
|
||||
|
||||
ansible-galaxy collection install community.general
|
||||
|
||||
You can also include it in a `requirements.yml` file and install it via `ansible-galaxy collection install -r requirements.yml` using the format:
|
||||
|
||||
```yaml
|
||||
collections:
|
||||
- name: community.general
|
||||
```
|
||||
|
||||
Note that if you install the collection manually, it will not be upgraded automatically when you upgrade the Ansible package. To upgrade the collection to the latest available version, run the following command:
|
||||
|
||||
```bash
|
||||
ansible-galaxy collection install community.general --upgrade
|
||||
```
|
||||
|
||||
You can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax where `X.Y.Z` can be any [available version](https://galaxy.ansible.com/ui/repo/published/community/general/):
|
||||
|
||||
```bash
|
||||
ansible-galaxy collection install community.general:==X.Y.Z
|
||||
```
|
||||
|
||||
See [Ansible Using collections](https://docs.ansible.com/projects/ansible/latest/user_guide/collections_using.html) for more details.
|
||||
|
||||
## Contributing to this collection
|
||||
|
||||
The content of this collection is made by good people just like you, a community of individuals collaborating on making the world better through developing automation software.
|
||||
|
||||
We are actively accepting new contributors.
|
||||
|
||||
All types of contributions are very welcome.
|
||||
|
||||
You don't know how to start? Refer to our [contribution guide](https://github.com/ansible-collections/community.general/blob/main/CONTRIBUTING.md)!
|
||||
|
||||
The current maintainers are listed in the [commit-rights.md](https://github.com/ansible-collections/community.general/blob/main/commit-rights.md#people) file. If you have questions or need help, feel free to mention them in the proposals.
|
||||
|
||||
You can find more information in the [developer guide for collections](https://docs.ansible.com/projects/ansible/devel/dev_guide/developing_collections.html#contributing-to-collections), and in the [Ansible Community Guide](https://docs.ansible.com/projects/ansible/latest/community/index.html).
|
||||
|
||||
Also for some notes specific to this collection see [our CONTRIBUTING documentation](https://github.com/ansible-collections/community.general/blob/main/CONTRIBUTING.md).
|
||||
|
||||
### Running tests
|
||||
|
||||
See [here](https://docs.ansible.com/projects/ansible/devel/dev_guide/developing_collections.html#testing-collections).
|
||||
|
||||
## Collection maintenance
|
||||
|
||||
To learn how to maintain / become a maintainer of this collection, refer to:
|
||||
|
||||
* [Committer guidelines](https://github.com/ansible-collections/community.general/blob/main/commit-rights.md).
|
||||
* [Maintainer guidelines](https://github.com/ansible/community-docs/blob/main/maintaining.rst).
|
||||
|
||||
It is necessary for maintainers of this collection to be subscribed to:
|
||||
|
||||
* The collection itself (the `Watch` button → `All Activity` in the upper right corner of the repository's homepage).
|
||||
* The "Changes Impacting Collection Contributors and Maintainers" [issue](https://github.com/ansible-collections/overview/issues/45).
|
||||
|
||||
They also should be subscribed to Ansible's [The Bullhorn newsletter](https://docs.ansible.com/projects/ansible/devel/community/communication.html#the-bullhorn).
|
||||
|
||||
## Publishing New Version
|
||||
|
||||
See [Releasing collections with release branches](https://docs.ansible.com/projects/ansible/latest/community/collection_contributors/collection_release_with_branches.html#releasing-collections-with-release-branches) to learn how to release this collection.
|
||||
|
||||
## Release notes
|
||||
|
||||
See the [changelog](https://github.com/ansible-collections/community.general/blob/stable-14/CHANGELOG.md).
|
||||
|
||||
## Roadmap
|
||||
|
||||
In general, we plan to release a major version every six months, and minor versions every two months. Major versions can contain breaking changes, while minor versions only contain new features and bugfixes.
|
||||
|
||||
See [this issue](https://github.com/ansible-collections/community.general/issues/582) for information on releasing, versioning, and deprecation.
|
||||
|
||||
## More information
|
||||
|
||||
- [Ansible Collection overview](https://github.com/ansible-collections/overview)
|
||||
- [Ansible User guide](https://docs.ansible.com/projects/ansible/latest/user_guide/index.html)
|
||||
- [Ansible Developer guide](https://docs.ansible.com/projects/ansible/latest/dev_guide/index.html)
|
||||
- [Ansible Community code of conduct](https://docs.ansible.com/projects/ansible/latest/community/code_of_conduct.html)
|
||||
|
||||
## Licensing
|
||||
|
||||
This collection is primarily licensed and distributed as a whole under the GNU General Public License v3.0 or later.
|
||||
|
||||
See [LICENSES/GPL-3.0-or-later.txt](https://github.com/ansible-collections/community.general/blob/stable-14/COPYING) for the full text.
|
||||
|
||||
Parts of the collection are licensed under the [BSD 2-Clause license](https://github.com/ansible-collections/community.general/blob/stable-14/LICENSES/BSD-2-Clause.txt) and the [MIT license](https://github.com/ansible-collections/community.general/blob/stable-14/LICENSES/MIT.txt).
|
||||
|
||||
All files have a machine readable `SPDX-License-Identifier:` comment denoting its respective license(s) or an equivalent entry in an accompanying `.license` file. Only changelog fragments (which will not be part of a release) are covered by a blanket statement in `REUSE.toml`. This conforms to the [REUSE specification](https://reuse.software/spec/).
|
||||
@@ -0,0 +1,3 @@
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
SPDX-FileCopyrightText: Ansible Project
|
||||
@@ -0,0 +1,11 @@
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
version = 1
|
||||
|
||||
[[annotations]]
|
||||
path = "changelogs/fragments/**"
|
||||
precedence = "aggregate"
|
||||
SPDX-FileCopyrightText = "Ansible Project"
|
||||
SPDX-License-Identifier = "GPL-3.0-or-later"
|
||||
@@ -0,0 +1,360 @@
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# SPDX-FileCopyrightText: 2025 Felix Fontein <felix@fontein.de>
|
||||
|
||||
version = 1
|
||||
|
||||
[collection_sources]
|
||||
"ansible.posix" = "git+https://github.com/ansible-collections/ansible.posix.git,main"
|
||||
"community.crypto" = "git+https://github.com/ansible-collections/community.crypto.git,main"
|
||||
"community.docker" = "git+https://github.com/ansible-collections/community.docker.git,main"
|
||||
"community.internal_test_tools" = "git+https://github.com/ansible-collections/community.internal_test_tools.git,main"
|
||||
"community.library_inventory_filtering_v1" = "git+https://github.com/ansible-collections/community.library_inventory_filtering.git,stable-1"
|
||||
|
||||
[vcs]
|
||||
vcs = "git"
|
||||
development_branch = "main"
|
||||
stable_branches = [ "stable-*" ]
|
||||
|
||||
[releaser]
|
||||
type = "zuul+github"
|
||||
zuul_base_url = "https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/"
|
||||
zuul_tenant = "ansible"
|
||||
zuul_project_name = "ansible-collections/community.general"
|
||||
github_org = "ansible-collections"
|
||||
github_repo = "community.general"
|
||||
github_release_title = "{version}"
|
||||
github_release_body = "See {repository_url}/blob/{branch}/CHANGELOG.md for all changes."
|
||||
git_release_branch = "stable-14"
|
||||
git_tag_format = "{version}"
|
||||
git_sign_commits = true
|
||||
git_sign_tags = true
|
||||
git_release_commit_message = "Release {version}."
|
||||
git_release_tag_message = "{version}"
|
||||
git_prepare_commit_message = "Prepare {version}."
|
||||
git_sign_other_commits = false
|
||||
git_post_release_bump = "next-minor"
|
||||
git_post_release_commit_message = "The next expected release will be {new-version}."
|
||||
|
||||
[sessions]
|
||||
|
||||
[sessions.lint]
|
||||
code_files = ["."] # consider all Python files in the collection
|
||||
run_isort = false
|
||||
run_black = false
|
||||
run_ruff_autofix = true
|
||||
ruff_autofix_config = "ruff-plugins.toml"
|
||||
ruff_autofix_modules_config = "ruff-modules.toml"
|
||||
ruff_autofix_select = [
|
||||
"I",
|
||||
"RUF022",
|
||||
]
|
||||
run_ruff_check = true
|
||||
ruff_check_config = "ruff-plugins.toml"
|
||||
ruff_check_modules_config = "ruff-modules.toml"
|
||||
run_ruff_format = true
|
||||
ruff_format_config = "ruff-plugins.toml"
|
||||
ruff_format_modules_config = "ruff-modules.toml"
|
||||
run_flake8 = false
|
||||
run_pylint = false
|
||||
run_yamllint = true
|
||||
yamllint_config = ".yamllint"
|
||||
# yamllint_config_plugins = ".yamllint-docs"
|
||||
# yamllint_config_plugins_examples = ".yamllint-examples"
|
||||
run_mypy = true
|
||||
mypy_ansible_core_package = "ansible-core>=2.19.0"
|
||||
mypy_config = ".mypy.ini"
|
||||
mypy_extra_deps = [
|
||||
"cryptography",
|
||||
"dnspython",
|
||||
"lxml-stubs",
|
||||
"types-mock",
|
||||
"types-paramiko",
|
||||
"types-passlib",
|
||||
"types-psutil",
|
||||
"types-PyYAML",
|
||||
"types-requests",
|
||||
]
|
||||
|
||||
[sessions.docs_check]
|
||||
validate_collection_refs="all"
|
||||
codeblocks_restrict_types = [
|
||||
"ansible-output",
|
||||
"console",
|
||||
"ini",
|
||||
"json",
|
||||
"python",
|
||||
"shell",
|
||||
"yaml",
|
||||
"yaml+jinja",
|
||||
"text",
|
||||
]
|
||||
codeblocks_restrict_type_exact_case = true
|
||||
codeblocks_allow_without_type = false
|
||||
codeblocks_allow_literal_blocks = false
|
||||
|
||||
[sessions.license_check]
|
||||
|
||||
[sessions.extra_checks]
|
||||
run_no_unwanted_files = true
|
||||
no_unwanted_files_module_extensions = [".py"]
|
||||
no_unwanted_files_yaml_extensions = [".yml"]
|
||||
run_action_groups = true
|
||||
run_no_trailing_whitespace = true
|
||||
no_trailing_whitespace_skip_paths = [
|
||||
"tests/integration/targets/iso_extract/files/test.iso",
|
||||
"tests/integration/targets/java_cert/files/testpkcs.p12",
|
||||
"tests/integration/targets/one_host/files/testhost/tmp/opennebula-fixtures.json.gz",
|
||||
"tests/integration/targets/one_template/files/testhost/tmp/opennebula-fixtures.json.gz",
|
||||
"tests/integration/targets/setup_flatpak_remote/files/repo.tar.xz",
|
||||
]
|
||||
no_trailing_whitespace_skip_directories = [
|
||||
"tests/unit/plugins/modules/dnf_config_manager/fixtures/",
|
||||
"tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/",
|
||||
"tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/input/",
|
||||
]
|
||||
|
||||
[[sessions.extra_checks.action_groups_config]]
|
||||
name = "consul"
|
||||
pattern = "^consul_.*$"
|
||||
exclusions = [
|
||||
# The consul_acl_bootstrap module does not have a 'token' option, as opposed
|
||||
# to all other consul modules. Therefore it is not part of the action group.
|
||||
"consul_acl_bootstrap",
|
||||
]
|
||||
doc_fragment = "community.general._consul.actiongroup_consul"
|
||||
|
||||
[[sessions.extra_checks.action_groups_config]]
|
||||
name = "scaleway"
|
||||
pattern = "^scaleway_.*$"
|
||||
doc_fragment = "community.general._scaleway.actiongroup_scaleway"
|
||||
|
||||
[sessions.build_import_check]
|
||||
run_galaxy_importer = true
|
||||
|
||||
[sessions.ansible_lint]
|
||||
|
||||
[sessions.ansible_test_sanity]
|
||||
include_devel = true
|
||||
|
||||
[sessions.ansible_test_units]
|
||||
include_devel = true
|
||||
split_by_python_version = true
|
||||
|
||||
[sessions.ansible_test_units.core_python_versions]
|
||||
"2.19" = ["3.8", "3.11", "3.13"]
|
||||
"2.20" = ["3.9", "3.12", "3.14"]
|
||||
"2.21" = ["3.9", "3.12", "3.14"]
|
||||
"2.22" = ["3.10", "3.13", "3.15"]
|
||||
|
||||
[sessions.ansible_test_integration]
|
||||
session_name_template = "ansible-test-integration-{ansible_core}{dash_docker_short}{dash_remote}{dash_python_version}{dash_target_dashized}"
|
||||
display_name_template = "Ⓐ{ansible_core}{plus_docker_nice}{plus_remote_nice}{plus_py_python_version}{plus_target_nice}"
|
||||
description_template = "Run integration tests with ansible-core {ansible_core}{comma_docker_nice}{comma_remote_nice}{comma_py_python_version}{comma_target_nice}"
|
||||
retry_on_error = "in-ci"
|
||||
|
||||
[sessions.ansible_test_integration.nice_target_names]
|
||||
"azp/posix/1/" = "group 1"
|
||||
"azp/posix/2/" = "group 2"
|
||||
"azp/posix/3/" = "group 3"
|
||||
"azp/posix/vm/" = "extra VMs"
|
||||
"azp/generic/1/" = "generic group 1"
|
||||
|
||||
[sessions.ansible_test_integration.nice_docker_names]
|
||||
"quay.io/ansible-community/test-image:debian-bookworm" = "Debian 12"
|
||||
"quay.io/ansible-community/test-image:debian-13-trixie" = "Debian 13"
|
||||
"quay.io/ansible-community/test-image:archlinux" = "Arch Linux"
|
||||
"quay.io/ansible-community/test-image:opensuse-leap-16.0" = "OpenSuSE Leap 16.0"
|
||||
"quay.io/ansible-community/test-image:opensuse-tumbleweed" = "OpenSuSE Tumbleweed"
|
||||
|
||||
##################################################################################################
|
||||
|
||||
# Ansible-core 2.19:
|
||||
|
||||
[[sessions.ansible_test_integration.groups]]
|
||||
session_name = "ansible-test-integration-2.19"
|
||||
description = "Meta session for running all ansible-test-integration-2.19-* sessions."
|
||||
|
||||
[[sessions.ansible_test_integration.groups.sessions]]
|
||||
ansible_core = "2.19"
|
||||
target = [ "azp/posix/1/", "azp/posix/2/", "azp/posix/3/" ]
|
||||
docker = [ "fedora41", "alpine321" ]
|
||||
|
||||
[[sessions.ansible_test_integration.groups.sessions]]
|
||||
ansible_core = "2.19"
|
||||
target = [ "azp/generic/1/" ]
|
||||
python_version = [ "3.9", "3.13" ]
|
||||
docker = "default"
|
||||
|
||||
[[sessions.ansible_test_integration.groups.sessions]]
|
||||
ansible_core = "2.19"
|
||||
target = [ "azp/posix/1/", "azp/posix/2/", "azp/posix/3/" ]
|
||||
remote = [
|
||||
"rhel/10.1",
|
||||
]
|
||||
|
||||
# Ansible-core 2.20:
|
||||
|
||||
[[sessions.ansible_test_integration.groups]]
|
||||
session_name = "ansible-test-integration-2.20"
|
||||
description = "Meta session for running all ansible-test-integration-2.20-* sessions."
|
||||
|
||||
[[sessions.ansible_test_integration.groups.sessions]]
|
||||
ansible_core = "2.20"
|
||||
target = [ "azp/posix/1/", "azp/posix/2/", "azp/posix/3/" ]
|
||||
docker = [ "fedora42", "alpine322" ]
|
||||
|
||||
[[sessions.ansible_test_integration.groups.sessions]]
|
||||
ansible_core = "2.20"
|
||||
target = [ "azp/generic/1/" ]
|
||||
python_version = [ "3.10", "3.14" ]
|
||||
docker = "default"
|
||||
|
||||
[[sessions.ansible_test_integration.groups.sessions]]
|
||||
ansible_core = "2.20"
|
||||
target = [ "azp/posix/1/", "azp/posix/2/", "azp/posix/3/" ]
|
||||
remote = [
|
||||
"macos/15.3",
|
||||
"rhel/10.2",
|
||||
# "freebsd/14.5",
|
||||
]
|
||||
|
||||
# Ansible-core 2.21:
|
||||
|
||||
[[sessions.ansible_test_integration.groups]]
|
||||
session_name = "ansible-test-integration-2.21"
|
||||
description = "Meta session for running all ansible-test-integration-2.21-* sessions."
|
||||
|
||||
[[sessions.ansible_test_integration.groups.sessions]]
|
||||
ansible_core = "2.21"
|
||||
target = [ "azp/posix/1/", "azp/posix/2/", "azp/posix/3/" ]
|
||||
docker = [
|
||||
"fedora43",
|
||||
"alpine323",
|
||||
"ubuntu2204",
|
||||
"ubuntu2404",
|
||||
]
|
||||
|
||||
[[sessions.ansible_test_integration.groups.sessions]]
|
||||
ansible_core = "2.21"
|
||||
target = [ "azp/generic/1/" ]
|
||||
python_version = [ "3.9", "3.12", "3.14" ]
|
||||
docker = "default"
|
||||
|
||||
[[sessions.ansible_test_integration.groups.sessions]]
|
||||
ansible_core = "2.21"
|
||||
target = [ "azp/posix/1/", "azp/posix/2/", "azp/posix/3/" ]
|
||||
remote = [
|
||||
# "macos/26.3",
|
||||
# "rhel/10.2",
|
||||
"rhel/9.8",
|
||||
# "freebsd/15.1",
|
||||
]
|
||||
|
||||
# Ansible-core 2.22:
|
||||
|
||||
[[sessions.ansible_test_integration.groups]]
|
||||
session_name = "ansible-test-integration-2.22"
|
||||
description = "Meta session for running all ansible-test-integration-2.22-* sessions."
|
||||
|
||||
[[sessions.ansible_test_integration.groups.sessions]]
|
||||
ansible_core = "2.22"
|
||||
target = [ "azp/posix/1/", "azp/posix/2/", "azp/posix/3/" ]
|
||||
docker = [
|
||||
"fedora44",
|
||||
"ubuntu2604",
|
||||
# "ubuntu2404",
|
||||
# "alpine324",
|
||||
]
|
||||
|
||||
[[sessions.ansible_test_integration.groups.sessions]]
|
||||
ansible_core = "2.22"
|
||||
target = [ "azp/generic/1/" ]
|
||||
python_version = [ "3.9", "3.13", "3.15" ]
|
||||
docker = "default"
|
||||
|
||||
[[sessions.ansible_test_integration.groups.sessions]]
|
||||
ansible_core = "2.22"
|
||||
target = [ "azp/posix/1/", "azp/posix/2/", "azp/posix/3/" ]
|
||||
remote = [
|
||||
"macos/26.3",
|
||||
"rhel/10.2",
|
||||
# "rhel/9.8",
|
||||
# "freebsd/15.1",
|
||||
# "freebsd/14.5",
|
||||
]
|
||||
|
||||
# Ansible-core devel:
|
||||
|
||||
[[sessions.ansible_test_integration.groups]]
|
||||
session_name = "ansible-test-integration-devel"
|
||||
description = "Meta session for running all ansible-test-integration-devel-* sessions."
|
||||
|
||||
[[sessions.ansible_test_integration.groups.sessions]]
|
||||
ansible_core = "devel"
|
||||
target = [ "azp/posix/1/", "azp/posix/2/", "azp/posix/3/" ]
|
||||
docker = [
|
||||
"fedora44",
|
||||
"ubuntu2604",
|
||||
"ubuntu2404",
|
||||
"alpine324",
|
||||
]
|
||||
|
||||
[[sessions.ansible_test_integration.groups.sessions]]
|
||||
ansible_core = "devel"
|
||||
target = [ "azp/posix/1/", "azp/posix/2/", "azp/posix/3/" ]
|
||||
python_version = "3.11"
|
||||
docker = "quay.io/ansible-community/test-image:debian-bookworm"
|
||||
|
||||
[[sessions.ansible_test_integration.groups.sessions]]
|
||||
ansible_core = "devel"
|
||||
target = [ "azp/posix/1/", "azp/posix/2/", "azp/posix/3/" ]
|
||||
python_version = "3.13"
|
||||
docker = "quay.io/ansible-community/test-image:debian-13-trixie"
|
||||
|
||||
[[sessions.ansible_test_integration.groups.sessions]]
|
||||
ansible_core = "devel"
|
||||
target = [ "azp/posix/1/", "azp/posix/2/", "azp/posix/3/" ]
|
||||
python_version = "3.13"
|
||||
docker = "quay.io/ansible-community/test-image:opensuse-leap-16.0"
|
||||
|
||||
[[sessions.ansible_test_integration.groups.sessions]]
|
||||
ansible_core = "devel"
|
||||
target = [ "azp/posix/1/", "azp/posix/2/", "azp/posix/3/" ]
|
||||
python_version = "3.13"
|
||||
docker = "quay.io/ansible-community/test-image:opensuse-tumbleweed"
|
||||
|
||||
[[sessions.ansible_test_integration.groups.sessions]]
|
||||
ansible_core = "devel"
|
||||
target = [ "azp/posix/1/", "azp/posix/2/", "azp/posix/3/" ]
|
||||
python_version = "3.14"
|
||||
docker = "quay.io/ansible-community/test-image:archlinux"
|
||||
|
||||
[[sessions.ansible_test_integration.groups.sessions]]
|
||||
ansible_core = "devel"
|
||||
target = [ "azp/generic/1/" ]
|
||||
python_version = [ "3.10", "3.13", "3.15" ]
|
||||
docker = "default"
|
||||
|
||||
[[sessions.ansible_test_integration.groups.sessions]]
|
||||
ansible_core = "devel"
|
||||
target = [ "azp/posix/vm/" ]
|
||||
remote = [
|
||||
"alpine/3.24",
|
||||
# "fedora/44",
|
||||
"ubuntu/26.04",
|
||||
"ubuntu/24.04",
|
||||
]
|
||||
|
||||
[[sessions.ansible_test_integration.groups.sessions]]
|
||||
ansible_core = "devel"
|
||||
target = [ "azp/posix/1/", "azp/posix/2/", "azp/posix/3/" ]
|
||||
remote = [
|
||||
"macos/26.3",
|
||||
"rhel/10.2",
|
||||
"rhel/9.8",
|
||||
"freebsd/15.1",
|
||||
"freebsd/14.5",
|
||||
]
|
||||
|
||||
##################################################################################################
|
||||
@@ -0,0 +1,5 @@
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
/.plugin-cache.yaml
|
||||
+1622
File diff suppressed because it is too large
Load Diff
+3
@@ -0,0 +1,3 @@
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
SPDX-FileCopyrightText: Ansible Project
|
||||
@@ -0,0 +1,43 @@
|
||||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
changelog_filename_template: ../CHANGELOG.rst
|
||||
changelog_filename_version_depth: 0
|
||||
changes_file: changelog.yaml
|
||||
changes_format: combined
|
||||
ignore_other_fragment_extensions: true
|
||||
keep_fragments: false
|
||||
mention_ancestor: true
|
||||
new_plugins_after_name: removed_features
|
||||
notesdir: fragments
|
||||
output_formats:
|
||||
- md
|
||||
- rst
|
||||
prelude_section_name: release_summary
|
||||
prelude_section_title: Release Summary
|
||||
sections:
|
||||
- - major_changes
|
||||
- Major Changes
|
||||
- - minor_changes
|
||||
- Minor Changes
|
||||
- - breaking_changes
|
||||
- Breaking Changes / Porting Guide
|
||||
- - deprecated_features
|
||||
- Deprecated Features
|
||||
- - removed_features
|
||||
- Removed Features (previously deprecated)
|
||||
- - security_fixes
|
||||
- Security Fixes
|
||||
- - bugfixes
|
||||
- Bugfixes
|
||||
- - known_issues
|
||||
- Known Issues
|
||||
title: Community General
|
||||
trivial_section_name: trivial
|
||||
use_fqcn: true
|
||||
add_plugin_period: true
|
||||
changelog_nice_yaml: true
|
||||
changelog_sort: version
|
||||
vcs: auto
|
||||
@@ -0,0 +1,80 @@
|
||||
<!--
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
|
||||
Committers Guidelines for community.general
|
||||
===========================================
|
||||
|
||||
This document is based on the [Ansible committer guidelines](https://github.com/ansible/ansible/blob/b57444af14062ec96e0af75fdfc2098c74fe2d9a/docs/docsite/rst/community/committer_guidelines.rst) ([latest version](https://docs.ansible.com/projects/ansible/devel/community/committer_guidelines.html)).
|
||||
|
||||
These are the guidelines for people with commit privileges on the Ansible Community General Collection GitHub repository. Please read the guidelines before you commit.
|
||||
|
||||
These guidelines apply to everyone. At the same time, this is NOT a process document. So just use good judgment. You have been given commit access because we trust your judgment.
|
||||
|
||||
That said, use the trust wisely.
|
||||
|
||||
If you abuse the trust and break components and builds, and so on, the trust level falls and you may be asked not to commit or you may lose your commit privileges.
|
||||
|
||||
Our workflow on GitHub
|
||||
----------------------
|
||||
|
||||
As a committer, you may already know this, but our workflow forms a lot of our team policies. Please ensure you are aware of the following workflow steps:
|
||||
|
||||
* Fork the repository upon which you want to do some work to your own personal repository
|
||||
* Work on the specific branch upon which you need to commit
|
||||
* Create a Pull Request back to the collection repository and await reviews
|
||||
* Adjust code as necessary based on the Comments provided
|
||||
* Ask someone from the other committers to do a final review and merge
|
||||
|
||||
Sometimes, committers merge their own pull requests. This section is a set of guidelines. If you are changing a comma in a doc or making a very minor change, you can use your best judgement. This is another trust thing. The process is critical for any major change, but for little things or getting something done quickly, use your best judgement and make sure people on the team are aware of your work.
|
||||
|
||||
Roles
|
||||
-----
|
||||
* Release managers: Merge pull requests to `stable-X` branches, create tags to do releases.
|
||||
* Committers: Fine to do PRs for most things, but we should have a timebox. Hanging PRs may merge on the judgement of these devs.
|
||||
* Module maintainers: Module maintainers own specific modules and have indirect commit access through the current module PR mechanisms. This is primarily [ansibullbot](https://github.com/ansibullbot)'s `shipit` mechanism.
|
||||
|
||||
General rules
|
||||
-------------
|
||||
Individuals with direct commit access to this collection repository are entrusted with powers that allow them to do a broad variety of things--probably more than we can write down. Rather than rules, treat these as general *guidelines*, individuals with this power are expected to use their best judgement.
|
||||
|
||||
* Do NOTs:
|
||||
|
||||
- Do not commit directly.
|
||||
- Do not merge your own PRs. Someone else should have a chance to review and approve the PR merge. You have a small amount of leeway here for very minor changes.
|
||||
- Do not forget about non-standard / alternate environments. Consider the alternatives. Yes, people have bad/unusual/strange environments (like binaries from multiple init systems installed), but they are the ones who need us the most.
|
||||
- Do not drag your community team members down. Discuss the technical merits of any pull requests you review. Avoid negativity and personal comments. For more guidance on being a good community member, read the [Ansible Community Code of Conduct](https://docs.ansible.com/projects/ansible/latest/community/code_of_conduct.html).
|
||||
- Do not forget about the maintenance burden. High-maintenance features may not be worth adding.
|
||||
- Do not break playbooks. Always keep backwards compatibility in mind.
|
||||
- Do not forget to keep it simple. Complexity breeds all kinds of problems.
|
||||
- Do not merge to branches other than `main`, especially not to `stable-X`, if you do not have explicit permission to do so.
|
||||
- Do not create tags. Tags are used in the release process, and should only be created by the people responsible for managing the stable branches.
|
||||
|
||||
* Do:
|
||||
|
||||
- Squash, avoid merges whenever possible, use GitHub's squash commits or cherry pick if needed (bisect thanks you).
|
||||
- Be active. Committers who have no activity on the project (through merges, triage, commits, and so on) will have their permissions suspended.
|
||||
- Consider backwards compatibility (goes back to "do not break existing playbooks").
|
||||
- Write tests. PRs with tests are looked at with more priority than PRs without tests that should have them included. While not all changes require tests, be sure to add them for bug fixes or functionality changes.
|
||||
- Discuss with other committers, especially when you are unsure of something.
|
||||
- Document! If your PR is a new feature or a change to behavior, make sure you've updated all associated documentation or have notified the right people to do so.
|
||||
- Consider scope, sometimes a fix can be generalized.
|
||||
- Keep it simple, then things are maintainable, debuggable and intelligible.
|
||||
|
||||
Committers are expected to continue to follow the same community and contribution guidelines followed by the rest of the Ansible community.
|
||||
|
||||
|
||||
People
|
||||
------
|
||||
|
||||
Individuals who have been asked to become a part of this group have generally been contributing in significant ways to the community.general collection for some time. Should they agree, they are requested to add their names and GitHub IDs to this file, in the section below, through a pull request. Doing so indicates that these individuals agree to act in the ways that their fellow committers trust that they will act.
|
||||
|
||||
| Name | GitHub ID | IRC Nick | Other |
|
||||
| ------------------- | -------------------- | ------------------ | -------------------- |
|
||||
| Alexei Znamensky | russoz | russoz | |
|
||||
| Andrew Klychkov | andersson007 | andersson007_ | |
|
||||
| Andrew Pantuso | Ajpantuso | ajpantuso | |
|
||||
| Felix Fontein | felixfontein | felixfontein | |
|
||||
| John R Barker | gundalow | gundalow | |
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
changelog:
|
||||
write_changelog: true
|
||||
|
||||
ansible_output:
|
||||
global_env:
|
||||
ANSIBLE_STDOUT_CALLBACK: community.general.tasks_only
|
||||
ANSIBLE_COLLECTIONS_TASKS_ONLY_NUMBER_OF_COLUMNS: 90
|
||||
global_postprocessors:
|
||||
reformat-yaml:
|
||||
command:
|
||||
- python
|
||||
- docs/docsite/reformat-yaml.py
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
sections:
|
||||
- title: Guides
|
||||
toctree:
|
||||
- filter_guide
|
||||
- test_guide
|
||||
- title: Deployment Guides
|
||||
toctree:
|
||||
- guide_ee
|
||||
- title: Technology Guides
|
||||
toctree:
|
||||
- guide_alicloud
|
||||
- guide_iocage
|
||||
- guide_online
|
||||
- guide_packet
|
||||
- guide_scaleway
|
||||
- title: Developer Guides
|
||||
toctree:
|
||||
- guide_deps
|
||||
- guide_vardict
|
||||
- guide_cmdrunner
|
||||
- guide_modulehelper
|
||||
- guide_uthelper
|
||||
@@ -0,0 +1,33 @@
|
||||
---
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
edit_on_github:
|
||||
repository: ansible-collections/community.general
|
||||
branch: main
|
||||
path_prefix: ''
|
||||
|
||||
extra_links:
|
||||
- description: Ask for help
|
||||
url: https://forum.ansible.com/c/help/6/none
|
||||
- description: Submit a bug report
|
||||
url: https://github.com/ansible-collections/community.general/issues/new?assignees=&labels=&template=bug_report.yml
|
||||
- description: Request a feature
|
||||
url: https://github.com/ansible-collections/community.general/issues/new?assignees=&labels=&template=feature_request.yml
|
||||
|
||||
communication:
|
||||
matrix_rooms:
|
||||
- topic: General usage and support questions
|
||||
room: '#users:ansible.im'
|
||||
irc_channels:
|
||||
- topic: General usage and support questions
|
||||
network: Libera
|
||||
channel: '#ansible'
|
||||
forums:
|
||||
- topic: "Ansible Forum: General usage and support questions"
|
||||
# The following URL directly points to the "Get Help" section
|
||||
url: https://forum.ansible.com/c/help/6/none
|
||||
- topic: "Ansible Forum: Discussions about the collection itself, not for specific modules or plugins"
|
||||
# The following URL directly points to the "community-general" tag
|
||||
url: https://forum.ansible.com/tag/community-general
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env python
|
||||
# Copyright (c) Ansible Project
|
||||
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import sys
|
||||
from io import StringIO
|
||||
|
||||
from ruamel.yaml import YAML # type: ignore[import-not-found]
|
||||
|
||||
|
||||
def main() -> None:
|
||||
yaml = YAML(typ="rt")
|
||||
yaml.indent(mapping=2, sequence=4, offset=2)
|
||||
|
||||
# Load
|
||||
data = yaml.load(sys.stdin)
|
||||
|
||||
# Dump
|
||||
sio = StringIO()
|
||||
yaml.dump(data, sio)
|
||||
print(sio.getvalue().rstrip("\n"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
+218
@@ -0,0 +1,218 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
keep_keys
|
||||
"""""""""
|
||||
|
||||
Use the filter :ansplugin:`community.general.keep_keys#filter` if you have a list of dictionaries and want to keep certain keys only.
|
||||
|
||||
.. note:: The output of the examples in this section use the YAML callback plugin. Quoting: "Ansible output that can be quite a bit easier to read than the default JSON formatting." See :ansplugin:`the documentation for the community.general.yaml callback plugin <community.general.yaml#callback>`.
|
||||
|
||||
|
||||
Let us use the below list in the following examples:
|
||||
|
||||
.. ansible-output-meta::
|
||||
|
||||
actions:
|
||||
- name: reset-previous-blocks
|
||||
- name: set-template
|
||||
template:
|
||||
env:
|
||||
ANSIBLE_CALLBACK_RESULT_FORMAT: yaml
|
||||
variables:
|
||||
data:
|
||||
previous_code_block: yaml
|
||||
previous_code_block_index: 0
|
||||
computation:
|
||||
previous_code_block: yaml+jinja
|
||||
postprocessors:
|
||||
- name: reformat-yaml
|
||||
language: yaml
|
||||
skip_first_lines: 2
|
||||
playbook: |-
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- vars:
|
||||
@{{ data | indent(8) }}@
|
||||
@{{ computation | indent(8) }}@
|
||||
ansible.builtin.debug:
|
||||
var: result
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
input:
|
||||
- k0_x0: A0
|
||||
k1_x1: B0
|
||||
k2_x2: [C0]
|
||||
k3_x3: foo
|
||||
- k0_x0: A1
|
||||
k1_x1: B1
|
||||
k2_x2: [C1]
|
||||
k3_x3: bar
|
||||
|
||||
|
||||
* By default, match keys that equal any of the items in the target.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1
|
||||
|
||||
target: ['k0_x0', 'k1_x1']
|
||||
result: "{{ input | community.general.keep_keys(target=target) }}"
|
||||
|
||||
|
||||
gives
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
playbook: ~
|
||||
|
||||
.. code-block:: yaml
|
||||
:emphasize-lines: 1-
|
||||
|
||||
result:
|
||||
- k0_x0: A0
|
||||
k1_x1: B0
|
||||
- k0_x0: A1
|
||||
k1_x1: B1
|
||||
|
||||
|
||||
.. versionadded:: 9.1.0
|
||||
|
||||
* The results of the below examples 1-5 are all the same:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
playbook: |-
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- vars:
|
||||
@{{ data | indent(8) }}@
|
||||
|
||||
# I picked one of the examples
|
||||
mp: equal
|
||||
target: ['k0_x0', 'k1_x1']
|
||||
result: "{{ input | community.general.keep_keys(target=target, matching_parameter=mp) }}"
|
||||
ansible.builtin.debug:
|
||||
var: result
|
||||
|
||||
.. code-block:: yaml
|
||||
:emphasize-lines: 1-
|
||||
|
||||
result:
|
||||
- k0_x0: A0
|
||||
k1_x1: B0
|
||||
- k0_x0: A1
|
||||
k1_x1: B1
|
||||
|
||||
|
||||
1. Match keys that equal any of the items in the target.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1,2
|
||||
|
||||
mp: equal
|
||||
target: ['k0_x0', 'k1_x1']
|
||||
result: "{{ input | community.general.keep_keys(target=target, matching_parameter=mp) }}"
|
||||
|
||||
2. Match keys that start with any of the items in the target.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1,2
|
||||
|
||||
mp: starts_with
|
||||
target: ['k0', 'k1']
|
||||
result: "{{ input | community.general.keep_keys(target=target, matching_parameter=mp) }}"
|
||||
|
||||
3. Match keys that end with any of the items in target.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1,2
|
||||
|
||||
mp: ends_with
|
||||
target: ['x0', 'x1']
|
||||
result: "{{ input | community.general.keep_keys(target=target, matching_parameter=mp) }}"
|
||||
|
||||
4. Match keys by the regex.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1,2
|
||||
|
||||
mp: regex
|
||||
target: ['^.*[01]_x.*$']
|
||||
result: "{{ input | community.general.keep_keys(target=target, matching_parameter=mp) }}"
|
||||
|
||||
5. Match keys by the regex.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1,2
|
||||
|
||||
mp: regex
|
||||
target: ^.*[01]_x.*$
|
||||
result: "{{ input | community.general.keep_keys(target=target, matching_parameter=mp) }}"
|
||||
|
||||
|
||||
* The results of the below examples 6-9 are all the same:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
playbook: |-
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- vars:
|
||||
@{{ data | indent(8) }}@
|
||||
|
||||
# I picked one of the examples
|
||||
mp: equal
|
||||
target: k0_x0
|
||||
result: "{{ input | community.general.keep_keys(target=target, matching_parameter=mp) }}"
|
||||
ansible.builtin.debug:
|
||||
var: result
|
||||
|
||||
.. code-block:: yaml
|
||||
:emphasize-lines: 1-
|
||||
|
||||
result:
|
||||
- k0_x0: A0
|
||||
- k0_x0: A1
|
||||
|
||||
|
||||
6. Match keys that equal the target.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1,2
|
||||
|
||||
mp: equal
|
||||
target: k0_x0
|
||||
result: "{{ input | community.general.keep_keys(target=target, matching_parameter=mp) }}"
|
||||
|
||||
7. Match keys that start with the target.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1,2
|
||||
|
||||
mp: starts_with
|
||||
target: k0
|
||||
result: "{{ input | community.general.keep_keys(target=target, matching_parameter=mp) }}"
|
||||
|
||||
8. Match keys that end with the target.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1,2
|
||||
|
||||
mp: ends_with
|
||||
target: x0
|
||||
result: "{{ input | community.general.keep_keys(target=target, matching_parameter=mp) }}"
|
||||
|
||||
9. Match keys by the regex.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1,2
|
||||
|
||||
mp: regex
|
||||
target: ^.*0_x.*$
|
||||
result: "{{ input | community.general.keep_keys(target=target, matching_parameter=mp) }}"
|
||||
+228
@@ -0,0 +1,228 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
remove_keys
|
||||
"""""""""""
|
||||
|
||||
Use the filter :ansplugin:`community.general.remove_keys#filter` if you have a list of dictionaries and want to remove certain keys.
|
||||
|
||||
.. note:: The output of the examples in this section use the YAML callback plugin. Quoting: "Ansible output that can be quite a bit easier to read than the default JSON formatting." See See :ansplugin:`the documentation for the community.general.yaml callback plugin <community.general.yaml#callback>`.
|
||||
|
||||
|
||||
Let us use the below list in the following examples:
|
||||
|
||||
.. ansible-output-meta::
|
||||
|
||||
actions:
|
||||
- name: reset-previous-blocks
|
||||
- name: set-template
|
||||
template:
|
||||
env:
|
||||
ANSIBLE_CALLBACK_RESULT_FORMAT: yaml
|
||||
variables:
|
||||
data:
|
||||
previous_code_block: yaml
|
||||
previous_code_block_index: 0
|
||||
computation:
|
||||
previous_code_block: yaml+jinja
|
||||
postprocessors:
|
||||
- name: reformat-yaml
|
||||
language: yaml
|
||||
skip_first_lines: 2
|
||||
playbook: |-
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- vars:
|
||||
@{{ data | indent(8) }}@
|
||||
@{{ computation | indent(8) }}@
|
||||
ansible.builtin.debug:
|
||||
var: result
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
input:
|
||||
- k0_x0: A0
|
||||
k1_x1: B0
|
||||
k2_x2: [C0]
|
||||
k3_x3: foo
|
||||
- k0_x0: A1
|
||||
k1_x1: B1
|
||||
k2_x2: [C1]
|
||||
k3_x3: bar
|
||||
|
||||
|
||||
* By default, match keys that equal any of the items in the target.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1
|
||||
|
||||
target: ['k0_x0', 'k1_x1']
|
||||
result: "{{ input | community.general.remove_keys(target=target) }}"
|
||||
|
||||
|
||||
gives
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
playbook: ~
|
||||
|
||||
.. code-block:: yaml
|
||||
:emphasize-lines: 1-
|
||||
|
||||
result:
|
||||
- k2_x2:
|
||||
- C0
|
||||
k3_x3: foo
|
||||
- k2_x2:
|
||||
- C1
|
||||
k3_x3: bar
|
||||
|
||||
|
||||
.. versionadded:: 9.1.0
|
||||
|
||||
* The results of the below examples 1-5 are all the same:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
playbook: |-
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- vars:
|
||||
@{{ data | indent(8) }}@
|
||||
|
||||
# I picked one of the examples
|
||||
mp: equal
|
||||
target: ['k0_x0', 'k1_x1']
|
||||
result: "{{ input | community.general.remove_keys(target=target, matching_parameter=mp) }}"
|
||||
ansible.builtin.debug:
|
||||
var: result
|
||||
|
||||
.. code-block:: yaml
|
||||
:emphasize-lines: 1-
|
||||
|
||||
result:
|
||||
- k2_x2:
|
||||
- C0
|
||||
k3_x3: foo
|
||||
- k2_x2:
|
||||
- C1
|
||||
k3_x3: bar
|
||||
|
||||
|
||||
1. Match keys that equal any of the items in the target.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1,2
|
||||
|
||||
mp: equal
|
||||
target: ['k0_x0', 'k1_x1']
|
||||
result: "{{ input | community.general.remove_keys(target=target, matching_parameter=mp) }}"
|
||||
|
||||
2. Match keys that start with any of the items in the target.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1,2
|
||||
|
||||
mp: starts_with
|
||||
target: ['k0', 'k1']
|
||||
result: "{{ input | community.general.remove_keys(target=target, matching_parameter=mp) }}"
|
||||
|
||||
3. Match keys that end with any of the items in target.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1,2
|
||||
|
||||
mp: ends_with
|
||||
target: ['x0', 'x1']
|
||||
result: "{{ input | community.general.remove_keys(target=target, matching_parameter=mp) }}"
|
||||
|
||||
4. Match keys by the regex.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1,2
|
||||
|
||||
mp: regex
|
||||
target: ['^.*[01]_x.*$']
|
||||
result: "{{ input | community.general.remove_keys(target=target, matching_parameter=mp) }}"
|
||||
|
||||
5. Match keys by the regex.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1,2
|
||||
|
||||
mp: regex
|
||||
target: ^.*[01]_x.*$
|
||||
result: "{{ input | community.general.remove_keys(target=target, matching_parameter=mp) }}"
|
||||
|
||||
|
||||
* The results of the below examples 6-9 are all the same:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
playbook: |-
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- vars:
|
||||
@{{ data | indent(8) }}@
|
||||
|
||||
# I picked one of the examples
|
||||
mp: equal
|
||||
target: k0_x0
|
||||
result: "{{ input | community.general.remove_keys(target=target, matching_parameter=mp) }}"
|
||||
ansible.builtin.debug:
|
||||
var: result
|
||||
|
||||
.. code-block:: yaml
|
||||
:emphasize-lines: 1-
|
||||
|
||||
result:
|
||||
- k1_x1: B0
|
||||
k2_x2:
|
||||
- C0
|
||||
k3_x3: foo
|
||||
- k1_x1: B1
|
||||
k2_x2:
|
||||
- C1
|
||||
k3_x3: bar
|
||||
|
||||
|
||||
6. Match keys that equal the target.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1,2
|
||||
|
||||
mp: equal
|
||||
target: k0_x0
|
||||
result: "{{ input | community.general.remove_keys(target=target, matching_parameter=mp) }}"
|
||||
|
||||
7. Match keys that start with the target.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1,2
|
||||
|
||||
mp: starts_with
|
||||
target: k0
|
||||
result: "{{ input | community.general.remove_keys(target=target, matching_parameter=mp) }}"
|
||||
|
||||
8. Match keys that end with the target.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1,2
|
||||
|
||||
mp: ends_with
|
||||
target: x0
|
||||
result: "{{ input | community.general.remove_keys(target=target, matching_parameter=mp) }}"
|
||||
|
||||
9. Match keys by the regex.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1,2
|
||||
|
||||
mp: regex
|
||||
target: ^.*0_x.*$
|
||||
result: "{{ input | community.general.remove_keys(target=target, matching_parameter=mp) }}"
|
||||
+257
@@ -0,0 +1,257 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
replace_keys
|
||||
""""""""""""
|
||||
|
||||
Use the filter :ansplugin:`community.general.replace_keys#filter` if you have a list of dictionaries and want to replace certain keys.
|
||||
|
||||
.. note:: The output of the examples in this section use the YAML callback plugin. Quoting: "Ansible output that can be quite a bit easier to read than the default JSON formatting." See :ansplugin:`the documentation for the community.general.yaml callback plugin <community.general.yaml#callback>`.
|
||||
|
||||
|
||||
Let us use the below list in the following examples:
|
||||
|
||||
.. ansible-output-meta::
|
||||
|
||||
actions:
|
||||
- name: reset-previous-blocks
|
||||
- name: set-template
|
||||
template:
|
||||
env:
|
||||
ANSIBLE_CALLBACK_RESULT_FORMAT: yaml
|
||||
variables:
|
||||
data:
|
||||
previous_code_block: yaml
|
||||
previous_code_block_index: 0
|
||||
computation:
|
||||
previous_code_block: yaml+jinja
|
||||
postprocessors:
|
||||
- name: reformat-yaml
|
||||
language: yaml
|
||||
skip_first_lines: 2
|
||||
playbook: |-
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- vars:
|
||||
@{{ data | indent(8) }}@
|
||||
@{{ computation | indent(8) }}@
|
||||
ansible.builtin.debug:
|
||||
var: result
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
input:
|
||||
- k0_x0: A0
|
||||
k1_x1: B0
|
||||
k2_x2: [C0]
|
||||
k3_x3: foo
|
||||
- k0_x0: A1
|
||||
k1_x1: B1
|
||||
k2_x2: [C1]
|
||||
k3_x3: bar
|
||||
|
||||
|
||||
* By default, match keys that equal any of the attributes before.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1-3
|
||||
|
||||
target:
|
||||
- {after: a0, before: k0_x0}
|
||||
- {after: a1, before: k1_x1}
|
||||
|
||||
result: "{{ input | community.general.replace_keys(target=target) }}"
|
||||
|
||||
|
||||
gives
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
playbook: ~
|
||||
|
||||
.. code-block:: yaml
|
||||
:emphasize-lines: 1-
|
||||
|
||||
result:
|
||||
- a0: A0
|
||||
a1: B0
|
||||
k2_x2:
|
||||
- C0
|
||||
k3_x3: foo
|
||||
- a0: A1
|
||||
a1: B1
|
||||
k2_x2:
|
||||
- C1
|
||||
k3_x3: bar
|
||||
|
||||
|
||||
.. versionadded:: 9.1.0
|
||||
|
||||
* The results of the below examples 1-3 are all the same:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
playbook: |-
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- vars:
|
||||
@{{ data | indent(8) }}@
|
||||
|
||||
# I picked one of the examples
|
||||
mp: starts_with
|
||||
target:
|
||||
- {after: a0, before: k0}
|
||||
- {after: a1, before: k1}
|
||||
result: "{{ input | community.general.replace_keys(target=target, matching_parameter=mp) }}"
|
||||
ansible.builtin.debug:
|
||||
var: result
|
||||
|
||||
.. code-block:: yaml
|
||||
:emphasize-lines: 1-
|
||||
|
||||
result:
|
||||
- a0: A0
|
||||
a1: B0
|
||||
k2_x2:
|
||||
- C0
|
||||
k3_x3: foo
|
||||
- a0: A1
|
||||
a1: B1
|
||||
k2_x2:
|
||||
- C1
|
||||
k3_x3: bar
|
||||
|
||||
|
||||
1. Replace keys that starts with any of the attributes before.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1-4
|
||||
|
||||
mp: starts_with
|
||||
target:
|
||||
- {after: a0, before: k0}
|
||||
- {after: a1, before: k1}
|
||||
|
||||
result: "{{ input | community.general.replace_keys(target=target, matching_parameter=mp) }}"
|
||||
|
||||
2. Replace keys that ends with any of the attributes before.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1-4
|
||||
|
||||
mp: ends_with
|
||||
target:
|
||||
- {after: a0, before: x0}
|
||||
- {after: a1, before: x1}
|
||||
|
||||
result: "{{ input | community.general.replace_keys(target=target, matching_parameter=mp) }}"
|
||||
|
||||
3. Replace keys that match any regex of the attributes before.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1-4
|
||||
|
||||
mp: regex
|
||||
target:
|
||||
- {after: a0, before: ^.*0_x.*$}
|
||||
- {after: a1, before: ^.*1_x.*$}
|
||||
|
||||
result: "{{ input | community.general.replace_keys(target=target, matching_parameter=mp) }}"
|
||||
|
||||
|
||||
* The results of the below examples 4-5 are the same:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
playbook: |-
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- vars:
|
||||
@{{ data | indent(8) }}@
|
||||
|
||||
# I picked one of the examples
|
||||
mp: regex
|
||||
target:
|
||||
- {after: X, before: ^.*_x.*$}
|
||||
result: "{{ input | community.general.replace_keys(target=target, matching_parameter=mp) }}"
|
||||
ansible.builtin.debug:
|
||||
var: result
|
||||
|
||||
.. code-block:: yaml
|
||||
:emphasize-lines: 1-
|
||||
|
||||
result:
|
||||
- X: foo
|
||||
- X: bar
|
||||
|
||||
|
||||
4. If more keys match the same attribute before the last one will be used.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1-3
|
||||
|
||||
mp: regex
|
||||
target:
|
||||
- {after: X, before: ^.*_x.*$}
|
||||
|
||||
result: "{{ input | community.general.replace_keys(target=target, matching_parameter=mp) }}"
|
||||
|
||||
5. If there are items with equal attribute before the first one will be used.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1-3
|
||||
|
||||
mp: regex
|
||||
target:
|
||||
- {after: X, before: ^.*_x.*$}
|
||||
- {after: Y, before: ^.*_x.*$}
|
||||
|
||||
result: "{{ input | community.general.replace_keys(target=target, matching_parameter=mp) }}"
|
||||
|
||||
|
||||
6. If there are more matches for a key the first one will be used.
|
||||
|
||||
.. ansible-output-meta::
|
||||
|
||||
actions:
|
||||
- name: reset-previous-blocks
|
||||
|
||||
.. code-block:: yaml
|
||||
:emphasize-lines: 1-
|
||||
|
||||
input:
|
||||
- {aaa1: A, bbb1: B, ccc1: C}
|
||||
- {aaa2: D, bbb2: E, ccc2: F}
|
||||
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
:emphasize-lines: 1-4
|
||||
|
||||
mp: starts_with
|
||||
target:
|
||||
- {after: X, before: a}
|
||||
- {after: Y, before: aa}
|
||||
|
||||
result: "{{ input | community.general.replace_keys(target=target, matching_parameter=mp) }}"
|
||||
|
||||
gives
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
playbook: ~
|
||||
|
||||
.. code-block:: yaml
|
||||
:emphasize-lines: 1-
|
||||
|
||||
result:
|
||||
- X: A
|
||||
bbb1: B
|
||||
ccc1: C
|
||||
- X: D
|
||||
bbb2: E
|
||||
ccc2: F
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
.. _ansible_collections.community.general.docsite.filter_guide.filter_guide_abstract_informations.lists_of_dicts:
|
||||
|
||||
Lists of dictionaries
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Filters to manage keys in a list of dictionaries:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
filter_guide-abstract_informations-lists_of_dictionaries-keep_keys
|
||||
filter_guide-abstract_informations-lists_of_dictionaries-remove_keys
|
||||
filter_guide-abstract_informations-lists_of_dictionaries-replace_keys
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
.. _ansible_collections.community.general.docsite.filter_guide:
|
||||
|
||||
community.general Filter Guide
|
||||
==============================
|
||||
|
||||
The :anscollection:`community.general collection <community.general#collection>` offers several useful filter plugins.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
filter_guide_paths
|
||||
filter_guide_abstract_informations
|
||||
filter_guide_working_with_times
|
||||
filter_guide_working_with_versions
|
||||
filter_guide_creating_identifiers
|
||||
filter_guide_conversions
|
||||
filter_guide_selecting_json_data
|
||||
filter_guide_working_with_unicode
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
Abstract transformations
|
||||
------------------------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
filter_guide_abstract_informations_dictionaries
|
||||
filter_guide_abstract_informations_grouping
|
||||
filter_guide-abstract_informations-lists_of_dictionaries
|
||||
filter_guide_abstract_informations_merging_lists_of_dictionaries
|
||||
filter_guide_abstract_informations_lists_helper
|
||||
filter_guide_abstract_informations_counting_elements_in_sequence
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
Counting elements in a sequence
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The :ansplugin:`community.general.counter filter plugin <community.general.counter#filter>` allows you to count (hashable) elements in a sequence. Elements are returned as dictionary keys and their counts are stored as dictionary values.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: Count character occurrences in a string
|
||||
debug:
|
||||
msg: "{{ 'abccbaabca' | community.general.counter }}"
|
||||
|
||||
- name: Count items in a list
|
||||
debug:
|
||||
msg: "{{ ['car', 'car', 'bike', 'plane', 'bike'] | community.general.counter }}"
|
||||
|
||||
This produces:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
variables:
|
||||
task:
|
||||
previous_code_block: yaml+jinja
|
||||
playbook: |-
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
@{{ task | indent(4) }}@
|
||||
|
||||
.. code-block:: ansible-output
|
||||
|
||||
TASK [Count character occurrences in a string] ********************************************
|
||||
ok: [localhost] => {
|
||||
"msg": {
|
||||
"a": 4,
|
||||
"b": 3,
|
||||
"c": 3
|
||||
}
|
||||
}
|
||||
|
||||
TASK [Count items in a list] **************************************************************
|
||||
ok: [localhost] => {
|
||||
"msg": {
|
||||
"bike": 2,
|
||||
"car": 2,
|
||||
"plane": 1
|
||||
}
|
||||
}
|
||||
|
||||
This plugin is useful for selecting resources based on current allocation:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: Get ID of SCSI controller(s) with less than 4 disks attached and choose the one with the least disks
|
||||
debug:
|
||||
msg: >-
|
||||
{{
|
||||
( disks | dict2items | map(attribute='value.adapter') | list
|
||||
| community.general.counter | dict2items
|
||||
| rejectattr('value', '>=', 4) | sort(attribute='value') | first
|
||||
).key
|
||||
}}
|
||||
vars:
|
||||
disks:
|
||||
sda:
|
||||
adapter: scsi_1
|
||||
sdb:
|
||||
adapter: scsi_1
|
||||
sdc:
|
||||
adapter: scsi_1
|
||||
sdd:
|
||||
adapter: scsi_1
|
||||
sde:
|
||||
adapter: scsi_2
|
||||
sdf:
|
||||
adapter: scsi_3
|
||||
sdg:
|
||||
adapter: scsi_3
|
||||
|
||||
This produces:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
variables:
|
||||
task:
|
||||
previous_code_block: yaml+jinja
|
||||
playbook: |-
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
@{{ task | indent(4) }}@
|
||||
|
||||
.. code-block:: ansible-output
|
||||
|
||||
TASK [Get ID of SCSI controller(s) with less than 4 disks attached and choose the one with the least disks] ***
|
||||
ok: [localhost] => {
|
||||
"msg": "scsi_2"
|
||||
}
|
||||
|
||||
.. versionadded:: 4.3.0
|
||||
+146
@@ -0,0 +1,146 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
Dictionaries
|
||||
^^^^^^^^^^^^
|
||||
|
||||
You can use the :ansplugin:`community.general.dict_kv filter <community.general.dict_kv#filter>` to create a single-entry dictionary with ``value | community.general.dict_kv(key)``:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: Create a single-entry dictionary
|
||||
debug:
|
||||
msg: "{{ myvar | community.general.dict_kv('thatsmyvar') }}"
|
||||
vars:
|
||||
myvar: myvalue
|
||||
|
||||
- name: Create a list of dictionaries where the 'server' field is taken from a list
|
||||
debug:
|
||||
msg: >-
|
||||
{{ myservers | map('community.general.dict_kv', 'server')
|
||||
| map('combine', common_config) }}
|
||||
vars:
|
||||
common_config:
|
||||
type: host
|
||||
database: all
|
||||
myservers:
|
||||
- server1
|
||||
- server2
|
||||
|
||||
This produces:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
variables:
|
||||
task:
|
||||
previous_code_block: yaml+jinja
|
||||
playbook: |-
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
@{{ task | indent(4) }}@
|
||||
|
||||
.. code-block:: ansible-output
|
||||
|
||||
TASK [Create a single-entry dictionary] ***************************************************
|
||||
ok: [localhost] => {
|
||||
"msg": {
|
||||
"thatsmyvar": "myvalue"
|
||||
}
|
||||
}
|
||||
|
||||
TASK [Create a list of dictionaries where the 'server' field is taken from a list] ********
|
||||
ok: [localhost] => {
|
||||
"msg": [
|
||||
{
|
||||
"database": "all",
|
||||
"server": "server1",
|
||||
"type": "host"
|
||||
},
|
||||
{
|
||||
"database": "all",
|
||||
"server": "server2",
|
||||
"type": "host"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
.. versionadded:: 2.0.0
|
||||
|
||||
If you need to convert a list of key-value pairs to a dictionary, you can use the ``dict`` function. Unfortunately, this function cannot be used with ``map``. For this, the :ansplugin:`community.general.dict filter <community.general.dict#filter>` can be used:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: Create a dictionary with the dict function
|
||||
debug:
|
||||
msg: "{{ dict([[1, 2], ['a', 'b']]) }}"
|
||||
|
||||
- name: Create a dictionary with the community.general.dict filter
|
||||
debug:
|
||||
msg: "{{ [[1, 2], ['a', 'b']] | community.general.dict }}"
|
||||
|
||||
- name: Create a list of dictionaries with map and the community.general.dict filter
|
||||
debug:
|
||||
msg: >-
|
||||
{{ values | map('zip', ['k1', 'k2', 'k3'])
|
||||
| map('map', 'reverse')
|
||||
| map('community.general.dict') }}
|
||||
vars:
|
||||
values:
|
||||
- - foo
|
||||
- 23
|
||||
- a
|
||||
- - bar
|
||||
- 42
|
||||
- b
|
||||
|
||||
This produces:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
variables:
|
||||
task:
|
||||
previous_code_block: yaml+jinja
|
||||
playbook: |-
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
@{{ task | indent(4) }}@
|
||||
|
||||
.. code-block:: ansible-output
|
||||
|
||||
TASK [Create a dictionary with the dict function] *****************************************
|
||||
ok: [localhost] => {
|
||||
"msg": {
|
||||
"1": 2,
|
||||
"a": "b"
|
||||
}
|
||||
}
|
||||
|
||||
TASK [Create a dictionary with the community.general.dict filter] *************************
|
||||
ok: [localhost] => {
|
||||
"msg": {
|
||||
"1": 2,
|
||||
"a": "b"
|
||||
}
|
||||
}
|
||||
|
||||
TASK [Create a list of dictionaries with map and the community.general.dict filter] *******
|
||||
ok: [localhost] => {
|
||||
"msg": [
|
||||
{
|
||||
"k1": "foo",
|
||||
"k2": 23,
|
||||
"k3": "a"
|
||||
},
|
||||
{
|
||||
"k1": "bar",
|
||||
"k2": 42,
|
||||
"k3": "b"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
.. versionadded:: 3.0.0
|
||||
+146
@@ -0,0 +1,146 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
Grouping
|
||||
^^^^^^^^
|
||||
|
||||
If you have a list of dictionaries, the Jinja2 ``groupby`` filter allows to group the list by an attribute. This results in a list of ``(grouper, list)`` namedtuples, where ``list`` contains all dictionaries where the selected attribute equals ``grouper``. If you know that for every ``grouper``, there will be a most one entry in that list, you can use the :ansplugin:`community.general.groupby_as_dict filter <community.general.groupby_as_dict#filter>` to convert the original list into a dictionary which maps ``grouper`` to the corresponding dictionary.
|
||||
|
||||
One example is ``ansible_facts.mounts``, which is a list of dictionaries where each has one ``device`` element to indicate the device which is mounted. Therefore, ``ansible_facts.mounts | community.general.groupby_as_dict('device')`` is a dictionary mapping a device to the mount information:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: Output mount facts grouped by device name
|
||||
debug:
|
||||
var: ansible_facts.mounts | community.general.groupby_as_dict('device')
|
||||
|
||||
- name: Output mount facts grouped by mount point
|
||||
debug:
|
||||
var: ansible_facts.mounts | community.general.groupby_as_dict('mount')
|
||||
|
||||
This produces:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
variables:
|
||||
task:
|
||||
previous_code_block: yaml+jinja
|
||||
skip_first_lines: 3 # the set_fact task
|
||||
playbook: |-
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- ansible.builtin.set_fact:
|
||||
ansible_facts:
|
||||
mounts:
|
||||
- block_available: 2000
|
||||
block_size: 4096
|
||||
block_total: 2345
|
||||
block_used: 345
|
||||
device: "/dev/sda1"
|
||||
fstype: "ext4"
|
||||
inode_available: 500
|
||||
inode_total: 512
|
||||
inode_used: 12
|
||||
mount: "/boot"
|
||||
options: "rw,relatime,data=ordered"
|
||||
size_available: 56821
|
||||
size_total: 543210
|
||||
uuid: "ab31cade-d9c1-484d-8482-8a4cbee5241a"
|
||||
- block_available: 1234
|
||||
block_size: 4096
|
||||
block_total: 12345
|
||||
block_used: 11111
|
||||
device: "/dev/sda2"
|
||||
fstype: "ext4"
|
||||
inode_available: 1111
|
||||
inode_total: 1234
|
||||
inode_used: 123
|
||||
mount: "/"
|
||||
options: "rw,relatime"
|
||||
size_available: 42143
|
||||
size_total: 543210
|
||||
uuid: "abcdef01-2345-6789-0abc-def012345678"
|
||||
@{{ task | indent(4) }}@
|
||||
|
||||
.. code-block:: ansible-output
|
||||
|
||||
TASK [Output mount facts grouped by device name] ******************************************
|
||||
ok: [localhost] => {
|
||||
"ansible_facts.mounts | community.general.groupby_as_dict('device')": {
|
||||
"/dev/sda1": {
|
||||
"block_available": 2000,
|
||||
"block_size": 4096,
|
||||
"block_total": 2345,
|
||||
"block_used": 345,
|
||||
"device": "/dev/sda1",
|
||||
"fstype": "ext4",
|
||||
"inode_available": 500,
|
||||
"inode_total": 512,
|
||||
"inode_used": 12,
|
||||
"mount": "/boot",
|
||||
"options": "rw,relatime,data=ordered",
|
||||
"size_available": 56821,
|
||||
"size_total": 543210,
|
||||
"uuid": "ab31cade-d9c1-484d-8482-8a4cbee5241a"
|
||||
},
|
||||
"/dev/sda2": {
|
||||
"block_available": 1234,
|
||||
"block_size": 4096,
|
||||
"block_total": 12345,
|
||||
"block_used": 11111,
|
||||
"device": "/dev/sda2",
|
||||
"fstype": "ext4",
|
||||
"inode_available": 1111,
|
||||
"inode_total": 1234,
|
||||
"inode_used": 123,
|
||||
"mount": "/",
|
||||
"options": "rw,relatime",
|
||||
"size_available": 42143,
|
||||
"size_total": 543210,
|
||||
"uuid": "abcdef01-2345-6789-0abc-def012345678"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TASK [Output mount facts grouped by mount point] ******************************************
|
||||
ok: [localhost] => {
|
||||
"ansible_facts.mounts | community.general.groupby_as_dict('mount')": {
|
||||
"/": {
|
||||
"block_available": 1234,
|
||||
"block_size": 4096,
|
||||
"block_total": 12345,
|
||||
"block_used": 11111,
|
||||
"device": "/dev/sda2",
|
||||
"fstype": "ext4",
|
||||
"inode_available": 1111,
|
||||
"inode_total": 1234,
|
||||
"inode_used": 123,
|
||||
"mount": "/",
|
||||
"options": "rw,relatime",
|
||||
"size_available": 42143,
|
||||
"size_total": 543210,
|
||||
"uuid": "abcdef01-2345-6789-0abc-def012345678"
|
||||
},
|
||||
"/boot": {
|
||||
"block_available": 2000,
|
||||
"block_size": 4096,
|
||||
"block_total": 2345,
|
||||
"block_used": 345,
|
||||
"device": "/dev/sda1",
|
||||
"fstype": "ext4",
|
||||
"inode_available": 500,
|
||||
"inode_total": 512,
|
||||
"inode_used": 12,
|
||||
"mount": "/boot",
|
||||
"options": "rw,relatime,data=ordered",
|
||||
"size_available": 56821,
|
||||
"size_total": 543210,
|
||||
"uuid": "ab31cade-d9c1-484d-8482-8a4cbee5241a"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.. versionadded: 3.0.0
|
||||
+134
@@ -0,0 +1,134 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
Union, intersection and difference of lists
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Starting with Ansible Core 2.16, the builtin filters :ansplugin:`ansible.builtin.union#filter`, :ansplugin:`ansible.builtin.intersect#filter`, :ansplugin:`ansible.builtin.difference#filter` and :ansplugin:`ansible.builtin.symmetric_difference#filter` began to behave differently and do no longer preserve the item order. Items in the resulting lists are returned in arbitrary order and the order can vary between subsequent runs.
|
||||
|
||||
The Ansible community.general collection provides the following additional list filters:
|
||||
|
||||
- :ansplugin:`community.general.lists_union#filter`
|
||||
- :ansplugin:`community.general.lists_intersect#filter`
|
||||
- :ansplugin:`community.general.lists_difference#filter`
|
||||
- :ansplugin:`community.general.lists_symmetric_difference#filter`
|
||||
|
||||
These filters preserve the item order, eliminate duplicates and are an extended version of the builtin ones, because they can operate on more than two lists.
|
||||
|
||||
.. note:: Stick to the builtin filters, when item order is not important or when you do not need the n-ary operating mode. The builtin filters are faster, because they rely mostly on sets as their underlying datastructure.
|
||||
|
||||
Let us use the lists below in the following examples:
|
||||
|
||||
.. ansible-output-meta::
|
||||
|
||||
actions:
|
||||
- name: reset-previous-blocks
|
||||
- name: set-template
|
||||
template:
|
||||
env:
|
||||
ANSIBLE_CALLBACK_RESULT_FORMAT: yaml
|
||||
variables:
|
||||
data:
|
||||
previous_code_block: yaml
|
||||
previous_code_block_index: 0
|
||||
computation:
|
||||
previous_code_block: yaml+jinja
|
||||
postprocessors:
|
||||
- name: reformat-yaml
|
||||
language: yaml
|
||||
skip_first_lines: 2
|
||||
playbook: |-
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- vars:
|
||||
@{{ data | indent(8) }}@
|
||||
@{{ computation | indent(8) }}@
|
||||
ansible.builtin.debug:
|
||||
var: result
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
A: [9, 5, 7, 1, 9, 4, 10, 5, 9, 7]
|
||||
B: [4, 1, 2, 8, 3, 1, 7]
|
||||
C: [10, 2, 1, 9, 1]
|
||||
|
||||
The union of ``A`` and ``B`` can be written as:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
result: "{{ A | community.general.lists_union(B) }}"
|
||||
|
||||
This statement produces:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
playbook: ~
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
result:
|
||||
- 9
|
||||
- 5
|
||||
- 7
|
||||
- 1
|
||||
- 4
|
||||
- 10
|
||||
- 2
|
||||
- 8
|
||||
- 3
|
||||
|
||||
If you want to calculate the intersection of ``A``, ``B`` and ``C``, you can use the following statement:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
result: "{{ A | community.general.lists_intersect(B, C) }}"
|
||||
|
||||
Alternatively, you can use a list of lists as an input of the filter
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
result: "{{ [A, B] | community.general.lists_intersect(C) }}"
|
||||
|
||||
or
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
result: "{{ [A, B, C] | community.general.lists_intersect(flatten=true) }}"
|
||||
|
||||
All three statements are equivalent and give:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
playbook: ~
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
result:
|
||||
- 1
|
||||
|
||||
.. note:: Be aware that in most cases, filter calls without any argument require ``flatten=true``, otherwise the input is returned as result. The reason for this is, that the input is considered as a variable argument and is wrapped by an additional outer list. ``flatten=true`` ensures that this list is removed before the input is processed by the filter logic.
|
||||
|
||||
The filters :ansplugin:`community.general.lists_difference#filter` or :ansplugin:`community.general.lists_symmetric_difference#filter` can be used in the same way as the filters in the examples above. They calculate the difference or the symmetric difference between two or more lists and preserve the item order.
|
||||
|
||||
For example, the symmetric difference of ``A``, ``B`` and ``C`` may be written as:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
result: "{{ A | community.general.lists_symmetric_difference(B, C) }}"
|
||||
|
||||
This gives:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
playbook: ~
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
result:
|
||||
- 5
|
||||
- 8
|
||||
- 3
|
||||
- 1
|
||||
+393
@@ -0,0 +1,393 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
Merging lists of dictionaries
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
If you have two or more lists of dictionaries and want to combine them into a list of merged dictionaries, where the dictionaries are merged by an attribute, you can use the :ansplugin:`community.general.lists_mergeby <community.general.lists_mergeby#filter>` filter.
|
||||
|
||||
.. note:: The output of the examples in this section use the YAML callback plugin. Quoting: "Ansible output that can be quite a bit easier to read than the default JSON formatting." See the documentation for the :ansplugin:`community.general.yaml callback plugin <community.general.yaml#callback>`.
|
||||
|
||||
Let us use the lists below in the following examples:
|
||||
|
||||
.. ansible-output-meta::
|
||||
|
||||
actions:
|
||||
- name: reset-previous-blocks
|
||||
- name: set-template
|
||||
template:
|
||||
env:
|
||||
ANSIBLE_CALLBACK_RESULT_FORMAT: yaml
|
||||
variables:
|
||||
data:
|
||||
previous_code_block: yaml
|
||||
previous_code_block_index: 0
|
||||
computation:
|
||||
previous_code_block: yaml+jinja
|
||||
postprocessors:
|
||||
- name: reformat-yaml
|
||||
language: yaml
|
||||
skip_first_lines: 2
|
||||
playbook: |-
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- vars:
|
||||
@{{ data | indent(8) }}@
|
||||
@{{ computation | indent(8) }}@
|
||||
ansible.builtin.debug:
|
||||
var: list3
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
list1:
|
||||
- {name: foo, extra: true}
|
||||
- {name: bar, extra: false}
|
||||
- {name: meh, extra: true}
|
||||
|
||||
list2:
|
||||
- {name: foo, path: /foo}
|
||||
- {name: baz, path: /baz}
|
||||
|
||||
Two lists
|
||||
"""""""""
|
||||
In the example below the lists are merged by the attribute ``name``:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
list3: "{{ list1 |
|
||||
community.general.lists_mergeby(list2, 'name') }}"
|
||||
|
||||
This produces:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
playbook: ~
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
list3:
|
||||
- extra: false
|
||||
name: bar
|
||||
- name: baz
|
||||
path: /baz
|
||||
- extra: true
|
||||
name: foo
|
||||
path: /foo
|
||||
- extra: true
|
||||
name: meh
|
||||
|
||||
|
||||
.. versionadded:: 2.0.0
|
||||
|
||||
List of two lists
|
||||
"""""""""""""""""
|
||||
It is possible to use a list of lists as an input of the filter:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
list3: "{{ [list1, list2] |
|
||||
community.general.lists_mergeby('name') }}"
|
||||
|
||||
This produces the same result as in the previous example:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
playbook: ~
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
list3:
|
||||
- extra: false
|
||||
name: bar
|
||||
- name: baz
|
||||
path: /baz
|
||||
- extra: true
|
||||
name: foo
|
||||
path: /foo
|
||||
- extra: true
|
||||
name: meh
|
||||
|
||||
Single list
|
||||
"""""""""""
|
||||
It is possible to merge single list:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
list3: "{{ [list1 + list2, []] |
|
||||
community.general.lists_mergeby('name') }}"
|
||||
|
||||
This produces the same result as in the previous example:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
playbook: ~
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
list3:
|
||||
- extra: false
|
||||
name: bar
|
||||
- name: baz
|
||||
path: /baz
|
||||
- extra: true
|
||||
name: foo
|
||||
path: /foo
|
||||
- extra: true
|
||||
name: meh
|
||||
|
||||
|
||||
The filter also accepts two optional parameters: :ansopt:`community.general.lists_mergeby#filter:recursive` and :ansopt:`community.general.lists_mergeby#filter:list_merge`. This is available since community.general 4.4.0.
|
||||
|
||||
**recursive**
|
||||
Is a boolean, default to ``false``. Should the :ansplugin:`community.general.lists_mergeby#filter` filter recursively merge nested hashes. Note: It does not depend on the value of the ``hash_behaviour`` setting in ``ansible.cfg``.
|
||||
|
||||
**list_merge**
|
||||
Is a string, its possible values are :ansval:`replace` (default), :ansval:`keep`, :ansval:`append`, :ansval:`prepend`, :ansval:`append_rp` or :ansval:`prepend_rp`. It modifies the behaviour of :ansplugin:`community.general.lists_mergeby#filter` when the hashes to merge contain arrays/lists.
|
||||
|
||||
The examples below set :ansopt:`community.general.lists_mergeby#filter:recursive=true` and display the differences among all six options of :ansopt:`community.general.lists_mergeby#filter:list_merge`. Functionality of the parameters is exactly the same as in the filter :ansplugin:`ansible.builtin.combine#filter`. See :ref:`Combining hashes/dictionaries <combine_filter>` to learn details about these options.
|
||||
|
||||
Let us use the lists below in the following examples
|
||||
|
||||
.. ansible-output-meta::
|
||||
|
||||
actions:
|
||||
- name: reset-previous-blocks
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
list1:
|
||||
- name: myname01
|
||||
param01:
|
||||
x: default_value
|
||||
y: default_value
|
||||
list: [default_value]
|
||||
- name: myname02
|
||||
param01: [1, 1, 2, 3]
|
||||
|
||||
list2:
|
||||
- name: myname01
|
||||
param01:
|
||||
y: patch_value
|
||||
z: patch_value
|
||||
list: [patch_value]
|
||||
- name: myname02
|
||||
param01: [3, 4, 4]
|
||||
|
||||
list_merge=replace (default)
|
||||
""""""""""""""""""""""""""""
|
||||
Example :ansopt:`community.general.lists_mergeby#filter:list_merge=replace` (default):
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
list3: "{{ [list1, list2] |
|
||||
community.general.lists_mergeby('name',
|
||||
recursive=true) }}"
|
||||
|
||||
This produces:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
playbook: ~
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
list3:
|
||||
- name: myname01
|
||||
param01:
|
||||
list:
|
||||
- patch_value
|
||||
x: default_value
|
||||
y: patch_value
|
||||
z: patch_value
|
||||
- name: myname02
|
||||
param01:
|
||||
- 3
|
||||
- 4
|
||||
- 4
|
||||
|
||||
list_merge=keep
|
||||
"""""""""""""""
|
||||
Example :ansopt:`community.general.lists_mergeby#filter:list_merge=keep`:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
list3: "{{ [list1, list2] |
|
||||
community.general.lists_mergeby('name',
|
||||
recursive=true,
|
||||
list_merge='keep') }}"
|
||||
|
||||
This produces:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
playbook: ~
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
list3:
|
||||
- name: myname01
|
||||
param01:
|
||||
list:
|
||||
- default_value
|
||||
x: default_value
|
||||
y: patch_value
|
||||
z: patch_value
|
||||
- name: myname02
|
||||
param01:
|
||||
- 1
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
|
||||
list_merge=append
|
||||
"""""""""""""""""
|
||||
Example :ansopt:`community.general.lists_mergeby#filter:list_merge=append`:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
list3: "{{ [list1, list2] |
|
||||
community.general.lists_mergeby('name',
|
||||
recursive=true,
|
||||
list_merge='append') }}"
|
||||
|
||||
This produces:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
playbook: ~
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
list3:
|
||||
- name: myname01
|
||||
param01:
|
||||
list:
|
||||
- default_value
|
||||
- patch_value
|
||||
x: default_value
|
||||
y: patch_value
|
||||
z: patch_value
|
||||
- name: myname02
|
||||
param01:
|
||||
- 1
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- 3
|
||||
- 4
|
||||
- 4
|
||||
|
||||
list_merge=prepend
|
||||
""""""""""""""""""
|
||||
Example :ansopt:`community.general.lists_mergeby#filter:list_merge=prepend`:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
list3: "{{ [list1, list2] |
|
||||
community.general.lists_mergeby('name',
|
||||
recursive=true,
|
||||
list_merge='prepend') }}"
|
||||
|
||||
This produces:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
playbook: ~
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
list3:
|
||||
- name: myname01
|
||||
param01:
|
||||
list:
|
||||
- patch_value
|
||||
- default_value
|
||||
x: default_value
|
||||
y: patch_value
|
||||
z: patch_value
|
||||
- name: myname02
|
||||
param01:
|
||||
- 3
|
||||
- 4
|
||||
- 4
|
||||
- 1
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
|
||||
list_merge=append_rp
|
||||
""""""""""""""""""""
|
||||
Example :ansopt:`community.general.lists_mergeby#filter:list_merge=append_rp`:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
list3: "{{ [list1, list2] |
|
||||
community.general.lists_mergeby('name',
|
||||
recursive=true,
|
||||
list_merge='append_rp') }}"
|
||||
|
||||
This produces:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
playbook: ~
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
list3:
|
||||
- name: myname01
|
||||
param01:
|
||||
list:
|
||||
- default_value
|
||||
- patch_value
|
||||
x: default_value
|
||||
y: patch_value
|
||||
z: patch_value
|
||||
- name: myname02
|
||||
param01:
|
||||
- 1
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- 4
|
||||
- 4
|
||||
|
||||
list_merge=prepend_rp
|
||||
"""""""""""""""""""""
|
||||
Example :ansopt:`community.general.lists_mergeby#filter:list_merge=prepend_rp`:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
list3: "{{ [list1, list2] |
|
||||
community.general.lists_mergeby('name',
|
||||
recursive=true,
|
||||
list_merge='prepend_rp') }}"
|
||||
|
||||
This produces:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
playbook: ~
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
list3:
|
||||
- name: myname01
|
||||
param01:
|
||||
list:
|
||||
- patch_value
|
||||
- default_value
|
||||
x: default_value
|
||||
y: patch_value
|
||||
z: patch_value
|
||||
- name: myname02
|
||||
param01:
|
||||
- 3
|
||||
- 4
|
||||
- 4
|
||||
- 1
|
||||
- 1
|
||||
- 2
|
||||
+152
@@ -0,0 +1,152 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
Conversions
|
||||
-----------
|
||||
|
||||
Parsing CSV files
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
Ansible offers the :ansplugin:`community.general.read_csv module <community.general.read_csv#module>` to read CSV files. Sometimes you need to convert strings to CSV files instead. For this, the :ansplugin:`community.general.from_csv filter <community.general.from_csv#filter>` exists.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: "Parse CSV from string"
|
||||
debug:
|
||||
msg: "{{ csv_string | community.general.from_csv }}"
|
||||
vars:
|
||||
csv_string: |
|
||||
foo,bar,baz
|
||||
1,2,3
|
||||
you,this,then
|
||||
|
||||
This produces:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
variables:
|
||||
task:
|
||||
previous_code_block: yaml+jinja
|
||||
playbook: |-
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
@{{ task | indent(4) }}@
|
||||
|
||||
.. code-block:: ansible-output
|
||||
|
||||
TASK [Parse CSV from string] **************************************************************
|
||||
ok: [localhost] => {
|
||||
"msg": [
|
||||
{
|
||||
"bar": "2",
|
||||
"baz": "3",
|
||||
"foo": "1"
|
||||
},
|
||||
{
|
||||
"bar": "this",
|
||||
"baz": "then",
|
||||
"foo": "you"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
The :ansplugin:`community.general.from_csv filter <community.general.from_csv#filter>` has several keyword arguments to control its behavior:
|
||||
|
||||
:dialect: Dialect of the CSV file. Default is ``excel``. Other possible choices are ``excel-tab`` and ``unix``. If one of ``delimiter``, ``skipinitialspace`` or ``strict`` is specified, ``dialect`` is ignored.
|
||||
:fieldnames: A set of column names to use. If not provided, the first line of the CSV is assumed to contain the column names.
|
||||
:delimiter: Sets the delimiter to use. Default depends on the dialect used.
|
||||
:skipinitialspace: Set to ``true`` to ignore space directly after the delimiter. Default depends on the dialect used (usually ``false``).
|
||||
:strict: Set to ``true`` to error out on invalid CSV input.
|
||||
|
||||
.. versionadded: 3.0.0
|
||||
|
||||
Converting to JSON
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
`JC <https://pypi.org/project/jc/>`_ is a CLI tool and Python library which allows to interpret output of various CLI programs as JSON. It is also available as a filter in community.general, called :ansplugin:`community.general.jc#filter`. This filter needs the `jc Python library <https://pypi.org/project/jc/>`_ installed on the controller.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: Run 'ls' to list files in /
|
||||
command: ls /
|
||||
register: result
|
||||
|
||||
- name: Parse the ls output
|
||||
debug:
|
||||
msg: "{{ result.stdout | community.general.jc('ls') }}"
|
||||
|
||||
This produces:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
skip_first_lines: 3
|
||||
playbook: |-
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- ansible.builtin.set_fact:
|
||||
result_stdout: |-
|
||||
bin
|
||||
boot
|
||||
dev
|
||||
etc
|
||||
home
|
||||
lib
|
||||
proc
|
||||
root
|
||||
run
|
||||
tmp
|
||||
|
||||
- name: Run 'ls' to list files in /
|
||||
command: ls /
|
||||
register: result
|
||||
|
||||
- name: Parse the ls output
|
||||
debug:
|
||||
msg: "{{ result_stdout | community.general.jc('ls') }}"
|
||||
|
||||
.. code-block:: ansible-output
|
||||
|
||||
TASK [Run 'ls' to list files in /] ********************************************************
|
||||
changed: [localhost]
|
||||
|
||||
TASK [Parse the ls output] ****************************************************************
|
||||
ok: [localhost] => {
|
||||
"msg": [
|
||||
{
|
||||
"filename": "bin"
|
||||
},
|
||||
{
|
||||
"filename": "boot"
|
||||
},
|
||||
{
|
||||
"filename": "dev"
|
||||
},
|
||||
{
|
||||
"filename": "etc"
|
||||
},
|
||||
{
|
||||
"filename": "home"
|
||||
},
|
||||
{
|
||||
"filename": "lib"
|
||||
},
|
||||
{
|
||||
"filename": "proc"
|
||||
},
|
||||
{
|
||||
"filename": "root"
|
||||
},
|
||||
{
|
||||
"filename": "run"
|
||||
},
|
||||
{
|
||||
"filename": "tmp"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
.. versionadded: 2.0.0
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
Creating identifiers
|
||||
--------------------
|
||||
|
||||
The following filters allow to create identifiers.
|
||||
|
||||
Hashids
|
||||
^^^^^^^
|
||||
|
||||
`Hashids <https://hashids.org/>`_ allow to convert sequences of integers to short unique string identifiers. The :ansplugin:`community.general.hashids_encode#filter` and :ansplugin:`community.general.hashids_decode#filter` filters need the `hashids Python library <https://pypi.org/project/hashids/>`_ installed on the controller.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: "Create hashid"
|
||||
debug:
|
||||
msg: "{{ [1234, 5, 6] | community.general.hashids_encode }}"
|
||||
|
||||
- name: "Decode hashid"
|
||||
debug:
|
||||
msg: "{{ 'jm2Cytn' | community.general.hashids_decode }}"
|
||||
|
||||
This produces:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
variables:
|
||||
task:
|
||||
previous_code_block: yaml+jinja
|
||||
playbook: |-
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
@{{ task | indent(4) }}@
|
||||
|
||||
.. code-block:: ansible-output
|
||||
|
||||
TASK [Create hashid] **********************************************************************
|
||||
ok: [localhost] => {
|
||||
"msg": "jm2Cytn"
|
||||
}
|
||||
|
||||
TASK [Decode hashid] **********************************************************************
|
||||
ok: [localhost] => {
|
||||
"msg": [
|
||||
1234,
|
||||
5,
|
||||
6
|
||||
]
|
||||
}
|
||||
|
||||
The hashids filters accept keyword arguments to allow fine-tuning the hashids generated:
|
||||
|
||||
:salt: String to use as salt when hashing.
|
||||
:alphabet: String of 16 or more unique characters to produce a hash.
|
||||
:min_length: Minimum length of hash produced.
|
||||
|
||||
.. versionadded: 3.0.0
|
||||
|
||||
Random MACs
|
||||
^^^^^^^^^^^
|
||||
|
||||
You can use the :ansplugin:`community.general.random_mac filter <community.general.random_mac#filter>` to complete a partial `MAC address <https://en.wikipedia.org/wiki/MAC_address>`_ to a random 6-byte MAC address.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: "Create a random MAC starting with ff:"
|
||||
debug:
|
||||
msg: "{{ 'FF' | community.general.random_mac }}"
|
||||
|
||||
- name: "Create a random MAC starting with 00:11:22:"
|
||||
debug:
|
||||
msg: "{{ '00:11:22' | community.general.random_mac }}"
|
||||
|
||||
This produces:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
playbook: |-
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- name: "Create a random MAC starting with ff:"
|
||||
debug:
|
||||
# We're using a seed here to avoid randomness in the output
|
||||
msg: "{{ 'FF' | community.general.random_mac(seed='') }}"
|
||||
|
||||
- name: "Create a random MAC starting with 00:11:22:"
|
||||
debug:
|
||||
# We're using a seed here to avoid randomness in the output
|
||||
msg: "{{ '00:11:22' | community.general.random_mac(seed='') }}"
|
||||
|
||||
.. code-block:: ansible-output
|
||||
|
||||
TASK [Create a random MAC starting with ff:] **********************************************
|
||||
ok: [localhost] => {
|
||||
"msg": "ff:84:f5:d1:59:20"
|
||||
}
|
||||
|
||||
TASK [Create a random MAC starting with 00:11:22:] ****************************************
|
||||
ok: [localhost] => {
|
||||
"msg": "00:11:22:84:f5:d1"
|
||||
}
|
||||
|
||||
You can also initialize the random number generator from a seed to create random-but-idempotent MAC addresses:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
"{{ '52:54:00' | community.general.random_mac(seed=inventory_hostname) }}"
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
Paths
|
||||
-----
|
||||
|
||||
The :ansplugin:`ansible.builtin.path_join filter <ansible.builtin.path_join#filter>` has been added in ansible-base 2.10. Community.general 3.0.0 and newer contains an alias ``community.general.path_join`` for this filter that could be used on Ansible 2.9 as well. Since community.general no longer supports Ansible 2.9, this is now a simple redirect to :ansplugin:`ansible.builtin.path_join filter <ansible.builtin.path_join#filter>`.
|
||||
+149
@@ -0,0 +1,149 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
.. _ansible_collections.community.general.docsite.json_query_filter:
|
||||
|
||||
Selecting JSON data: JSON queries
|
||||
---------------------------------
|
||||
|
||||
To select a single element or a data subset from a complex data structure in JSON format (for example, Ansible facts), use the :ansplugin:`community.general.json_query filter <community.general.json_query#filter>`. The :ansplugin:`community.general.json_query#filter` filter lets you query a complex JSON structure and iterate over it using a loop structure.
|
||||
|
||||
.. note:: You must manually install the **jmespath** dependency on the Ansible controller before using this filter. This filter is built upon **jmespath**, and you can use the same syntax. For examples, see `jmespath examples <http://jmespath.org/examples.html>`_.
|
||||
|
||||
Consider this data structure:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
{
|
||||
"domain_definition": {
|
||||
"domain": {
|
||||
"cluster": [
|
||||
{
|
||||
"name": "cluster1"
|
||||
},
|
||||
{
|
||||
"name": "cluster2"
|
||||
}
|
||||
],
|
||||
"server": [
|
||||
{
|
||||
"name": "server11",
|
||||
"cluster": "cluster1",
|
||||
"port": "8080"
|
||||
},
|
||||
{
|
||||
"name": "server12",
|
||||
"cluster": "cluster1",
|
||||
"port": "8090"
|
||||
},
|
||||
{
|
||||
"name": "server21",
|
||||
"cluster": "cluster2",
|
||||
"port": "9080"
|
||||
},
|
||||
{
|
||||
"name": "server22",
|
||||
"cluster": "cluster2",
|
||||
"port": "9090"
|
||||
}
|
||||
],
|
||||
"library": [
|
||||
{
|
||||
"name": "lib1",
|
||||
"target": "cluster1"
|
||||
},
|
||||
{
|
||||
"name": "lib2",
|
||||
"target": "cluster2"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
To extract all clusters from this structure, you can use the following query:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: Display all cluster names
|
||||
ansible.builtin.debug:
|
||||
var: item
|
||||
loop: "{{ domain_definition | community.general.json_query('domain.cluster[*].name') }}"
|
||||
|
||||
To extract all server names:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: Display all server names
|
||||
ansible.builtin.debug:
|
||||
var: item
|
||||
loop: "{{ domain_definition | community.general.json_query('domain.server[*].name') }}"
|
||||
|
||||
To extract ports from cluster1:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: Display all ports from cluster1
|
||||
ansible.builtin.debug:
|
||||
var: item
|
||||
loop: "{{ domain_definition | community.general.json_query(server_name_cluster1_query) }}"
|
||||
vars:
|
||||
server_name_cluster1_query: "domain.server[?cluster=='cluster1'].port"
|
||||
|
||||
.. note:: You can use a variable to make the query more readable.
|
||||
|
||||
To print out the ports from cluster1 in a comma separated string:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: Display all ports from cluster1 as a string
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ domain_definition | community.general.json_query('domain.server[?cluster==`cluster1`].port') | join(', ') }}"
|
||||
|
||||
.. note:: In the example above, quoting literals using backticks avoids escaping quotes and maintains readability.
|
||||
|
||||
You can use YAML `single quote escaping <https://yaml.org/spec/current.html#id2534365>`_:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: Display all ports from cluster1
|
||||
ansible.builtin.debug:
|
||||
var: item
|
||||
loop: "{{ domain_definition | community.general.json_query('domain.server[?cluster==''cluster1''].port') }}"
|
||||
|
||||
.. note:: Escaping single quotes within single quotes in YAML is done by doubling the single quote.
|
||||
|
||||
To get a hash map with all ports and names of a cluster:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: Display all server ports and names from cluster1
|
||||
ansible.builtin.debug:
|
||||
var: item
|
||||
loop: "{{ domain_definition | community.general.json_query(server_name_cluster1_query) }}"
|
||||
vars:
|
||||
server_name_cluster1_query: "domain.server[?cluster=='cluster1'].{name: name, port: port}"
|
||||
|
||||
To extract ports from all clusters with name starting with 'server1':
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: Display all ports from cluster1
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ domain_definition | to_json | from_json | community.general.json_query(server_name_query) }}"
|
||||
vars:
|
||||
server_name_query: "domain.server[?starts_with(name,'server1')].port"
|
||||
|
||||
To extract ports from all clusters with name containing 'server1':
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: Display all ports from cluster1
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ domain_definition | to_json | from_json | community.general.json_query(server_name_query) }}"
|
||||
vars:
|
||||
server_name_query: "domain.server[?contains(name,'server1')].port"
|
||||
|
||||
.. note:: while using ``starts_with`` and ``contains``, you have to use ``to_json | from_json`` filter for correct parsing of data structure.
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
Working with times
|
||||
------------------
|
||||
|
||||
The :ansplugin:`community.general.to_time_unit filter <community.general.to_time_unit#filter>` allows to convert times from a human-readable string to a unit. For example, ``'4h 30min 12second' | community.general.to_time_unit('hour')`` gives the number of hours that correspond to 4 hours, 30 minutes and 12 seconds.
|
||||
|
||||
There are shorthands to directly convert to various units, like :ansplugin:`community.general.to_hours#filter`, :ansplugin:`community.general.to_minutes#filter`, :ansplugin:`community.general.to_seconds#filter`, and so on. The following table lists all units that can be used:
|
||||
|
||||
.. list-table:: Units
|
||||
:widths: 25 25 25 25
|
||||
:header-rows: 1
|
||||
|
||||
* - Unit name
|
||||
- Unit value in seconds
|
||||
- Unit strings for filter
|
||||
- Shorthand filter
|
||||
* - Millisecond
|
||||
- 1/1000 second
|
||||
- ``ms``, ``millisecond``, ``milliseconds``, ``msec``, ``msecs``, ``msecond``, ``mseconds``
|
||||
- :ansplugin:`community.general.to_milliseconds#filter`
|
||||
* - Second
|
||||
- 1 second
|
||||
- ``s``, ``sec``, ``secs``, ``second``, ``seconds``
|
||||
- :ansplugin:`community.general.to_seconds#filter`
|
||||
* - Minute
|
||||
- 60 seconds
|
||||
- ``m``, ``min``, ``mins``, ``minute``, ``minutes``
|
||||
- :ansplugin:`community.general.to_minutes#filter`
|
||||
* - Hour
|
||||
- 60*60 seconds
|
||||
- ``h``, ``hour``, ``hours``
|
||||
- :ansplugin:`community.general.to_hours#filter`
|
||||
* - Day
|
||||
- 24*60*60 seconds
|
||||
- ``d``, ``day``, ``days``
|
||||
- :ansplugin:`community.general.to_days#filter`
|
||||
* - Week
|
||||
- 7*24*60*60 seconds
|
||||
- ``w``, ``week``, ``weeks``
|
||||
- :ansplugin:`community.general.to_weeks#filter`
|
||||
* - Month
|
||||
- 30*24*60*60 seconds
|
||||
- ``mo``, ``month``, ``months``
|
||||
- :ansplugin:`community.general.to_months#filter`
|
||||
* - Year
|
||||
- 365*24*60*60 seconds
|
||||
- ``y``, ``year``, ``years``
|
||||
- :ansplugin:`community.general.to_years#filter`
|
||||
|
||||
Note that months and years are using a simplified representation: a month is 30 days, and a year is 365 days. If you need different definitions of months or years, you can pass them as keyword arguments. For example, if you want a year to be 365.25 days, and a month to be 30.5 days, you can write ``'11months 4' | community.general.to_years(year=365.25, month=30.5)``. These keyword arguments can be specified to :ansplugin:`community.general.to_time_unit#filter` and to all shorthand filters.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: Convert string to seconds
|
||||
debug:
|
||||
msg: "{{ '30h 20m 10s 123ms' | community.general.to_time_unit('seconds') }}"
|
||||
|
||||
- name: Convert string to hours
|
||||
debug:
|
||||
msg: "{{ '30h 20m 10s 123ms' | community.general.to_hours }}"
|
||||
|
||||
- name: Convert string to years (using 365.25 days == 1 year)
|
||||
debug:
|
||||
msg: "{{ '400d 15h' | community.general.to_years(year=365.25) }}"
|
||||
|
||||
This produces:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
variables:
|
||||
task:
|
||||
previous_code_block: yaml+jinja
|
||||
playbook: |-
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
@{{ task | indent(4) }}@
|
||||
|
||||
.. code-block:: ansible-output
|
||||
|
||||
TASK [Convert string to seconds] **********************************************************
|
||||
ok: [localhost] => {
|
||||
"msg": 109210.123
|
||||
}
|
||||
|
||||
TASK [Convert string to hours] ************************************************************
|
||||
ok: [localhost] => {
|
||||
"msg": 30.336145277778
|
||||
}
|
||||
|
||||
TASK [Convert string to years (using 365.25 days == 1 year)] ******************************
|
||||
ok: [localhost] => {
|
||||
"msg": 1.096851471595
|
||||
}
|
||||
|
||||
.. versionadded: 0.2.0
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
Working with Unicode
|
||||
---------------------
|
||||
|
||||
`Unicode <https://unicode.org/main.html>`_ makes it possible to produce two strings which may be visually equivalent, but are comprised of distinctly different characters/character sequences. To address this Unicode defines `normalization forms <https://unicode.org/reports/tr15/>`_ which avoid these distinctions by choosing a unique character sequence for a given visual representation.
|
||||
|
||||
You can use the :ansplugin:`community.general.unicode_normalize filter <community.general.unicode_normalize#filter>` to normalize Unicode strings within your playbooks.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: Compare Unicode representations
|
||||
debug:
|
||||
msg: "{{ with_combining_character | community.general.unicode_normalize == without_combining_character }}"
|
||||
vars:
|
||||
with_combining_character: "{{ 'Mayagu\u0308ez' }}"
|
||||
without_combining_character: Mayagüez
|
||||
|
||||
This produces:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
variables:
|
||||
task:
|
||||
previous_code_block: yaml+jinja
|
||||
playbook: |-
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
@{{ task | indent(4) }}@
|
||||
|
||||
.. code-block:: ansible-output
|
||||
|
||||
TASK [Compare Unicode representations] ****************************************************
|
||||
ok: [localhost] => {
|
||||
"msg": true
|
||||
}
|
||||
|
||||
The :ansplugin:`community.general.unicode_normalize filter <community.general.unicode_normalize#filter>` accepts a keyword argument :ansopt:`community.general.unicode_normalize#filter:form` to select the Unicode form used to normalize the input string.
|
||||
|
||||
:form: One of ``'NFC'`` (default), ``'NFD'``, ``'NFKC'``, or ``'NFKD'``. See the `Unicode reference <https://unicode.org/reports/tr15/>`_ for more information.
|
||||
|
||||
.. versionadded:: 3.7.0
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
Working with versions
|
||||
---------------------
|
||||
|
||||
If you need to sort a list of version numbers, the Jinja ``sort`` filter is problematic. Since it sorts lexicographically, ``2.10`` will come before ``2.9``. To treat version numbers correctly, you can use the :ansplugin:`community.general.version_sort filter <community.general.version_sort#filter>`:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: Sort list by version number
|
||||
debug:
|
||||
var: ansible_versions | community.general.version_sort
|
||||
vars:
|
||||
ansible_versions:
|
||||
- '2.8.0'
|
||||
- '2.11.0'
|
||||
- '2.7.0'
|
||||
- '2.10.0'
|
||||
- '2.9.0'
|
||||
|
||||
This produces:
|
||||
|
||||
.. ansible-output-data::
|
||||
|
||||
variables:
|
||||
task:
|
||||
previous_code_block: yaml+jinja
|
||||
playbook: |-
|
||||
- hosts: localhost
|
||||
gather_facts: false
|
||||
tasks:
|
||||
@{{ task | indent(4) }}@
|
||||
|
||||
.. code-block:: ansible-output
|
||||
|
||||
TASK [Sort list by version number] ********************************************************
|
||||
ok: [localhost] => {
|
||||
"ansible_versions | community.general.version_sort": [
|
||||
"2.7.0",
|
||||
"2.8.0",
|
||||
"2.9.0",
|
||||
"2.10.0",
|
||||
"2.11.0"
|
||||
]
|
||||
}
|
||||
|
||||
.. versionadded: 2.2.0
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
.. _ansible_collections.community.general.docsite.guide_alicloud:
|
||||
|
||||
Alibaba Cloud Compute Services Guide
|
||||
====================================
|
||||
|
||||
Introduction
|
||||
````````````
|
||||
|
||||
The community.general collection contains several modules for controlling and managing Alibaba Cloud Compute Services (Alicloud). This guide
|
||||
explains how to use the Alicloud Ansible modules together.
|
||||
|
||||
All Alicloud modules require ``footmark`` - install it on your control machine with ``pip install footmark``.
|
||||
|
||||
Cloud modules, including Alicloud modules, are usually executed on your local machine (the control machine) with ``connection: local``, rather than on remote machines defined in your hosts.
|
||||
|
||||
Normally, you'll use the following pattern for plays that provision Alicloud resources:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
- hosts: localhost
|
||||
connection: local
|
||||
vars:
|
||||
...
|
||||
tasks:
|
||||
- ...
|
||||
|
||||
Authentication
|
||||
``````````````
|
||||
|
||||
You can specify your Alicloud authentication credentials (access key and secret key) by passing them as
|
||||
environment variables or by storing them in a vars file.
|
||||
|
||||
To pass authentication credentials as environment variables:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
export ALICLOUD_ACCESS_KEY='Alicloud123'
|
||||
export ALICLOUD_SECRET_KEY='AlicloudSecret123'
|
||||
|
||||
To store authentication credentials in a vars file, encrypt them with :ref:`Ansible Vault <vault>` to keep them secure, then list them:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
---
|
||||
alicloud_access_key: "--REMOVED--"
|
||||
alicloud_secret_key: "--REMOVED--"
|
||||
|
||||
Note that if you store your credentials in a vars file, you need to refer to them in each Alicloud module. For example:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- community.general.ali_instance:
|
||||
alicloud_access_key: "{{ alicloud_access_key }}"
|
||||
alicloud_secret_key: "{{ alicloud_secret_key }}"
|
||||
image_id: "..."
|
||||
|
||||
Provisioning
|
||||
````````````
|
||||
|
||||
Alicloud modules create Alicloud ECS instances (:ansplugin:`community.general.ali_instance#module`) and retrieve information on these (:ansplugin:`community.general.ali_instance_info#module`).
|
||||
|
||||
You can use the ``count`` parameter to control the number of resources you create or terminate. For example, if you want exactly 5 instances tagged ``NewECS``, set the ``count`` of instances to 5 and the ``count_tag`` to ``NewECS``, as shown in the last task of the example playbook below. If there are no instances with the tag ``NewECS``, the task creates 5 new instances. If there are 2 instances with that tag, the task creates 3 more. If there are 8 instances with that tag, the task terminates 3 of those instances.
|
||||
|
||||
If you do not specify a ``count_tag``, the task creates the number of instances you specify in ``count`` with the ``instance_name`` you provide.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
# alicloud_setup.yml
|
||||
|
||||
- hosts: localhost
|
||||
connection: local
|
||||
|
||||
tasks:
|
||||
- name: Create a set of instances
|
||||
community.general.ali_instance:
|
||||
instance_type: ecs.n4.small
|
||||
image_id: "{{ ami_id }}"
|
||||
instance_name: "My-new-instance"
|
||||
instance_tags:
|
||||
Name: NewECS
|
||||
Version: 0.0.1
|
||||
count: 5
|
||||
count_tag:
|
||||
Name: NewECS
|
||||
allocate_public_ip: true
|
||||
max_bandwidth_out: 50
|
||||
register: create_instance
|
||||
|
||||
In the example playbook above, data about the instances created by this playbook is saved in the variable defined by the ``register`` keyword in the task.
|
||||
|
||||
Each Alicloud module offers a variety of parameter options. Not all options are demonstrated in the above example. See each individual module for further details and examples.
|
||||
+529
@@ -0,0 +1,529 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
.. _ansible_collections.community.general.docsite.guide_cmdrunner:
|
||||
|
||||
|
||||
Command Runner guide
|
||||
====================
|
||||
|
||||
|
||||
Introduction
|
||||
^^^^^^^^^^^^
|
||||
|
||||
The ``ansible_collections.community.general.plugins.module_utils._cmd_runner`` module util provides the
|
||||
``CmdRunner`` class to help execute external commands. The class is a wrapper around
|
||||
the standard ``AnsibleModule.run_command()`` method, handling command arguments, localization setting,
|
||||
output processing output, check mode, and other features.
|
||||
|
||||
It is even more useful when one command is used in multiple modules, so that you can define all options
|
||||
in a module util file, and each module uses the same runner with different arguments.
|
||||
|
||||
For the sake of clarity, throughout this guide, unless otherwise specified, we use the term *option* when referring to
|
||||
Ansible module options, and the term *argument* when referring to the command line arguments for the external command.
|
||||
|
||||
|
||||
Quickstart
|
||||
""""""""""
|
||||
|
||||
``CmdRunner`` defines a command and a set of coded instructions on how to format
|
||||
the command-line arguments, in which specific order, for a particular execution.
|
||||
It relies on ``ansible.module_utils.basic.AnsibleModule.run_command()`` to actually execute the command.
|
||||
There are other features, see more details throughout this document.
|
||||
|
||||
To use ``CmdRunner`` you must start by creating an object. The example below is a simplified
|
||||
version of the actual code in :ansplugin:`community.general.ansible_galaxy_install#module`:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils._cmd_runner import CmdRunner, cmd_runner_fmt
|
||||
|
||||
runner = CmdRunner(
|
||||
module,
|
||||
command="ansible-galaxy",
|
||||
arg_formats=dict(
|
||||
type=cmd_runner_fmt.as_func(lambda v: [] if v == 'both' else [v]),
|
||||
galaxy_cmd=cmd_runner_fmt.as_list(),
|
||||
upgrade=cmd_runner_fmt.as_bool("--upgrade"),
|
||||
requirements_file=cmd_runner_fmt.as_opt_val('-r'),
|
||||
dest=cmd_runner_fmt.as_opt_val('-p'),
|
||||
force=cmd_runner_fmt.as_bool("--force"),
|
||||
no_deps=cmd_runner_fmt.as_bool("--no-deps"),
|
||||
version=cmd_runner_fmt.as_fixed("--version"),
|
||||
name=cmd_runner_fmt.as_list(),
|
||||
)
|
||||
)
|
||||
|
||||
This is meant to be done once, then every time you need to execute the command you create a context and pass values as needed:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# Run the command with these arguments, when values exist for them
|
||||
with runner("type galaxy_cmd upgrade force no_deps dest requirements_file name", output_process=process) as ctx:
|
||||
ctx.run(galaxy_cmd="install", upgrade=upgrade)
|
||||
|
||||
# version is fixed, requires no value
|
||||
with runner("version") as ctx:
|
||||
dummy, stdout, dummy = ctx.run()
|
||||
|
||||
# passes arg 'data' to AnsibleModule.run_command()
|
||||
with runner("type name", data=stdin_data) as ctx:
|
||||
dummy, stdout, dummy = ctx.run()
|
||||
|
||||
# Another way of expressing it
|
||||
dummy, stdout, dummy = runner("version").run()
|
||||
|
||||
Note that you can pass values for the arguments when calling ``run()``, otherwise ``CmdRunner``
|
||||
uses the module options with the exact same names to provide values for the runner arguments.
|
||||
If no value is passed and no module option is found for the name specified, then an exception is raised, unless
|
||||
the argument is using ``cmd_runner_fmt.as_fixed`` as format function like the ``version`` in the example above.
|
||||
See more about it below.
|
||||
|
||||
In the first example, values of ``type``, ``force``, ``no_deps`` and others
|
||||
are taken straight from the module, whilst ``galaxy_cmd`` and ``upgrade`` are
|
||||
passed explicitly.
|
||||
|
||||
.. note::
|
||||
|
||||
It is not possible to automatically retrieve values of suboptions.
|
||||
|
||||
That generates a resulting command line similar to (example taken from the
|
||||
output of an integration test):
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
[
|
||||
"<venv>/bin/ansible-galaxy",
|
||||
"collection",
|
||||
"install",
|
||||
"--upgrade",
|
||||
"-p",
|
||||
"<collection-install-path>",
|
||||
"netbox.netbox",
|
||||
]
|
||||
|
||||
|
||||
Argument formats
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
As seen in the example, ``CmdRunner`` expects a parameter named ``arg_formats``
|
||||
defining how to format each CLI named argument.
|
||||
An "argument format" is nothing but a function to transform the value of a variable
|
||||
into something formatted for the command line.
|
||||
|
||||
|
||||
Argument format function
|
||||
""""""""""""""""""""""""
|
||||
|
||||
An ``arg_format`` function is defined in the form similar to:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
def func(value):
|
||||
return ["--some-param-name", value]
|
||||
|
||||
The parameter ``value`` can be of any type - although there are convenience
|
||||
mechanisms to help handling sequence and mapping objects.
|
||||
|
||||
The result is expected to be of the type ``Sequence[str]`` type (most commonly
|
||||
``list[str]`` or ``tuple[str]``), otherwise it is considered to be a ``str``,
|
||||
and it is coerced into ``list[str]``.
|
||||
This resulting sequence of strings is added to the command line when that
|
||||
argument is actually used.
|
||||
|
||||
For example, if ``func`` returns:
|
||||
|
||||
- ``["nee", 2, "shruberries"]``, the command line adds arguments ``"nee" "2" "shruberries"``.
|
||||
- ``2 == 2``, the command line adds argument ``True``.
|
||||
- ``None``, the command line adds argument ``None``.
|
||||
- ``[]``, the command line adds no command line argument for that particular argument.
|
||||
|
||||
|
||||
Convenience format methods
|
||||
""""""""""""""""""""""""""
|
||||
|
||||
In the same module as ``CmdRunner`` there is a class ``cmd_runner_fmt`` which
|
||||
provides a set of convenience methods that return format functions for common cases.
|
||||
In the first block of code in the `Quickstart`_ section you can see the importing of
|
||||
that class:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils._cmd_runner import CmdRunner, cmd_runner_fmt
|
||||
|
||||
The same example shows how to make use of some of them in the instantiation of the ``CmdRunner`` object.
|
||||
A description of each one of the convenience methods available and examples of how to use them is found below.
|
||||
In these descriptions ``value`` refers to the single parameter passed to the formatting function.
|
||||
|
||||
- ``cmd_runner_fmt.as_list()``
|
||||
This method does not receive any parameter, function returns ``value`` as-is.
|
||||
|
||||
- Creation:
|
||||
``cmd_runner_fmt.as_list()``
|
||||
- Examples:
|
||||
+----------------------+---------------------+
|
||||
| Value | Outcome |
|
||||
+======================+=====================+
|
||||
| ``["foo", "bar"]`` | ``["foo", "bar"]`` |
|
||||
+----------------------+---------------------+
|
||||
| ``"foobar"`` | ``["foobar"]`` |
|
||||
+----------------------+---------------------+
|
||||
|
||||
- ``cmd_runner_fmt.as_bool()``
|
||||
This method receives two different parameters: ``args_true`` and ``args_false``, latter being optional.
|
||||
If the boolean evaluation of ``value`` is ``True``, the format function returns ``args_true``.
|
||||
If the boolean evaluation is ``False``, then the function returns ``args_false`` if it was provided, or ``[]`` otherwise.
|
||||
|
||||
- Creation (one arg):
|
||||
``cmd_runner_fmt.as_bool("--force")``
|
||||
- Examples:
|
||||
+------------+--------------------+
|
||||
| Value | Outcome |
|
||||
+============+====================+
|
||||
| ``True`` | ``["--force"]`` |
|
||||
+------------+--------------------+
|
||||
| ``False`` | ``[]`` |
|
||||
+------------+--------------------+
|
||||
- Creation (two args, ``None`` treated as ``False``):
|
||||
``cmd_runner_fmt.as_bool("--relax", "--dont-do-it")``
|
||||
- Examples:
|
||||
+------------+----------------------+
|
||||
| Value | Outcome |
|
||||
+============+======================+
|
||||
| ``True`` | ``["--relax"]`` |
|
||||
+------------+----------------------+
|
||||
| ``False`` | ``["--dont-do-it"]`` |
|
||||
+------------+----------------------+
|
||||
| | ``["--dont-do-it"]`` |
|
||||
+------------+----------------------+
|
||||
- Creation (two args, ``None`` is ignored):
|
||||
``cmd_runner_fmt.as_bool("--relax", "--dont-do-it", ignore_none=True)``
|
||||
- Examples:
|
||||
+------------+----------------------+
|
||||
| Value | Outcome |
|
||||
+============+======================+
|
||||
| ``True`` | ``["--relax"]`` |
|
||||
+------------+----------------------+
|
||||
| ``False`` | ``["--dont-do-it"]`` |
|
||||
+------------+----------------------+
|
||||
| | ``[]`` |
|
||||
+------------+----------------------+
|
||||
|
||||
- ``cmd_runner_fmt.as_bool_not()``
|
||||
This method receives one parameter, which is returned by the function when the boolean evaluation
|
||||
of ``value`` is ``False``.
|
||||
|
||||
- Creation:
|
||||
``cmd_runner_fmt.as_bool_not("--no-deps")``
|
||||
- Examples:
|
||||
+-------------+---------------------+
|
||||
| Value | Outcome |
|
||||
+=============+=====================+
|
||||
| ``True`` | ``[]`` |
|
||||
+-------------+---------------------+
|
||||
| ``False`` | ``["--no-deps"]`` |
|
||||
+-------------+---------------------+
|
||||
|
||||
- ``cmd_runner_fmt.as_optval()``
|
||||
This method receives one parameter ``arg``, the function returns the string concatenation
|
||||
of ``arg`` and ``value``.
|
||||
|
||||
- Creation:
|
||||
``cmd_runner_fmt.as_optval("-i")``
|
||||
- Examples:
|
||||
+---------------+---------------------+
|
||||
| Value | Outcome |
|
||||
+===============+=====================+
|
||||
| ``3`` | ``["-i3"]`` |
|
||||
+---------------+---------------------+
|
||||
| ``foobar`` | ``["-ifoobar"]`` |
|
||||
+---------------+---------------------+
|
||||
|
||||
- ``cmd_runner_fmt.as_opt_val()``
|
||||
This method receives one parameter ``arg``, the function returns ``[arg, value]``.
|
||||
|
||||
- Creation:
|
||||
``cmd_runner_fmt.as_opt_val("--name")``
|
||||
- Examples:
|
||||
+--------------+--------------------------+
|
||||
| Value | Outcome |
|
||||
+==============+==========================+
|
||||
| ``abc`` | ``["--name", "abc"]`` |
|
||||
+--------------+--------------------------+
|
||||
|
||||
- ``cmd_runner_fmt.as_opt_eq_val()``
|
||||
This method receives one parameter ``arg``, the function returns the string of the form
|
||||
``{arg}={value}``.
|
||||
|
||||
- Creation:
|
||||
``cmd_runner_fmt.as_opt_eq_val("--num-cpus")``
|
||||
- Examples:
|
||||
+------------+-------------------------+
|
||||
| Value | Outcome |
|
||||
+============+=========================+
|
||||
| ``10`` | ``["--num-cpus=10"]`` |
|
||||
+------------+-------------------------+
|
||||
|
||||
- ``cmd_runner_fmt.as_fixed()``
|
||||
This method defines one or more fixed arguments that are returned by the generated function
|
||||
regardless whether ``value`` is passed to it or not.
|
||||
|
||||
This method accepts these arguments in one of three forms:
|
||||
|
||||
* one scalar parameter ``arg``, which will be returned as ``[arg]`` by the function, or
|
||||
* one sequence parameter, such as a list, ``arg``, which will be returned by the function as ``arg[0]``, or
|
||||
* multiple parameters ``args``, which will be returned as ``args`` directly by the function.
|
||||
|
||||
See the examples below for each one of those forms. And, stressing that the generated function expects no ``value`` - if one
|
||||
is provided then it is ignored.
|
||||
|
||||
- Creation (one scalar argument):
|
||||
* ``cmd_runner_fmt.as_fixed("--version")``
|
||||
- Examples:
|
||||
+---------+--------------------------------------+
|
||||
| Value | Outcome |
|
||||
+=========+======================================+
|
||||
| | * ``["--version"]`` |
|
||||
+---------+--------------------------------------+
|
||||
| 57 | * ``["--version"]`` |
|
||||
+---------+--------------------------------------+
|
||||
|
||||
- Creation (one sequence argument):
|
||||
* ``cmd_runner_fmt.as_fixed(["--list", "--json"])``
|
||||
- Examples:
|
||||
+---------+--------------------------------------+
|
||||
| Value | Outcome |
|
||||
+=========+======================================+
|
||||
| | * ``["--list", "--json"]`` |
|
||||
+---------+--------------------------------------+
|
||||
| True | * ``["--list", "--json"]`` |
|
||||
+---------+--------------------------------------+
|
||||
|
||||
- Creation (multiple arguments):
|
||||
* ``cmd_runner_fmt.as_fixed("--one", "--two", "--three")``
|
||||
- Examples:
|
||||
+---------+--------------------------------------+
|
||||
| Value | Outcome |
|
||||
+=========+======================================+
|
||||
| | * ``["--one", "--two", "--three"]`` |
|
||||
+---------+--------------------------------------+
|
||||
| False | * ``["--one", "--two", "--three"]`` |
|
||||
+---------+--------------------------------------+
|
||||
|
||||
- Note:
|
||||
This is the only special case in which a value can be missing for the formatting function.
|
||||
The first example here comes from the code in `Quickstart`_.
|
||||
In that case, the module has code to determine the command's version so that it can assert compatibility.
|
||||
There is no *value* to be passed for that CLI argument.
|
||||
|
||||
- ``cmd_runner_fmt.as_map()``
|
||||
This method receives one parameter ``arg`` which must be a dictionary, and an optional parameter ``default``.
|
||||
The function returns the evaluation of ``arg[value]``.
|
||||
If ``value not in arg``, then it returns ``default`` if defined, otherwise ``[]``.
|
||||
|
||||
- Creation:
|
||||
``cmd_runner_fmt.as_map(dict(a=1, b=2, c=3), default=42)``
|
||||
- Examples:
|
||||
+---------------------+---------------+
|
||||
| Value | Outcome |
|
||||
+=====================+===============+
|
||||
| ``"b"`` | ``["2"]`` |
|
||||
+---------------------+---------------+
|
||||
| ``"yabadabadoo"`` | ``["42"]`` |
|
||||
+---------------------+---------------+
|
||||
|
||||
- Note:
|
||||
If ``default`` is not specified, invalid values return an empty list, meaning they are silently ignored.
|
||||
|
||||
- ``cmd_runner_fmt.as_func()``
|
||||
This method receives one parameter ``arg`` which is itself is a format function and it must abide by the rules described above.
|
||||
|
||||
- Creation:
|
||||
``cmd_runner_fmt.as_func(lambda v: [] if v == 'stable' else ['--channel', '{0}'.format(v)])``
|
||||
- Note:
|
||||
The outcome for that depends entirely on the function provided by the developer.
|
||||
|
||||
|
||||
Other features for argument formatting
|
||||
""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
Some additional features are available as decorators:
|
||||
|
||||
- ``cmd_runner_fmt.unpack args()``
|
||||
This decorator unpacks the incoming ``value`` as a list of elements.
|
||||
|
||||
For example, in ``ansible_collections.community.general.plugins.module_utils._puppet``, it is used as:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
@cmd_runner_fmt.unpack_args
|
||||
def execute_func(execute, manifest):
|
||||
if execute:
|
||||
return ["--execute", execute]
|
||||
else:
|
||||
return [manifest]
|
||||
|
||||
runner = CmdRunner(
|
||||
module,
|
||||
command=_prepare_base_cmd(),
|
||||
path_prefix=_PUPPET_PATH_PREFIX,
|
||||
arg_formats=dict(
|
||||
# ...
|
||||
_execute=cmd_runner_fmt.as_func(execute_func),
|
||||
# ...
|
||||
),
|
||||
)
|
||||
|
||||
Then, in :ansplugin:`community.general.puppet#module` it is put to use with:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
with runner(args_order) as ctx:
|
||||
rc, stdout, stderr = ctx.run(_execute=[p['execute'], p['manifest']])
|
||||
|
||||
- ``cmd_runner_fmt.unpack_kwargs()``
|
||||
Conversely, this decorator unpacks the incoming ``value`` as a ``dict``-like object.
|
||||
|
||||
- ``cmd_runner_fmt.stack()``
|
||||
This decorator assumes ``value`` is a sequence and concatenates the output
|
||||
of the wrapped function applied to each element of the sequence.
|
||||
|
||||
For example, in :ansplugin:`community.general.django_check#module`, the argument format for ``database``
|
||||
is defined as:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
arg_formats = dict(
|
||||
# ...
|
||||
database=cmd_runner_fmt.stack(cmd_runner_fmt.as_opt_val)("--database"),
|
||||
# ...
|
||||
)
|
||||
|
||||
When receiving a list ``["abc", "def"]``, the output is:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
["--database", "abc", "--database", "def"]
|
||||
|
||||
|
||||
Command Runner
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
Settings that can be passed to the ``CmdRunner`` constructor are:
|
||||
|
||||
- ``module: AnsibleModule``
|
||||
Module instance. Mandatory parameter.
|
||||
- ``command: str | list[str]``
|
||||
Command to be executed. It can be a single string, the executable name, or a list
|
||||
of strings containing the executable name as the first element and, optionally, fixed parameters.
|
||||
Those parameters are used in all executions of the runner.
|
||||
The *executable* pointed by this parameter (whether itself when ``str`` or its first element when ``list``) is
|
||||
processed using ``AnsibleModule.get_bin_path()`` *unless* it is an absolute path or contains the character ``/``.
|
||||
- ``arg_formats: dict``
|
||||
Mapping of argument names to formatting functions.
|
||||
- ``default_args_order: str``
|
||||
As the name suggests, a default ordering for the arguments. When
|
||||
this is passed, the context can be created without specifying ``args_order``. Defaults to ``()``.
|
||||
- ``check_rc: bool``
|
||||
When ``True``, if the return code from the command is not zero, the module exits
|
||||
with an error. Defaults to ``False``.
|
||||
- ``path_prefix: list[str]``
|
||||
If the command being executed is installed in a non-standard directory path,
|
||||
additional paths might be provided to search for the executable. Defaults to ``None``.
|
||||
- ``environ_update: dict``
|
||||
Pass additional environment variables to be set during the command execution.
|
||||
Defaults to ``None``.
|
||||
- ``force_lang: str``
|
||||
It is usually important to force the locale to one specific value, so that responses are consistent and, therefore, parseable.
|
||||
Please note that using this option (which is enabled by default) overwrites the environment variables ``LANGUAGE`` and ``LC_ALL``.
|
||||
To disable this mechanism, set this parameter to ``None``.
|
||||
In community.general 9.1.0 a special value ``auto`` was introduced for this parameter, with the effect
|
||||
that ``CmdRunner`` then tries to determine the best parseable locale for the runtime.
|
||||
It should become the default value in the future, but for the time being the default value is ``C``.
|
||||
|
||||
When creating a context, the additional settings that can be passed to the call are:
|
||||
|
||||
- ``args_order: str``
|
||||
Establishes the order in which the arguments are rendered in the command line.
|
||||
This parameter is mandatory unless ``default_args_order`` was provided to the runner instance.
|
||||
- ``output_process: func``
|
||||
Function to transform the output of the executable into different values or formats.
|
||||
See examples in section below.
|
||||
- ``check_mode_skip: bool``
|
||||
Whether to skip the actual execution of the command when the module is in check mode.
|
||||
Defaults to ``False``.
|
||||
- ``check_mode_return: any``
|
||||
If ``check_mode_skip=True``, then return this value instead.
|
||||
- valid named arguments to ``AnsibleModule.run_command()``
|
||||
Other than ``args``, any valid argument to ``run_command()`` can be passed when setting up the run context.
|
||||
For example, ``data`` can be used to send information to the command's standard input.
|
||||
Or ``cwd`` can be used to run the command inside a specific working directory.
|
||||
|
||||
Additionally, any other valid parameters for ``AnsibleModule.run_command()`` may be passed, but unexpected behavior
|
||||
might occur if redefining options already present in the runner or its context creation. Use with caution.
|
||||
|
||||
|
||||
Processing results
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
As mentioned, ``CmdRunner`` uses ``AnsibleModule.run_command()`` to execute the external command,
|
||||
and it passes the return value from that method back to caller. That means that,
|
||||
by default, the result is going to be a tuple ``(rc, stdout, stderr)``.
|
||||
|
||||
If you need to transform or process that output, you can pass a function to the context,
|
||||
as the ``output_process`` parameter. It must be a function like:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
def process(rc, stdout, stderr):
|
||||
# do some magic
|
||||
return processed_value # whatever that is
|
||||
|
||||
In that case, the return of ``run()`` is the ``processed_value`` returned by the function.
|
||||
|
||||
|
||||
PythonRunner
|
||||
^^^^^^^^^^^^
|
||||
|
||||
The ``PythonRunner`` class is a specialized version of ``CmdRunner``, geared towards the execution of
|
||||
Python scripts. It features two extra and mutually exclusive parameters ``python`` and ``venv`` in its constructor:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils._python_runner import PythonRunner
|
||||
from ansible_collections.community.general.plugins.module_utils._cmd_runner import cmd_runner_fmt
|
||||
|
||||
runner = PythonRunner(
|
||||
module,
|
||||
command=["-m", "django"],
|
||||
arg_formats=dict(...),
|
||||
python="python",
|
||||
venv="/path/to/some/venv",
|
||||
)
|
||||
|
||||
The default value for ``python`` is the string ``python``, and the for ``venv`` it is ``None``.
|
||||
|
||||
The command line produced by such a command with ``python="python3.12"`` is something like:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
/usr/bin/python3.12 -m django <arg1> <arg2> ...
|
||||
|
||||
And the command line for ``venv="/work/venv"`` is like:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
/work/venv/bin/python -m django <arg1> <arg2> ...
|
||||
|
||||
You may provide the value of the ``command`` argument as a string (in that case the string is used as a script name)
|
||||
or as a list, in which case the elements of the list must be valid arguments for the Python interpreter, as in the example above.
|
||||
See `Command line and environment <https://docs.python.org/3/using/cmdline.html>`_ for more details.
|
||||
|
||||
If the parameter ``python`` is an absolute path, or contains directory separators, such as ``/``, then it is used
|
||||
as-is, otherwise the runtime ``PATH`` is searched for that command name.
|
||||
|
||||
Other than that, everything else works as in ``CmdRunner``.
|
||||
|
||||
.. versionadded:: 4.8.0
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
.. _ansible_collections.community.general.docsite.guide_deps:
|
||||
|
||||
``deps`` Guide
|
||||
==============
|
||||
|
||||
|
||||
Using ``deps``
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
The ``ansible_collections.community.general.plugins.module_utils._deps`` module util simplifies
|
||||
the importing of code as described in :ref:`Importing and using shared code <shared_code>`.
|
||||
Please notice that ``deps`` is meant to be used specifically with Ansible modules, and not other types of plugins.
|
||||
|
||||
The same example from the Developer Guide would become:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils import _deps as deps
|
||||
|
||||
|
||||
with deps.declare("foo"):
|
||||
import foo
|
||||
|
||||
Then in ``main()``, just after the argspec (or anywhere in the code, for that matter), do
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
deps.validate(module) # assuming module is a valid AnsibleModule instance
|
||||
|
||||
By default, ``deps`` will rely on ``ansible.module_utils.basic.missing_required_lib`` to generate
|
||||
a message about a failing import. That function accepts parameters ``reason`` and ``url``, and
|
||||
and so does ``deps```:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
with deps.declare("foo", reason="foo is needed to properly bar", url="https://foo.bar.io"):
|
||||
import foo
|
||||
|
||||
If you would rather write a custom message instead of using ``missing_required_lib`` then do:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
with deps.declare("foo", msg="Custom msg explaining why foo is needed"):
|
||||
import foo
|
||||
|
||||
``deps`` allows for multiple dependencies to be declared:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
with deps.declare("foo"):
|
||||
import foo
|
||||
|
||||
with deps.declare("bar"):
|
||||
import bar
|
||||
|
||||
with deps.declare("doe"):
|
||||
import doe
|
||||
|
||||
By default, ``deps.validate()`` will check on all the declared dependencies, but if so desired,
|
||||
they can be validated selectively by doing:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
deps.validate(module, "foo") # only validates the "foo" dependency
|
||||
|
||||
deps.validate(module, "doe:bar") # only validates the "doe" and "bar" dependencies
|
||||
|
||||
deps.validate(module, "-doe:bar") # validates all dependencies except "doe" and "bar"
|
||||
|
||||
.. versionadded:: 6.1.0
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
.. _ansible_collections.community.general.docsite.guide_ee:
|
||||
|
||||
Execution Environment Guide
|
||||
===========================
|
||||
|
||||
`Ansible Execution Environments <https://docs.ansible.com/projects/ansible/latest/getting_started_ee/index.html>`_
|
||||
(EEs) are container images that bundle ansible-core, collections, and their Python and system dependencies.
|
||||
They are the standard runtime for Red Hat Ansible Automation Platform and AWX, replacing the older virtualenv model.
|
||||
They can also be used outside of RHAAP and AWX by using `ansible-navigator <https://docs.ansible.com/projects/navigator/>`__, or by using ansible-runner directly.
|
||||
|
||||
What runs in the EE
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Only **controller-side plugins** run inside the EE. Their Python and system dependencies must be installed there.
|
||||
This includes: lookup plugins, inventory plugins, callback plugins, connection plugins, become plugins, and filter plugins.
|
||||
|
||||
Modules run on the managed nodes and are transferred there at runtime — their dependencies must be present on the
|
||||
target, not in the EE.
|
||||
|
||||
.. note::
|
||||
|
||||
Modules delegated to ``localhost`` (for example, those that interact with a remote API) are an exception:
|
||||
they run on the controller and their dependencies must therefore be available in the EE.
|
||||
|
||||
Why community.general does not provide EE metadata
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
``community.general`` ships dozens of controller-side plugins covering a very broad range of technologies.
|
||||
Bundling the dependencies for all of them into a single EE image would almost certainly create irreconcilable
|
||||
conflicts — both within the collection and with other collections or tools (such as ``ansible-lint``) that
|
||||
share the same image.
|
||||
|
||||
For that reason, ``community.general`` does **not** provide Python or system package dependency metadata.
|
||||
Users are expected to build purpose-built, minimal EEs containing only the dependencies
|
||||
required by the specific plugins they actually use.
|
||||
|
||||
Finding the dependencies you need
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Every plugin that has external dependencies documents them in its ``requirements`` field.
|
||||
You can inspect those with ``ansible-doc``:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
$ ansible-doc -t lookup community.general.some_lookup | grep -A 10 "REQUIREMENTS"
|
||||
|
||||
Or browse the plugin's documentation page on `docs.ansible.com <https://docs.ansible.com/ansible/latest/collections/community/general/>`_.
|
||||
|
||||
For example, a lookup plugin that wraps an external service might list:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
requirements:
|
||||
- some-python-library >= 1.2
|
||||
|
||||
An inventory plugin backed by a REST API might list:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
requirements:
|
||||
- requests
|
||||
- some-sdk
|
||||
|
||||
These are the packages you need to add to your EE.
|
||||
|
||||
Building a minimal EE with ansible-builder
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
`ansible-builder <https://docs.ansible.com/projects/builder/en/latest/>`_ is the standard tool for creating EEs.
|
||||
|
||||
Install it with:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
$ pip install ansible-builder
|
||||
|
||||
Create an ``execution-environment.yml`` **in your own project** — not inside ``community.general`` —
|
||||
that includes only the dependencies needed for the plugins you use:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
version: 3
|
||||
|
||||
dependencies:
|
||||
galaxy:
|
||||
collections:
|
||||
- name: community.general
|
||||
python:
|
||||
- some-python-library>=1.2
|
||||
- requests
|
||||
system:
|
||||
- libxml2-devel [platform:rpm]
|
||||
|
||||
images:
|
||||
base_image:
|
||||
name: ghcr.io/ansible/community-ee-base:latest
|
||||
|
||||
Then build the image:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
$ ansible-builder build -t my-custom-ee:latest
|
||||
|
||||
.. seealso::
|
||||
|
||||
- `ansible-builder documentation <https://docs.ansible.com/projects/builder/en/latest/>`_
|
||||
- `Building EEs with ansible-builder <https://ansible-builder.readthedocs.io/en/latest/definition/>`_
|
||||
- `Issue #2968 — original request for EE requirements support <https://github.com/ansible-collections/community.general/issues/2968>`_
|
||||
- `Issue #4512 — design discussion for EE support in community.general <https://github.com/ansible-collections/community.general/issues/4512>`_
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
.. _ansible_collections.community.general.docsite.guide_iocage:
|
||||
|
||||
************
|
||||
Iocage Guide
|
||||
************
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
guide_iocage_inventory
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
.. _ansible_collections.community.general.docsite.guide_iocage.guide_iocage_inventory:
|
||||
|
||||
community.general.iocage inventory plugin
|
||||
=========================================
|
||||
|
||||
The inventory plugin :ansplugin:`community.general.iocage#inventory` gets the inventory hosts from the iocage jail manager.
|
||||
|
||||
See:
|
||||
|
||||
* `iocage - A FreeBSD Jail Manager <https://freebsd.github.io/iocage/>`_
|
||||
* `man iocage <https://man.freebsd.org/cgi/man.cgi?query=iocage>`_
|
||||
* `Jails and Containers <https://docs.freebsd.org/en/books/handbook/jails>`_
|
||||
|
||||
.. note::
|
||||
The output of the examples is YAML formatted. See the option :ansopt:`ansible.builtin.default#callback:result_format`.
|
||||
|
||||
.. toctree::
|
||||
:caption: Table of Contents
|
||||
:maxdepth: 1
|
||||
|
||||
guide_iocage_inventory_basics
|
||||
guide_iocage_inventory_dhcp
|
||||
guide_iocage_inventory_hooks
|
||||
guide_iocage_inventory_properties
|
||||
guide_iocage_inventory_tags
|
||||
guide_iocage_inventory_aliases
|
||||
+200
@@ -0,0 +1,200 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
.. _ansible_collections.community.general.docsite.guide_iocage.guide_iocage_inventory.guide_iocage_inventory_aliases:
|
||||
|
||||
Aliases
|
||||
-------
|
||||
|
||||
Quoting :ref:`inventory_aliases`:
|
||||
|
||||
The ``inventory_hostname`` is the unique identifier for a host in Ansible, this can be an IP or a hostname, but also just an 'alias' or short name for the host.
|
||||
|
||||
As root at the iocage host, stop and destroy all jails:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
shell> iocage stop ALL
|
||||
* Stopping srv_1
|
||||
+ Executing prestop OK
|
||||
+ Stopping services OK
|
||||
+ Tearing down VNET OK
|
||||
+ Removing devfs_ruleset: 1000 OK
|
||||
+ Removing jail process OK
|
||||
+ Executing poststop OK
|
||||
* Stopping srv_2
|
||||
+ Executing prestop OK
|
||||
+ Stopping services OK
|
||||
+ Tearing down VNET OK
|
||||
+ Removing devfs_ruleset: 1001 OK
|
||||
+ Removing jail process OK
|
||||
+ Executing poststop OK
|
||||
* Stopping srv_3
|
||||
+ Executing prestop OK
|
||||
+ Stopping services OK
|
||||
+ Tearing down VNET OK
|
||||
+ Removing devfs_ruleset: 1002 OK
|
||||
+ Removing jail process OK
|
||||
+ Executing poststop OK
|
||||
ansible_client is not running!
|
||||
|
||||
shell> iocage destroy -f srv_1 srv_2 srv_3
|
||||
Destroying srv_1
|
||||
Destroying srv_2
|
||||
Destroying srv_3
|
||||
|
||||
Create three VNET jails with a DHCP interface from the template *ansible_client*. Use the option ``--count``:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
shell> iocage create --short --template ansible_client --count 3 bpf=1 dhcp=1 vnet=1
|
||||
1c11de2d successfully created!
|
||||
9d94cc9e successfully created!
|
||||
052b9557 successfully created!
|
||||
|
||||
The names are random. Start the jails:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
shell> iocage start ALL
|
||||
No default gateway found for ipv6.
|
||||
* Starting 052b9557
|
||||
+ Started OK
|
||||
+ Using devfs_ruleset: 1000 (iocage generated default)
|
||||
+ Configuring VNET OK
|
||||
+ Using IP options: vnet
|
||||
+ Starting services OK
|
||||
+ Executing poststart OK
|
||||
+ DHCP Address: 10.1.0.137/24
|
||||
No default gateway found for ipv6.
|
||||
* Starting 1c11de2d
|
||||
+ Started OK
|
||||
+ Using devfs_ruleset: 1001 (iocage generated default)
|
||||
+ Configuring VNET OK
|
||||
+ Using IP options: vnet
|
||||
+ Starting services OK
|
||||
+ Executing poststart OK
|
||||
+ DHCP Address: 10.1.0.146/24
|
||||
No default gateway found for ipv6.
|
||||
* Starting 9d94cc9e
|
||||
+ Started OK
|
||||
+ Using devfs_ruleset: 1002 (iocage generated default)
|
||||
+ Configuring VNET OK
|
||||
+ Using IP options: vnet
|
||||
+ Starting services OK
|
||||
+ Executing poststart OK
|
||||
+ DHCP Address: 10.1.0.115/24
|
||||
Please convert back to a jail before trying to start ansible_client
|
||||
|
||||
List the jails:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
shell> iocage list -l
|
||||
+-----+----------+------+-------+------+-----------------+--------------------+-----+----------------+----------+
|
||||
| JID | NAME | BOOT | STATE | TYPE | RELEASE | IP4 | IP6 | TEMPLATE | BASEJAIL |
|
||||
+=====+==========+======+=======+======+=================+====================+=====+================+==========+
|
||||
| 207 | 052b9557 | off | up | jail | 14.2-RELEASE-p3 | epair0b|10.1.0.137 | - | ansible_client | no |
|
||||
+-----+----------+------+-------+------+-----------------+--------------------+-----+----------------+----------+
|
||||
| 208 | 1c11de2d | off | up | jail | 14.2-RELEASE-p3 | epair0b|10.1.0.146 | - | ansible_client | no |
|
||||
+-----+----------+------+-------+------+-----------------+--------------------+-----+----------------+----------+
|
||||
| 209 | 9d94cc9e | off | up | jail | 14.2-RELEASE-p3 | epair0b|10.1.0.115 | - | ansible_client | no |
|
||||
+-----+----------+------+-------+------+-----------------+--------------------+-----+----------------+----------+
|
||||
|
||||
Set notes. The tag *alias* will be used to create inventory aliases:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
shell> iocage set notes="vmm=iocage_02 project=foo alias=srv_1" 052b9557
|
||||
notes: none -> vmm=iocage_02 project=foo alias=srv_1
|
||||
shell> iocage set notes="vmm=iocage_02 project=foo alias=srv_2" 1c11de2d
|
||||
notes: none -> vmm=iocage_02 project=foo alias=srv_2
|
||||
shell> iocage set notes="vmm=iocage_02 project=bar alias=srv_3" 9d94cc9e
|
||||
notes: none -> vmm=iocage_02 project=bar alias=srv_3
|
||||
|
||||
Update the inventory configuration. Set the option
|
||||
:ansopt:`community.general.iocage#inventory:inventory_hostname_tag` to :ansval:`alias`. This tag keeps the
|
||||
value of the alias. The option :ansopt:`community.general.iocage#inventory:get_properties` must be
|
||||
enabled. For example, ``hosts/02_iocage.yml`` contains:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
plugin: community.general.iocage
|
||||
host: 10.1.0.73
|
||||
user: admin
|
||||
get_properties: true
|
||||
inventory_hostname_tag: alias
|
||||
hooks_results:
|
||||
- /var/db/dhclient-hook.address.epair0b
|
||||
compose:
|
||||
ansible_host: (iocage_hooks.0 == '-') | ternary(iocage_ip4, iocage_hooks.0)
|
||||
iocage_tags: dict(iocage_properties.notes | split | map('split', '='))
|
||||
keyed_groups:
|
||||
- prefix: vmm
|
||||
key: iocage_tags.vmm
|
||||
- prefix: project
|
||||
key: iocage_tags.project
|
||||
|
||||
Display tags and groups. Create a playbook ``pb-test-groups.yml`` with the following content:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- hosts: all
|
||||
remote_user: admin
|
||||
|
||||
vars:
|
||||
|
||||
ansible_python_interpreter: auto_silent
|
||||
|
||||
tasks:
|
||||
|
||||
- debug:
|
||||
var: iocage_tags
|
||||
|
||||
- debug:
|
||||
msg: |
|
||||
{% for group in groups %}
|
||||
{{ group }}: {{ groups[group] }}
|
||||
{% endfor %}
|
||||
run_once: true
|
||||
|
||||
Run the playbook:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
shell> ansible-playbook -i hosts/02_iocage.yml pb-test-groups.yml
|
||||
|
||||
PLAY [all] **********************************************************************************************************
|
||||
|
||||
TASK [debug] ********************************************************************************************************
|
||||
ok: [srv_1] =>
|
||||
iocage_tags:
|
||||
alias: srv_1
|
||||
project: foo
|
||||
vmm: iocage_02
|
||||
ok: [srv_2] =>
|
||||
iocage_tags:
|
||||
alias: srv_2
|
||||
project: foo
|
||||
vmm: iocage_02
|
||||
ok: [srv_3] =>
|
||||
iocage_tags:
|
||||
alias: srv_3
|
||||
project: bar
|
||||
vmm: iocage_02
|
||||
|
||||
TASK [debug] ********************************************************************************************************
|
||||
ok: [srv_1] =>
|
||||
msg: |-
|
||||
all: ['srv_1', 'srv_2', 'srv_3']
|
||||
ungrouped: []
|
||||
vmm_iocage_02: ['srv_1', 'srv_2', 'srv_3']
|
||||
project_foo: ['srv_1', 'srv_2']
|
||||
project_bar: ['srv_3']
|
||||
|
||||
PLAY RECAP **********************************************************************************************************
|
||||
srv_1 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
|
||||
srv_2 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
|
||||
srv_3 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
.. _ansible_collections.community.general.docsite.guide_iocage.guide_iocage_inventory.guide_iocage_inventory_basics:
|
||||
|
||||
Basics
|
||||
------
|
||||
|
||||
As root at the iocage host, create three VNET jails with a DHCP interface from the template
|
||||
*ansible_client*:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
shell> iocage create --template ansible_client --name srv_1 bpf=1 dhcp=1 vnet=1
|
||||
srv_1 successfully created!
|
||||
shell> iocage create --template ansible_client --name srv_2 bpf=1 dhcp=1 vnet=1
|
||||
srv_2 successfully created!
|
||||
shell> iocage create --template ansible_client --name srv_3 bpf=1 dhcp=1 vnet=1
|
||||
srv_3 successfully created!
|
||||
|
||||
See: `Configuring VNET <https://freebsd.github.io/iocage/networking.html#vimage-vnet>`_.
|
||||
|
||||
As admin at the controller, list the jails:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
shell> ssh admin@10.1.0.73 iocage list -l
|
||||
+------+-------+------+-------+------+-----------------+--------------------+-----+----------------+----------+
|
||||
| JID | NAME | BOOT | STATE | TYPE | RELEASE | IP4 | IP6 | TEMPLATE | BASEJAIL |
|
||||
+======+=======+======+=======+======+=================+====================+=====+================+==========+
|
||||
| None | srv_1 | off | down | jail | 14.2-RELEASE-p3 | DHCP (not running) | - | ansible_client | no |
|
||||
+------+-------+------+-------+------+-----------------+--------------------+-----+----------------+----------+
|
||||
| None | srv_2 | off | down | jail | 14.2-RELEASE-p3 | DHCP (not running) | - | ansible_client | no |
|
||||
+------+-------+------+-------+------+-----------------+--------------------+-----+----------------+----------+
|
||||
| None | srv_3 | off | down | jail | 14.2-RELEASE-p3 | DHCP (not running) | - | ansible_client | no |
|
||||
+------+-------+------+-------+------+-----------------+--------------------+-----+----------------+----------+
|
||||
|
||||
Create the inventory file ``hosts/02_iocage.yml``
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
plugin: community.general.iocage
|
||||
host: 10.1.0.73
|
||||
user: admin
|
||||
|
||||
Display the inventory:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
shell> ansible-inventory -i hosts/02_iocage.yml --list --yaml
|
||||
all:
|
||||
children:
|
||||
ungrouped:
|
||||
hosts:
|
||||
srv_1:
|
||||
iocage_basejail: 'no'
|
||||
iocage_boot: 'off'
|
||||
iocage_ip4: '-'
|
||||
iocage_ip4_dict:
|
||||
ip4: []
|
||||
msg: DHCP (not running)
|
||||
iocage_ip6: '-'
|
||||
iocage_jid: None
|
||||
iocage_release: 14.2-RELEASE-p3
|
||||
iocage_state: down
|
||||
iocage_template: ansible_client
|
||||
iocage_type: jail
|
||||
srv_2:
|
||||
iocage_basejail: 'no'
|
||||
iocage_boot: 'off'
|
||||
iocage_ip4: '-'
|
||||
iocage_ip4_dict:
|
||||
ip4: []
|
||||
msg: DHCP (not running)
|
||||
iocage_ip6: '-'
|
||||
iocage_jid: None
|
||||
iocage_release: 14.2-RELEASE-p3
|
||||
iocage_state: down
|
||||
iocage_template: ansible_client
|
||||
iocage_type: jail
|
||||
srv_3:
|
||||
iocage_basejail: 'no'
|
||||
iocage_boot: 'off'
|
||||
iocage_ip4: '-'
|
||||
iocage_ip4_dict:
|
||||
ip4: []
|
||||
msg: DHCP (not running)
|
||||
iocage_ip6: '-'
|
||||
iocage_jid: None
|
||||
iocage_release: 14.2-RELEASE-p3
|
||||
iocage_state: down
|
||||
iocage_template: ansible_client
|
||||
iocage_type: jail
|
||||
|
||||
Optionally, create shared IP jails:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
shell> iocage create --template ansible_client --name srv_1 ip4_addr="em0|10.1.0.101/24"
|
||||
srv_1 successfully created!
|
||||
shell> iocage create --template ansible_client --name srv_2 ip4_addr="em0|10.1.0.102/24"
|
||||
srv_2 successfully created!
|
||||
shell> iocage create --template ansible_client --name srv_3 ip4_addr="em0|10.1.0.103/24"
|
||||
srv_3 successfully created!
|
||||
shell> iocage list -l
|
||||
+------+-------+------+-------+------+-----------------+-------------------+-----+----------------+----------+
|
||||
| JID | NAME | BOOT | STATE | TYPE | RELEASE | IP4 | IP6 | TEMPLATE | BASEJAIL |
|
||||
+======+=======+======+=======+======+=================+===================+=====+================+==========+
|
||||
| None | srv_1 | off | down | jail | 14.2-RELEASE-p3 | em0|10.1.0.101/24 | - | ansible_client | no |
|
||||
+------+-------+------+-------+------+-----------------+-------------------+-----+----------------+----------+
|
||||
| None | srv_2 | off | down | jail | 14.2-RELEASE-p3 | em0|10.1.0.102/24 | - | ansible_client | no |
|
||||
+------+-------+------+-------+------+-----------------+-------------------+-----+----------------+----------+
|
||||
| None | srv_3 | off | down | jail | 14.2-RELEASE-p3 | em0|10.1.0.103/24 | - | ansible_client | no |
|
||||
+------+-------+------+-------+------+-----------------+-------------------+-----+----------------+----------+
|
||||
|
||||
See: `Configuring a Shared IP Jail <https://freebsd.github.io/iocage/networking.html#shared-ip>`_
|
||||
|
||||
If iocage needs environment variable(s), use the option :ansopt:`community.general.iocage#inventory:env`. For example,
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
plugin: community.general.iocage
|
||||
host: 10.1.0.73
|
||||
user: admin
|
||||
env:
|
||||
CRYPTOGRAPHY_OPENSSL_NO_LEGACY: 1
|
||||
+175
@@ -0,0 +1,175 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
.. _ansible_collections.community.general.docsite.guide_iocage.guide_iocage_inventory.guide_iocage_inventory_dhcp:
|
||||
|
||||
DHCP
|
||||
----
|
||||
|
||||
As root at the iocage host, start the jails:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
shell> iocage start ALL
|
||||
No default gateway found for ipv6.
|
||||
* Starting srv_1
|
||||
+ Started OK
|
||||
+ Using devfs_ruleset: 1000 (iocage generated default)
|
||||
+ Configuring VNET OK
|
||||
+ Using IP options: vnet
|
||||
+ Starting services OK
|
||||
+ Executing poststart OK
|
||||
+ DHCP Address: 10.1.0.183/24
|
||||
No default gateway found for ipv6.
|
||||
* Starting srv_2
|
||||
+ Started OK
|
||||
+ Using devfs_ruleset: 1001 (iocage generated default)
|
||||
+ Configuring VNET OK
|
||||
+ Using IP options: vnet
|
||||
+ Starting services OK
|
||||
+ Executing poststart OK
|
||||
+ DHCP Address: 10.1.0.204/24
|
||||
No default gateway found for ipv6.
|
||||
* Starting srv_3
|
||||
+ Started OK
|
||||
+ Using devfs_ruleset: 1002 (iocage generated default)
|
||||
+ Configuring VNET OK
|
||||
+ Using IP options: vnet
|
||||
+ Starting services OK
|
||||
+ Executing poststart OK
|
||||
+ DHCP Address: 10.1.0.169/24
|
||||
Please convert back to a jail before trying to start ansible_client
|
||||
|
||||
List the jails:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
shell> iocage list -l
|
||||
+-----+-------+------+-------+------+-----------------+--------------------+-----+----------------+----------+
|
||||
| JID | NAME | BOOT | STATE | TYPE | RELEASE | IP4 | IP6 | TEMPLATE | BASEJAIL |
|
||||
+=====+=======+======+=======+======+=================+====================+=====+================+==========+
|
||||
| 204 | srv_1 | off | up | jail | 14.2-RELEASE-p3 | epair0b|10.1.0.183 | - | ansible_client | no |
|
||||
+-----+-------+------+-------+------+-----------------+--------------------+-----+----------------+----------+
|
||||
| 205 | srv_2 | off | up | jail | 14.2-RELEASE-p3 | epair0b|10.1.0.204 | - | ansible_client | no |
|
||||
+-----+-------+------+-------+------+-----------------+--------------------+-----+----------------+----------+
|
||||
| 206 | srv_3 | off | up | jail | 14.2-RELEASE-p3 | epair0b|10.1.0.169 | - | ansible_client | no |
|
||||
+-----+-------+------+-------+------+-----------------+--------------------+-----+----------------+----------+
|
||||
|
||||
As admin at the controller, list the jails. The IP4 tab says "... address requires root":
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
shell> ssh admin@10.1.0.73 iocage list -l
|
||||
+-----+-------+------+-------+------+-----------------+-----------------------------------------+-----+----------------+----------+
|
||||
| JID | NAME | BOOT | STATE | TYPE | RELEASE | IP4 | IP6 | TEMPLATE | BASEJAIL |
|
||||
+=====+=======+======+=======+======+=================+=========================================+=====+================+==========+
|
||||
| 204 | srv_1 | off | up | jail | 14.2-RELEASE-p3 | DHCP (running -- address requires root) | - | ansible_client | no |
|
||||
+-----+-------+------+-------+------+-----------------+-----------------------------------------+-----+----------------+----------+
|
||||
| 205 | srv_2 | off | up | jail | 14.2-RELEASE-p3 | DHCP (running -- address requires root) | - | ansible_client | no |
|
||||
+-----+-------+------+-------+------+-----------------+-----------------------------------------+-----+----------------+----------+
|
||||
| 206 | srv_3 | off | up | jail | 14.2-RELEASE-p3 | DHCP (running -- address requires root) | - | ansible_client | no |
|
||||
+-----+-------+------+-------+------+-----------------+-----------------------------------------+-----+----------------+----------+
|
||||
|
||||
Use sudo if enabled:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
shell> ssh admin@10.1.0.73 sudo iocage list -l
|
||||
+-----+-------+------+-------+------+-----------------+--------------------+-----+----------------+----------+
|
||||
| JID | NAME | BOOT | STATE | TYPE | RELEASE | IP4 | IP6 | TEMPLATE | BASEJAIL |
|
||||
+=====+=======+======+=======+======+=================+====================+=====+================+==========+
|
||||
| 204 | srv_1 | off | up | jail | 14.2-RELEASE-p3 | epair0b|10.1.0.183 | - | ansible_client | no |
|
||||
+-----+-------+------+-------+------+-----------------+--------------------+-----+----------------+----------+
|
||||
| 205 | srv_2 | off | up | jail | 14.2-RELEASE-p3 | epair0b|10.1.0.204 | - | ansible_client | no |
|
||||
+-----+-------+------+-------+------+-----------------+--------------------+-----+----------------+----------+
|
||||
| 206 | srv_3 | off | up | jail | 14.2-RELEASE-p3 | epair0b|10.1.0.169 | - | ansible_client | no |
|
||||
+-----+-------+------+-------+------+-----------------+--------------------+-----+----------------+----------+
|
||||
|
||||
Create the inventory file ``hosts/02_iocage.yml``. Use the option
|
||||
:ansopt:`community.general.iocage#inventory:sudo`:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
plugin: community.general.iocage
|
||||
host: 10.1.0.73
|
||||
user: admin
|
||||
sudo: true
|
||||
|
||||
Display the inventory:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
shell> ansible-inventory -i hosts/02_iocage.yml --list --yaml
|
||||
all:
|
||||
children:
|
||||
ungrouped:
|
||||
hosts:
|
||||
srv_1:
|
||||
iocage_basejail: 'no'
|
||||
iocage_boot: 'off'
|
||||
iocage_ip4: 10.1.0.183
|
||||
iocage_ip4_dict:
|
||||
ip4:
|
||||
- ifc: epair0b
|
||||
ip: 10.1.0.183
|
||||
mask: '-'
|
||||
msg: ''
|
||||
iocage_ip6: '-'
|
||||
iocage_jid: '204'
|
||||
iocage_release: 14.2-RELEASE-p3
|
||||
iocage_state: up
|
||||
iocage_template: ansible_client
|
||||
iocage_type: jail
|
||||
srv_2:
|
||||
iocage_basejail: 'no'
|
||||
iocage_boot: 'off'
|
||||
iocage_ip4: 10.1.0.204
|
||||
iocage_ip4_dict:
|
||||
ip4:
|
||||
- ifc: epair0b
|
||||
ip: 10.1.0.204
|
||||
mask: '-'
|
||||
msg: ''
|
||||
iocage_ip6: '-'
|
||||
iocage_jid: '205'
|
||||
iocage_release: 14.2-RELEASE-p3
|
||||
iocage_state: up
|
||||
iocage_template: ansible_client
|
||||
iocage_type: jail
|
||||
srv_3:
|
||||
iocage_basejail: 'no'
|
||||
iocage_boot: 'off'
|
||||
iocage_ip4: 10.1.0.169
|
||||
iocage_ip4_dict:
|
||||
ip4:
|
||||
- ifc: epair0b
|
||||
ip: 10.1.0.169
|
||||
mask: '-'
|
||||
msg: ''
|
||||
iocage_ip6: '-'
|
||||
iocage_jid: '206'
|
||||
iocage_release: 14.2-RELEASE-p3
|
||||
iocage_state: up
|
||||
iocage_template: ansible_client
|
||||
iocage_type: jail
|
||||
|
||||
Note: If the option :ansopt:`community.general.iocage#inventory:env` is used and :ansopt:`community.general.iocage#inventory:sudo` is enabled, enable also :ansopt:`community.general.iocage#inventory:sudo_preserve_env`. For example,
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
plugin: community.general.iocage
|
||||
host: 10.1.0.73
|
||||
user: admin
|
||||
env:
|
||||
CRYPTOGRAPHY_OPENSSL_NO_LEGACY: 1
|
||||
sudo: true
|
||||
sudo_preserve_env: true
|
||||
|
||||
In this case, make sure the sudo tag ``SETENV`` is used:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
shell> ssh admin@10.1.0.73 sudo cat /usr/local/etc/sudoers | grep admin
|
||||
admin ALL=(ALL) NOPASSWD:SETENV: ALL
|
||||
+187
@@ -0,0 +1,187 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
.. _ansible_collections.community.general.docsite.guide_iocage.guide_iocage_inventory.guide_iocage_inventory_hooks:
|
||||
|
||||
Hooks
|
||||
-----
|
||||
|
||||
The iocage utility internally opens a console to a jail to get the jail's DHCP address. This
|
||||
requires root. If you run the command ``iocage list -l`` as unprivileged user, you'll see the
|
||||
message ``DHCP (running -- address requires root)``. If you are not granted the root privilege, use
|
||||
``/etc/dhclient-exit-hooks``. For example, in the jail *srv_1*, create the file
|
||||
``/zroot/iocage/jails/srv_1/root/etc/dhclient-exit-hooks``
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
case "$reason" in
|
||||
"BOUND"|"REBIND"|"REBOOT"|"RENEW")
|
||||
echo $new_ip_address > /var/db/dhclient-hook.address.$interface
|
||||
;;
|
||||
esac
|
||||
|
||||
where ``/zroot/iocage`` is the activated pool.
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
shell> zfs list | grep /zroot/iocage
|
||||
zroot/iocage 4.69G 446G 5.08M /zroot/iocage
|
||||
zroot/iocage/download 927M 446G 384K /zroot/iocage/download
|
||||
zroot/iocage/download/14.1-RELEASE 465M 446G 465M /zroot/iocage/download/14.1-RELEASE
|
||||
zroot/iocage/download/14.2-RELEASE 462M 446G 462M /zroot/iocage/download/14.2-RELEASE
|
||||
zroot/iocage/images 384K 446G 384K /zroot/iocage/images
|
||||
zroot/iocage/jails 189M 446G 480K /zroot/iocage/jails
|
||||
zroot/iocage/jails/srv_1 62.9M 446G 464K /zroot/iocage/jails/srv_1
|
||||
zroot/iocage/jails/srv_1/root 62.4M 446G 3.53G /zroot/iocage/jails/srv_1/root
|
||||
zroot/iocage/jails/srv_2 62.8M 446G 464K /zroot/iocage/jails/srv_2
|
||||
zroot/iocage/jails/srv_2/root 62.3M 446G 3.53G /zroot/iocage/jails/srv_2/root
|
||||
zroot/iocage/jails/srv_3 62.8M 446G 464K /zroot/iocage/jails/srv_3
|
||||
zroot/iocage/jails/srv_3/root 62.3M 446G 3.53G /zroot/iocage/jails/srv_3/root
|
||||
zroot/iocage/log 688K 446G 688K /zroot/iocage/log
|
||||
zroot/iocage/releases 2.93G 446G 384K /zroot/iocage/releases
|
||||
zroot/iocage/releases/14.2-RELEASE 2.93G 446G 384K /zroot/iocage/releases/14.2-RELEASE
|
||||
zroot/iocage/releases/14.2-RELEASE/root 2.93G 446G 2.88G /zroot/iocage/releases/14.2-RELEASE/root
|
||||
zroot/iocage/templates 682M 446G 416K /zroot/iocage/templates
|
||||
zroot/iocage/templates/ansible_client 681M 446G 432K /zroot/iocage/templates/ansible_client
|
||||
zroot/iocage/templates/ansible_client/root 681M 446G 3.53G /zroot/iocage/templates/ansible_client/root
|
||||
|
||||
See: `man dhclient-script <https://man.freebsd.org/cgi/man.cgi?dhclient-script>`_
|
||||
|
||||
Create the inventory configuration. Use the option :ansopt:`community.general.iocage#inventory:hooks_results` instead of :ansopt:`community.general.iocage#inventory:sudo`:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
shell> cat hosts/02_iocage.yml
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
plugin: community.general.iocage
|
||||
host: 10.1.0.73
|
||||
user: admin
|
||||
hooks_results:
|
||||
- /var/db/dhclient-hook.address.epair0b
|
||||
|
||||
.. note::
|
||||
|
||||
The option :ansopt:`community.general.iocage#inventory:hooks_results` expects the poolname to be mounted to ``/poolname``. For example, if you
|
||||
activate the pool iocage, this plugin expects to find the :ansopt:`community.general.iocage#inventory:hooks_results` items in the path
|
||||
/iocage/iocage/jails/<name>/root. If you mount the poolname to a different path, the easiest
|
||||
remedy is to create a symlink.
|
||||
|
||||
As admin at the controller, display the inventory:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
shell> ansible-inventory -i hosts/02_iocage.yml --list --yaml
|
||||
all:
|
||||
children:
|
||||
ungrouped:
|
||||
hosts:
|
||||
srv_1:
|
||||
iocage_basejail: 'no'
|
||||
iocage_boot: 'off'
|
||||
iocage_hooks:
|
||||
- 10.1.0.183
|
||||
iocage_ip4: '-'
|
||||
iocage_ip4_dict:
|
||||
ip4: []
|
||||
msg: DHCP (running -- address requires root)
|
||||
iocage_ip6: '-'
|
||||
iocage_jid: '204'
|
||||
iocage_release: 14.2-RELEASE-p3
|
||||
iocage_state: up
|
||||
iocage_template: ansible_client
|
||||
iocage_type: jail
|
||||
srv_2:
|
||||
iocage_basejail: 'no'
|
||||
iocage_boot: 'off'
|
||||
iocage_hooks:
|
||||
- 10.1.0.204
|
||||
iocage_ip4: '-'
|
||||
iocage_ip4_dict:
|
||||
ip4: []
|
||||
msg: DHCP (running -- address requires root)
|
||||
iocage_ip6: '-'
|
||||
iocage_jid: '205'
|
||||
iocage_release: 14.2-RELEASE-p3
|
||||
iocage_state: up
|
||||
iocage_template: ansible_client
|
||||
iocage_type: jail
|
||||
srv_3:
|
||||
iocage_basejail: 'no'
|
||||
iocage_boot: 'off'
|
||||
iocage_hooks:
|
||||
- 10.1.0.169
|
||||
iocage_ip4: '-'
|
||||
iocage_ip4_dict:
|
||||
ip4: []
|
||||
msg: DHCP (running -- address requires root)
|
||||
iocage_ip6: '-'
|
||||
iocage_jid: '206'
|
||||
iocage_release: 14.2-RELEASE-p3
|
||||
iocage_state: up
|
||||
iocage_template: ansible_client
|
||||
iocage_type: jail
|
||||
|
||||
Compose the variable ``ansible_host``. For example, ``hosts/02_iocage.yml`` could look like:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
plugin: community.general.iocage
|
||||
host: 10.1.0.73
|
||||
user: admin
|
||||
hooks_results:
|
||||
- /var/db/dhclient-hook.address.epair0b
|
||||
compose:
|
||||
ansible_host: (iocage_hooks.0 == '-') | ternary(iocage_ip4, iocage_hooks.0)
|
||||
|
||||
Test the jails. Create a playbook ``pb-test-uname.yml``:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
- hosts: all
|
||||
remote_user: admin
|
||||
|
||||
vars:
|
||||
|
||||
ansible_python_interpreter: auto_silent
|
||||
|
||||
tasks:
|
||||
|
||||
- command: uname -a
|
||||
register: out
|
||||
|
||||
- debug:
|
||||
var: out.stdout
|
||||
|
||||
See: :ref:`working_with_bsd`
|
||||
|
||||
Run the playbook:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
shell> ansible-playbook -i hosts/02_iocage.yml pb-test-uname.yml
|
||||
|
||||
PLAY [all] **********************************************************************************************************
|
||||
|
||||
TASK [command] ******************************************************************************************************
|
||||
changed: [srv_3]
|
||||
changed: [srv_1]
|
||||
changed: [srv_2]
|
||||
|
||||
TASK [debug] ********************************************************************************************************
|
||||
ok: [srv_1] =>
|
||||
out.stdout: FreeBSD srv-1 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC amd64
|
||||
ok: [srv_3] =>
|
||||
out.stdout: FreeBSD srv-3 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC amd64
|
||||
ok: [srv_2] =>
|
||||
out.stdout: FreeBSD srv-2 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC amd64
|
||||
|
||||
PLAY RECAP **********************************************************************************************************
|
||||
srv_1 : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
|
||||
srv_2 : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
|
||||
srv_3 : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
|
||||
|
||||
Note: This playbook and the inventory configuration works also for the *Shared IP Jails*.
|
||||
+201
@@ -0,0 +1,201 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
.. _ansible_collections.community.general.docsite.guide_iocage.guide_iocage_inventory.guide_iocage_inventory_properties:
|
||||
|
||||
Properties
|
||||
----------
|
||||
|
||||
Optionally, in the inventory file ``hosts/02_iocage.yml``, get the iocage properties. Enable
|
||||
:ansopt:`community.general.iocage#inventory:get_properties`:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
plugin: community.general.iocage
|
||||
host: 10.1.0.73
|
||||
user: admin
|
||||
get_properties: true
|
||||
hooks_results:
|
||||
- /var/db/dhclient-hook.address.epair0b
|
||||
compose:
|
||||
ansible_host: (iocage_hooks.0 == '-') | ternary(iocage_ip4, iocage_hooks.0)
|
||||
|
||||
Display the properties. Create the playbook ``pb-test-properties.yml``:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
- hosts: all
|
||||
remote_user: admin
|
||||
|
||||
vars:
|
||||
|
||||
ansible_python_interpreter: auto_silent
|
||||
|
||||
tasks:
|
||||
|
||||
- debug:
|
||||
var: iocage_properties
|
||||
|
||||
Run the playbook. Limit the inventory to *srv_3*:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
shell> ansible-playbook -i hosts/02_iocage.yml -l srv_3 pb-test-properties.yml
|
||||
|
||||
PLAY [all] **********************************************************************************************************
|
||||
|
||||
TASK [debug] ********************************************************************************************************
|
||||
ok: [srv_3] =>
|
||||
iocage_properties:
|
||||
CONFIG_VERSION: '33'
|
||||
allow_chflags: '0'
|
||||
allow_mlock: '0'
|
||||
allow_mount: '1'
|
||||
allow_mount_devfs: '0'
|
||||
allow_mount_fdescfs: '0'
|
||||
allow_mount_fusefs: '0'
|
||||
allow_mount_linprocfs: '0'
|
||||
allow_mount_linsysfs: '0'
|
||||
allow_mount_nullfs: '0'
|
||||
allow_mount_procfs: '0'
|
||||
allow_mount_tmpfs: '0'
|
||||
allow_mount_zfs: '0'
|
||||
allow_nfsd: '0'
|
||||
allow_quotas: '0'
|
||||
allow_raw_sockets: '0'
|
||||
allow_set_hostname: '1'
|
||||
allow_socket_af: '0'
|
||||
allow_sysvipc: '0'
|
||||
allow_tun: '0'
|
||||
allow_vmm: '0'
|
||||
assign_localhost: '0'
|
||||
available: readonly
|
||||
basejail: '0'
|
||||
boot: '0'
|
||||
bpf: '1'
|
||||
children_max: '0'
|
||||
cloned_release: 14.2-RELEASE
|
||||
comment: none
|
||||
compression: 'on'
|
||||
compressratio: readonly
|
||||
coredumpsize: 'off'
|
||||
count: '1'
|
||||
cpuset: 'off'
|
||||
cputime: 'off'
|
||||
datasize: 'off'
|
||||
dedup: 'off'
|
||||
defaultrouter: auto
|
||||
defaultrouter6: auto
|
||||
depends: none
|
||||
devfs_ruleset: '4'
|
||||
dhcp: '1'
|
||||
enforce_statfs: '2'
|
||||
exec_clean: '1'
|
||||
exec_created: /usr/bin/true
|
||||
exec_fib: '0'
|
||||
exec_jail_user: root
|
||||
exec_poststart: /usr/bin/true
|
||||
exec_poststop: /usr/bin/true
|
||||
exec_prestart: /usr/bin/true
|
||||
exec_prestop: /usr/bin/true
|
||||
exec_start: /bin/sh /etc/rc
|
||||
exec_stop: /bin/sh /etc/rc.shutdown
|
||||
exec_system_jail_user: '0'
|
||||
exec_system_user: root
|
||||
exec_timeout: '60'
|
||||
host_domainname: none
|
||||
host_hostname: srv-3
|
||||
host_hostuuid: srv_3
|
||||
host_time: '1'
|
||||
hostid: ea2ba7d1-4fcd-f13f-82e4-8b32c0a03403
|
||||
hostid_strict_check: '0'
|
||||
interfaces: vnet0:bridge0
|
||||
ip4: new
|
||||
ip4_addr: none
|
||||
ip4_saddrsel: '1'
|
||||
ip6: new
|
||||
ip6_addr: none
|
||||
ip6_saddrsel: '1'
|
||||
ip_hostname: '0'
|
||||
jail_zfs: '0'
|
||||
jail_zfs_dataset: iocage/jails/srv_3/data
|
||||
jail_zfs_mountpoint: none
|
||||
last_started: '2025-06-11 04:29:23'
|
||||
localhost_ip: none
|
||||
login_flags: -f root
|
||||
mac_prefix: 02a098
|
||||
maxproc: 'off'
|
||||
memorylocked: 'off'
|
||||
memoryuse: 'off'
|
||||
min_dyn_devfs_ruleset: '1000'
|
||||
mount_devfs: '1'
|
||||
mount_fdescfs: '1'
|
||||
mount_linprocfs: '0'
|
||||
mount_procfs: '0'
|
||||
mountpoint: readonly
|
||||
msgqqueued: 'off'
|
||||
msgqsize: 'off'
|
||||
nat: '0'
|
||||
nat_backend: ipfw
|
||||
nat_forwards: none
|
||||
nat_interface: none
|
||||
nat_prefix: '172.16'
|
||||
nmsgq: 'off'
|
||||
notes: none
|
||||
nsem: 'off'
|
||||
nsemop: 'off'
|
||||
nshm: 'off'
|
||||
nthr: 'off'
|
||||
openfiles: 'off'
|
||||
origin: readonly
|
||||
owner: root
|
||||
pcpu: 'off'
|
||||
plugin_name: none
|
||||
plugin_repository: none
|
||||
priority: '99'
|
||||
pseudoterminals: 'off'
|
||||
quota: none
|
||||
readbps: 'off'
|
||||
readiops: 'off'
|
||||
release: 14.2-RELEASE-p3
|
||||
reservation: none
|
||||
resolver: /etc/resolv.conf
|
||||
rlimits: 'off'
|
||||
rtsold: '0'
|
||||
securelevel: '2'
|
||||
shmsize: 'off'
|
||||
source_template: ansible_client
|
||||
stacksize: 'off'
|
||||
state: up
|
||||
stop_timeout: '30'
|
||||
swapuse: 'off'
|
||||
sync_state: none
|
||||
sync_target: none
|
||||
sync_tgt_zpool: none
|
||||
sysvmsg: new
|
||||
sysvsem: new
|
||||
sysvshm: new
|
||||
template: '0'
|
||||
type: jail
|
||||
used: readonly
|
||||
vmemoryuse: 'off'
|
||||
vnet: '1'
|
||||
vnet0_mac: 02a0983da05d 02a0983da05e
|
||||
vnet0_mtu: auto
|
||||
vnet1_mac: none
|
||||
vnet1_mtu: auto
|
||||
vnet2_mac: none
|
||||
vnet2_mtu: auto
|
||||
vnet3_mac: none
|
||||
vnet3_mtu: auto
|
||||
vnet_default_interface: auto
|
||||
vnet_default_mtu: '1500'
|
||||
vnet_interfaces: none
|
||||
wallclock: 'off'
|
||||
writebps: 'off'
|
||||
writeiops: 'off'
|
||||
|
||||
PLAY RECAP **********************************************************************************************************
|
||||
srv_3 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
.. _ansible_collections.community.general.docsite.guide_iocage.guide_iocage_inventory.guide_iocage_inventory_tags:
|
||||
|
||||
Tags
|
||||
----
|
||||
|
||||
Quoting `man iocage <https://man.freebsd.org/cgi/man.cgi?query=iocage>`_
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
PROPERTIES
|
||||
...
|
||||
notes="any string"
|
||||
Custom notes for miscellaneous tagging.
|
||||
Default: none
|
||||
Source: local
|
||||
|
||||
We will use the format ``notes="tag1=value1 tag2=value2 ..."``.
|
||||
|
||||
.. note::
|
||||
|
||||
The iocage tags have nothing to do with the :ref:`tags`.
|
||||
|
||||
As root at the iocage host, set notes. For example,
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
shell> iocage set notes="vmm=iocage_02 project=foo" srv_1
|
||||
notes: none -> vmm=iocage_02 project=foo
|
||||
shell> iocage set notes="vmm=iocage_02 project=foo" srv_2
|
||||
notes: none -> vmm=iocage_02 project=foo
|
||||
shell> iocage set notes="vmm=iocage_02 project=bar" srv_3
|
||||
notes: none -> vmm=iocage_02 project=bar
|
||||
|
||||
Update the inventory configuration. Compose a dictionary *iocage_tags* and create groups. The option
|
||||
:ansopt:`community.general.iocage#inventory:get_properties` must be enabled.
|
||||
For example, ``hosts/02_iocage.yml`` could look like:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
plugin: community.general.iocage
|
||||
host: 10.1.0.73
|
||||
user: admin
|
||||
get_properties: true
|
||||
hooks_results:
|
||||
- /var/db/dhclient-hook.address.epair0b
|
||||
compose:
|
||||
ansible_host: (iocage_hooks.0 == '-') | ternary(iocage_ip4, iocage_hooks.0)
|
||||
iocage_tags: dict(iocage_properties.notes | split | map('split', '='))
|
||||
keyed_groups:
|
||||
- prefix: vmm
|
||||
key: iocage_tags.vmm
|
||||
- prefix: project
|
||||
key: iocage_tags.project
|
||||
|
||||
Display tags and groups. Create a playbook ``pb-test-groups.yml``:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- hosts: all
|
||||
remote_user: admin
|
||||
|
||||
vars:
|
||||
|
||||
ansible_python_interpreter: auto_silent
|
||||
|
||||
tasks:
|
||||
|
||||
- debug:
|
||||
var: iocage_tags
|
||||
|
||||
- debug:
|
||||
msg: |
|
||||
{% for group in groups %}
|
||||
{{ group }}: {{ groups[group] }}
|
||||
{% endfor %}
|
||||
run_once: true
|
||||
|
||||
Run the playbook:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
shell> ansible-playbook -i hosts/02_iocage.yml pb-test-groups.yml
|
||||
|
||||
PLAY [all] **********************************************************************************************************
|
||||
|
||||
TASK [debug] ********************************************************************************************************
|
||||
ok: [srv_1] =>
|
||||
iocage_tags:
|
||||
project: foo
|
||||
vmm: iocage_02
|
||||
ok: [srv_2] =>
|
||||
iocage_tags:
|
||||
project: foo
|
||||
vmm: iocage_02
|
||||
ok: [srv_3] =>
|
||||
iocage_tags:
|
||||
project: bar
|
||||
vmm: iocage_02
|
||||
|
||||
TASK [debug] ********************************************************************************************************
|
||||
ok: [srv_1] =>
|
||||
msg: |-
|
||||
all: ['srv_1', 'srv_2', 'srv_3']
|
||||
ungrouped: []
|
||||
vmm_iocage_02: ['srv_1', 'srv_2', 'srv_3']
|
||||
project_foo: ['srv_1', 'srv_2']
|
||||
project_bar: ['srv_3']
|
||||
|
||||
PLAY RECAP **********************************************************************************************************
|
||||
srv_1 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
|
||||
srv_2 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
|
||||
srv_3 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
|
||||
+559
@@ -0,0 +1,559 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
.. _ansible_collections.community.general.docsite.guide_modulehelper:
|
||||
|
||||
Module Helper guide
|
||||
===================
|
||||
|
||||
|
||||
Introduction
|
||||
^^^^^^^^^^^^
|
||||
|
||||
Writing a module for Ansible is largely described in existing documentation.
|
||||
However, a good part of that is boilerplate code that needs to be repeated every single time.
|
||||
That is where ``ModuleHelper`` comes to assistance: a lot of that boilerplate code is done.
|
||||
|
||||
.. _ansible_collections.community.general.docsite.guide_modulehelper.quickstart:
|
||||
|
||||
Quickstart
|
||||
""""""""""
|
||||
|
||||
See the `example from Ansible documentation <https://docs.ansible.com/projects/ansible/latest/dev_guide/developing_modules_general.html#creating-a-module>`_
|
||||
written with ``ModuleHelper``.
|
||||
But bear in mind that it does not showcase all of MH's features:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils._module_helper import ModuleHelper
|
||||
|
||||
|
||||
class MyTest(ModuleHelper):
|
||||
module = dict(
|
||||
argument_spec=dict(
|
||||
name=dict(type='str', required=True),
|
||||
new=dict(type='bool', required=False, default=False),
|
||||
),
|
||||
supports_check_mode=True,
|
||||
)
|
||||
|
||||
def __run__(self):
|
||||
self.vars.original_message = ''
|
||||
self.vars.message = ''
|
||||
if self.check_mode:
|
||||
return
|
||||
self.vars.original_message = self.vars.name
|
||||
self.vars.message = 'goodbye'
|
||||
self.changed = self.vars['new']
|
||||
if self.vars.name == "fail me":
|
||||
self.do_raise("You requested this to fail")
|
||||
|
||||
|
||||
def main():
|
||||
MyTest.execute()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
|
||||
Module Helper
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
Introduction
|
||||
""""""""""""
|
||||
|
||||
``ModuleHelper`` is a wrapper around the standard ``AnsibleModule``, providing extra features and conveniences.
|
||||
The basic structure of a module using ``ModuleHelper`` is as shown in the
|
||||
:ref:`ansible_collections.community.general.docsite.guide_modulehelper.quickstart`
|
||||
section above, but there are more elements that will take part in it.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils._module_helper import ModuleHelper
|
||||
|
||||
|
||||
class MyTest(ModuleHelper):
|
||||
# behavior for module paramaters ONLY, see below for further information
|
||||
output_params = ()
|
||||
change_params = ()
|
||||
diff_params = ()
|
||||
facts_params = ()
|
||||
|
||||
facts_name = None # used if generating facts, from parameters or otherwise
|
||||
|
||||
module = dict(
|
||||
argument_spec=dict(...),
|
||||
# ...
|
||||
)
|
||||
|
||||
After importing the ``ModuleHelper`` class, you need to declare your own class extending it.
|
||||
|
||||
.. seealso::
|
||||
|
||||
There is a variation called ``StateModuleHelper``, which builds on top of the features provided by MH.
|
||||
See :ref:`ansible_collections.community.general.docsite.guide_modulehelper.statemh` below for more details.
|
||||
|
||||
The easiest way of specifying the module is to create the class variable ``module`` with a dictionary
|
||||
containing the exact arguments that would be passed as parameters to ``AnsibleModule``.
|
||||
If you prefer to create the ``AnsibleModule`` object yourself, just assign it to the ``module`` class variable.
|
||||
MH also accepts a parameter ``module`` in its constructor, if that parameter is used used,
|
||||
then it will override the class variable. The parameter can either be ``dict`` or ``AnsibleModule`` as well.
|
||||
|
||||
Beyond the definition of the module, there are other variables that can be used to control aspects
|
||||
of MH's behavior. These variables should be set at the very beginning of the class, and their semantics are
|
||||
explained through this document.
|
||||
|
||||
The main logic of MH happens in the ``ModuleHelper.run()`` method, which looks like:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
@module_fails_on_exception
|
||||
def run(self):
|
||||
self.__init_module__()
|
||||
self.__run__()
|
||||
self.__quit_module__()
|
||||
output = self.output
|
||||
if 'failed' not in output:
|
||||
output['failed'] = False
|
||||
self.module.exit_json(changed=self.has_changed(), **output)
|
||||
|
||||
The method ``ModuleHelper.__run__()`` must be implemented by the module and most
|
||||
modules will be able to perform their actions implementing only that MH method.
|
||||
However, in some cases, you might want to execute actions before or after the main tasks, in which cases
|
||||
you should implement ``ModuleHelper.__init_module__()`` and ``ModuleHelper.__quit_module__()`` respectively.
|
||||
|
||||
Note that the output comes from ``self.output``, which is a ``@property`` method.
|
||||
By default, that property will collect all the variables that are marked for output and return them in a dictionary with their values.
|
||||
Moreover, the default ``self.output`` will also handle Ansible ``facts`` and *diff mode*.
|
||||
Also note the changed status comes from ``self.has_changed()``, which is usually calculated from variables that are marked
|
||||
to track changes in their content.
|
||||
|
||||
.. seealso::
|
||||
|
||||
More details in sections
|
||||
:ref:`ansible_collections.community.general.docsite.guide_modulehelper.paramvaroutput` and
|
||||
:ref:`ansible_collections.community.general.docsite.guide_modulehelper.changes` below.
|
||||
|
||||
.. seealso::
|
||||
|
||||
See more about the decorator
|
||||
:ref:`ansible_collections.community.general.docsite.guide_modulehelper.modulefailsdeco` below.
|
||||
|
||||
|
||||
Another way to write the example from the
|
||||
:ref:`ansible_collections.community.general.docsite.guide_modulehelper.quickstart`
|
||||
would be:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
def __init_module__(self):
|
||||
self.vars.original_message = ''
|
||||
self.vars.message = ''
|
||||
|
||||
def __run__(self):
|
||||
if self.check_mode:
|
||||
return
|
||||
self.vars.original_message = self.vars.name
|
||||
self.vars.message = 'goodbye'
|
||||
self.changed = self.vars['new']
|
||||
|
||||
def __quit_module__(self):
|
||||
if self.vars.name == "fail me":
|
||||
self.do_raise("You requested this to fail")
|
||||
|
||||
Notice that there are no calls to ``module.exit_json()`` nor ``module.fail_json()``: if the module fails, raise an exception.
|
||||
You can use the convenience method ``self.do_raise()`` or raise the exception as usual in Python to do that.
|
||||
If no exception is raised, then the module succeeds.
|
||||
|
||||
.. seealso::
|
||||
|
||||
See more about exceptions in section
|
||||
:ref:`ansible_collections.community.general.docsite.guide_modulehelper.exceptions` below.
|
||||
|
||||
Ansible modules must have a ``main()`` function and the usual test for ``'__main__'``. When using MH that should look like:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
def main():
|
||||
MyTest.execute()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
The class method ``execute()`` is nothing more than a convenience shorcut for:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
m = MyTest()
|
||||
m.run()
|
||||
|
||||
Optionally, an ``AnsibleModule`` may be passed as parameter to ``execute()``.
|
||||
|
||||
.. _ansible_collections.community.general.docsite.guide_modulehelper.paramvaroutput:
|
||||
|
||||
Parameters, variables, and output
|
||||
"""""""""""""""""""""""""""""""""
|
||||
|
||||
All the parameters automatically become variables in the ``self.vars`` attribute, which is of the ``VarDict`` type.
|
||||
By using ``self.vars``, you get a central mechanism to access the parameters but also to expose variables as return values of the module.
|
||||
As described in :ref:`ansible_collections.community.general.docsite.guide_vardict`, variables in ``VarDict`` have metadata associated to them.
|
||||
One of the attributes in that metadata marks the variable for output, and MH makes use of that to generate the module's return values.
|
||||
|
||||
.. note::
|
||||
|
||||
The ``VarDict`` class was introduced in community.general 7.1.0, as part of ``ModuleHelper`` itself.
|
||||
However, it has been factored out to become an utility on its own, described in :ref:`ansible_collections.community.general.docsite.guide_vardict`,
|
||||
and the older implementation was removed in community.general 11.0.0.
|
||||
|
||||
Some code might still refer to the class variables ``use_old_vardict`` and ``mute_vardict_deprecation``, used for the transtition to the new
|
||||
implementation but from community.general 11.0.0 onwards they are no longer used and can be safely removed from the code.
|
||||
|
||||
Contrary to new variables created in ``VarDict``, module parameters are not set for output by default.
|
||||
If you want to include some module parameters in the output, list them in the ``output_params`` class variable.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
class MyTest(ModuleHelper):
|
||||
output_params = ('state', 'name')
|
||||
...
|
||||
|
||||
.. important::
|
||||
|
||||
The variable names listed in ``output_params`` **must be module parameters**, as in parameters listed in the module's ``argument_spec``.
|
||||
Names not found in ``argument_spec`` are silently ignored.
|
||||
|
||||
Another neat feature provided by MH by using ``VarDict`` is the automatic tracking of changes when setting the metadata ``change=True``.
|
||||
Again, to enable this feature for module parameters, you must list them in the ``change_params`` class variable.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
class MyTest(ModuleHelper):
|
||||
# example from community.general.xfconf
|
||||
change_params = ('value', )
|
||||
...
|
||||
|
||||
.. important::
|
||||
|
||||
The variable names listed in ``change_params`` **must be module parameters**, as in parameters listed in the module's ``argument_spec``.
|
||||
Names not found in ``argument_spec`` are silently ignored.
|
||||
|
||||
.. seealso::
|
||||
|
||||
See more about this in
|
||||
:ref:`ansible_collections.community.general.docsite.guide_modulehelper.changes` below.
|
||||
|
||||
Similarly, if you want to use Ansible's diff mode, you can set the metadata ``diff=True`` and ``diff_params`` for module parameters.
|
||||
With that, MH will automatically generate the diff output for variables that have changed.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
class MyTest(ModuleHelper):
|
||||
diff_params = ('value', )
|
||||
|
||||
def __run__(self):
|
||||
# example from community.general.gio_mime
|
||||
self.vars.set_meta("handler", initial_value=gio_mime_get(self.runner, self.vars.mime_type), diff=True, change=True)
|
||||
|
||||
.. important::
|
||||
|
||||
The variable names listed in ``diff_params`` **must be module parameters**, as in parameters listed in the module's ``argument_spec``.
|
||||
Names not found in ``argument_spec`` are silently ignored.
|
||||
|
||||
Moreover, if a module is set to return *facts* instead of return values, then again use the metadata ``fact=True`` and ``fact_params`` for module parameters.
|
||||
Additionally, you must specify ``facts_name``, as in:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
class VolumeFacts(ModuleHelper):
|
||||
facts_name = 'volume_facts'
|
||||
|
||||
def __init_module__(self):
|
||||
self.vars.set("volume", 123, fact=True)
|
||||
|
||||
That generates an Ansible fact like:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: Obtain volume facts
|
||||
some.collection.volume_facts:
|
||||
# parameters
|
||||
|
||||
- name: Print volume facts
|
||||
debug:
|
||||
msg: Volume fact is {{ ansible_facts.volume_facts.volume }}
|
||||
|
||||
.. important::
|
||||
|
||||
The variable names listed in ``fact_params`` **must be module parameters**, as in parameters listed in the module's ``argument_spec``.
|
||||
Names not found in ``argument_spec`` are silently ignored.
|
||||
|
||||
.. important::
|
||||
|
||||
If ``facts_name`` is not set, the module does not generate any facts.
|
||||
|
||||
|
||||
.. _ansible_collections.community.general.docsite.guide_modulehelper.changes:
|
||||
|
||||
Handling changes
|
||||
""""""""""""""""
|
||||
|
||||
In MH there are many ways to indicate change in the module execution. Here they are:
|
||||
|
||||
Tracking changes in variables
|
||||
-----------------------------
|
||||
|
||||
As explained above, you can enable change tracking in any number of variables in ``self.vars``.
|
||||
By the end of the module execution, if any of those variables has a value different then the first value assigned to them,
|
||||
then that will be picked up by MH and signalled as changed at the module output.
|
||||
See the example below to learn how you can enabled change tracking in variables:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# using __init_module__() as example, it works the same in __run__() and __quit_module__()
|
||||
def __init_module__(self):
|
||||
# example from community.general.ansible_galaxy_install
|
||||
self.vars.set("new_roles", {}, change=True)
|
||||
|
||||
# example of "hidden" variable used only to track change in a value from community.general.gconftool2
|
||||
self.vars.set('_value', self.vars.previous_value, output=False, change=True)
|
||||
|
||||
# enable change-tracking without assigning value
|
||||
self.vars.set_meta("new_roles", change=True)
|
||||
|
||||
# if you must forcibly set an initial value to the variable
|
||||
self.vars.set_meta("new_roles", initial_value=[])
|
||||
...
|
||||
|
||||
If the end value of any variable marked ``change`` is different from its initial value, then MH will return ``changed=True``.
|
||||
|
||||
Indicating changes with ``changed``
|
||||
-----------------------------------
|
||||
|
||||
If you want to indicate change directly in the code, then use the ``self.changed`` property in MH.
|
||||
Beware that this is a ``@property`` method in MH, with both a *getter* and a *setter*.
|
||||
By default, that hidden field is set to ``False``.
|
||||
|
||||
Effective change
|
||||
----------------
|
||||
|
||||
The effective outcome for the module is determined in the ``self.has_changed()`` method, and it consists of the logical *OR* operation
|
||||
between ``self.changed`` and the change calculated from ``self.vars``.
|
||||
|
||||
.. _ansible_collections.community.general.docsite.guide_modulehelper.exceptions:
|
||||
|
||||
Exceptions
|
||||
""""""""""
|
||||
|
||||
In MH, instead of calling ``module.fail_json()`` you can just raise an exception.
|
||||
The output variables are collected the same way they would be for a successful execution.
|
||||
However, you can set output variables specifically for that exception, if you so choose.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils._module_helper import ModuleHelperException
|
||||
|
||||
def __init_module__(self):
|
||||
if not complex_validation():
|
||||
self.do_raise("Validation failed!")
|
||||
|
||||
# Or passing output variables
|
||||
awesomeness = calculate_awesomeness()
|
||||
if awesomeness > 1000:
|
||||
self.do_raise("Over awesome, I cannot handle it!", update_output={"awesomeness": awesomeness})
|
||||
# which is just a convenience shortcut for
|
||||
raise ModuleHelperException("...", update_output={...})
|
||||
|
||||
All exceptions derived from ``Exception`` are captured and translated into a ``fail_json()`` call.
|
||||
However, if you do want to call ``self.module.fail_json()`` yourself it will work,
|
||||
just keep in mind that there will be no automatic handling of output variables in that case.
|
||||
|
||||
Behind the curtains, all ``do_raise()`` does is to raise a ``ModuleHelperException``.
|
||||
If you want to create specialized error handling for your code, the best way is to extend that clas and raise it when needed.
|
||||
|
||||
.. _ansible_collections.community.general.docsite.guide_modulehelper.statemh:
|
||||
|
||||
StateModuleHelper
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
Many modules use a parameter ``state`` that effectively controls the exact action performed by the module, such as
|
||||
``state=present`` or ``state=absent`` for installing or removing packages.
|
||||
By using ``StateModuleHelper`` you can make your code like the excerpt from the ``gconftool2`` below:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils._module_helper import StateModuleHelper
|
||||
|
||||
class GConftool(StateModuleHelper):
|
||||
...
|
||||
module = dict(
|
||||
...
|
||||
)
|
||||
|
||||
def __init_module__(self):
|
||||
self.runner = gconftool2_runner(self.module, check_rc=True)
|
||||
...
|
||||
|
||||
self.vars.set('previous_value', self._get(), fact=True)
|
||||
self.vars.set('value_type', self.vars.value_type)
|
||||
self.vars.set('_value', self.vars.previous_value, output=False, change=True)
|
||||
self.vars.set_meta('value', initial_value=self.vars.previous_value)
|
||||
self.vars.set('playbook_value', self.vars.value, fact=True)
|
||||
|
||||
...
|
||||
|
||||
def state_absent(self):
|
||||
with self.runner("state key", output_process=self._make_process(False)) as ctx:
|
||||
ctx.run()
|
||||
self.vars.set('run_info', ctx.run_info, verbosity=4)
|
||||
self.vars.set('new_value', None, fact=True)
|
||||
self.vars._value = None
|
||||
|
||||
def state_present(self):
|
||||
with self.runner("direct config_source value_type state key value", output_process=self._make_process(True)) as ctx:
|
||||
ctx.run()
|
||||
self.vars.set('run_info', ctx.run_info, verbosity=4)
|
||||
self.vars.set('new_value', self._get(), fact=True)
|
||||
self.vars._value = self.vars.new_value
|
||||
|
||||
Note that the method ``__run__()`` is implemented in ``StateModuleHelper``, all you need to implement are the methods ``state_<state_value>``.
|
||||
In the example above, :ansplugin:`community.general.gconftool2#module` only has two states, ``present`` and ``absent``, thus, ``state_present()`` and ``state_absent()``.
|
||||
|
||||
If the controlling parameter is not called ``state``, like in :ansplugin:`community.general.jira#module` module, just let SMH know about it:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
class JIRA(StateModuleHelper):
|
||||
state_param = 'operation'
|
||||
|
||||
def operation_create(self):
|
||||
...
|
||||
|
||||
def operation_search(self):
|
||||
...
|
||||
|
||||
Lastly, if the module is called with ``state=somevalue`` and the method ``state_somevalue``
|
||||
is not implemented, SMH will resort to call a method called ``__state_fallback__()``.
|
||||
By default, this method will raise a ``ValueError`` indicating the method was not found.
|
||||
Naturally, you can override that method to write a default implementation, as in :ansplugin:`community.general.locale_gen#module`:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
def __state_fallback__(self):
|
||||
if self.vars.state_tracking == self.vars.state:
|
||||
return
|
||||
if self.vars.ubuntu_mode:
|
||||
self.apply_change_ubuntu(self.vars.state, self.vars.name)
|
||||
else:
|
||||
self.apply_change(self.vars.state, self.vars.name)
|
||||
|
||||
That module has only the states ``present`` and ``absent`` and the code for both is the one in the fallback method.
|
||||
|
||||
.. note::
|
||||
|
||||
The name of the fallback method **does not change** if you set a different value of ``state_param``.
|
||||
|
||||
|
||||
Other Conveniences
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Delegations to AnsibleModule
|
||||
""""""""""""""""""""""""""""
|
||||
|
||||
The MH properties and methods below are delegated as-is to the underlying ``AnsibleModule`` instance in ``self.module``:
|
||||
|
||||
- ``check_mode``
|
||||
- ``get_bin_path()``
|
||||
- ``warn()``
|
||||
- ``deprecate()``
|
||||
|
||||
Additionally, MH will also delegate:
|
||||
|
||||
- ``diff_mode`` to ``self.module._diff``
|
||||
- ``verbosity`` to ``self.module._verbosity``
|
||||
|
||||
Starting in community.general 10.3.0, MH will also delegate the method ``debug`` to ``self.module``.
|
||||
If any existing module already has a ``debug`` attribute defined, a warning message will be generated,
|
||||
requesting it to be renamed. Upon the release of community.general 12.0.0, the delegation will be
|
||||
preemptive and will override any existing method or property in the subclasses.
|
||||
|
||||
Decorators
|
||||
""""""""""
|
||||
|
||||
The following decorators should only be used within ``ModuleHelper`` class.
|
||||
|
||||
@cause_changes
|
||||
--------------
|
||||
|
||||
This decorator will control whether the outcome of the method will cause the module to signal change in its output.
|
||||
If the method completes without raising an exception it is considered to have succeeded, otherwise, it will have failed.
|
||||
|
||||
The decorator has a parameter ``when`` that accepts three different values: ``success``, ``failure``, and ``always``.
|
||||
There are also two legacy parameters, ``on_success`` and ``on_failure``, that will be deprecated, so do not use them.
|
||||
The value of ``changed`` in the module output will be set to ``True``:
|
||||
|
||||
- ``when="success"`` and the method completes without raising an exception.
|
||||
- ``when="failure"`` and the method raises an exception.
|
||||
- ``when="always"``, regardless of the method raising an exception or not.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils._module_helper import cause_changes
|
||||
|
||||
# adapted excerpt from the community.general.jira module
|
||||
class JIRA(StateModuleHelper):
|
||||
@cause_changes(when="success")
|
||||
def operation_create(self):
|
||||
...
|
||||
|
||||
If ``when`` has a different value or no parameters are specificied, the decorator will have no effect whatsoever.
|
||||
|
||||
.. _ansible_collections.community.general.docsite.guide_modulehelper.modulefailsdeco:
|
||||
|
||||
@module_fails_on_exception
|
||||
--------------------------
|
||||
|
||||
In a method using this decorator, if an exception is raised, the text message of that exception will be captured
|
||||
by the decorator and used to call ``self.module.fail_json()``.
|
||||
In most of the cases there will be no need to use this decorator, because ``ModuleHelper.run()`` already uses it.
|
||||
|
||||
@check_mode_skip
|
||||
----------------
|
||||
|
||||
If the module is running in check mode, this decorator will prevent the method from executing.
|
||||
The return value in that case is ``None``.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils._module_helper import check_mode_skip
|
||||
|
||||
# adapted excerpt from the community.general.locale_gen module
|
||||
class LocaleGen(StateModuleHelper):
|
||||
@check_mode_skip
|
||||
def __state_fallback__(self):
|
||||
...
|
||||
|
||||
|
||||
@check_mode_skip_returns
|
||||
------------------------
|
||||
|
||||
This decorator is similar to the previous one, but the developer can control the return value for the method when running in check mode.
|
||||
It is used with one of two parameters. One is ``callable`` and the return value in check mode will be ``callable(self, *args, **kwargs)``,
|
||||
where ``self`` is the ``ModuleHelper`` instance and the union of ``args`` and ``kwargs`` will contain all the parameters passed to the method.
|
||||
|
||||
The other option is to use the parameter ``value``, in which case the method will return ``value`` when in check mode.
|
||||
|
||||
|
||||
References
|
||||
^^^^^^^^^^
|
||||
|
||||
- `Ansible Developer Guide <https://docs.ansible.com/projects/ansible/latest/dev_guide/index.html>`_
|
||||
- `Creating a module <https://docs.ansible.com/projects/ansible/latest/dev_guide/developing_modules_general.html#creating-a-module>`_
|
||||
- `Returning ansible facts <https://docs.ansible.com/projects/ansible/latest/reference_appendices/common_return_values.html#ansible-facts>`_
|
||||
- :ref:`ansible_collections.community.general.docsite.guide_vardict`
|
||||
|
||||
|
||||
.. versionadded:: 3.1.0
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
.. _ansible_collections.community.general.docsite.guide_online:
|
||||
|
||||
****************
|
||||
Online.net Guide
|
||||
****************
|
||||
|
||||
Introduction
|
||||
============
|
||||
|
||||
Online is a French hosting company mainly known for providing bare-metal servers named Dedibox.
|
||||
Check it out: `https://www.online.net/en <https://www.online.net/en>`_
|
||||
|
||||
Dynamic inventory for Online resources
|
||||
--------------------------------------
|
||||
|
||||
Ansible has a dynamic inventory plugin that can list your resources.
|
||||
|
||||
1. Create a YAML configuration such as ``online_inventory.yml`` with this content:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
plugin: community.general.online
|
||||
|
||||
2. Set your ``ONLINE_TOKEN`` environment variable with your token.
|
||||
|
||||
You need to open an account and log into it before you can get a token.
|
||||
You can find your token at the following page: `https://console.online.net/en/api/access <https://console.online.net/en/api/access>`_
|
||||
|
||||
3. You can test that your inventory is working by running:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ ansible-inventory -v -i online_inventory.yml --list
|
||||
|
||||
|
||||
4. Now you can run your playbook or any other module with this inventory:
|
||||
|
||||
.. code-block:: ansible-output
|
||||
|
||||
$ ansible all -i online_inventory.yml -m ping
|
||||
sd-96735 | SUCCESS => {
|
||||
"changed": false,
|
||||
"ping": "pong"
|
||||
}
|
||||
+214
@@ -0,0 +1,214 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
.. _ansible_collections.community.general.docsite.guide_packet:
|
||||
|
||||
**********************************
|
||||
Packet.net Guide
|
||||
**********************************
|
||||
|
||||
Introduction
|
||||
============
|
||||
|
||||
`Packet.net <https://packet.net>`_ is a bare metal infrastructure host that is supported by the community.general collection through six cloud modules. The six modules are:
|
||||
|
||||
- :ansplugin:`community.general.packet_device#module`: manages servers on Packet. You can use this module to create, restart and delete devices.
|
||||
- :ansplugin:`community.general.packet_ip_subnet#module`: assign IP subnet to a bare metal server
|
||||
- :ansplugin:`community.general.packet_project#module`: create/delete a project in Packet host
|
||||
- :ansplugin:`community.general.packet_sshkey#module`: adds a public SSH key from file or value to the Packet infrastructure. Every subsequently-created device will have this public key installed in .ssh/authorized_keys.
|
||||
- :ansplugin:`community.general.packet_volume#module`: create/delete a volume in Packet host
|
||||
- :ansplugin:`community.general.packet_volume_attachment#module`: attach/detach a volume to a device in the Packet host
|
||||
|
||||
Note, this guide assumes you are familiar with Ansible and how it works. If you are not, have a look at their :ref:`docs <ansible_documentation>` before getting started.
|
||||
|
||||
Requirements
|
||||
============
|
||||
|
||||
The Packet modules connect to the Packet API using the `packet-python package <https://pypi.org/project/packet-python/>`_. You can install it with pip:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ pip install packet-python
|
||||
|
||||
In order to check the state of devices created by Ansible on Packet, it is a good idea to install one of the `Packet CLI clients <https://www.packet.net/developers/integrations/>`_. Otherwise you can check them through the `Packet portal <https://app.packet.net/portal>`_.
|
||||
|
||||
To use the modules you will need a Packet API token. You can generate an API token through the Packet portal `here <https://app.packet.net/portal#/api-keys>`__. The simplest way to authenticate yourself is to set the Packet API token in an environment variable:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ export PACKET_API_TOKEN=Bfse9F24SFtfs423Gsd3ifGsd43sSdfs
|
||||
|
||||
If you are not comfortable exporting your API token, you can pass it as a parameter to the modules.
|
||||
|
||||
On Packet, devices and reserved IP addresses belong to `projects <https://www.packet.com/developers/api/#projects>`_. In order to use the packet_device module, you need to specify the UUID of the project in which you want to create or manage devices. You can find a project's UUID in the Packet portal `here <https://app.packet.net/portal#/projects/list/table/>`_ (it is just under the project table) or through one of the available `CLIs <https://www.packet.net/developers/integrations/>`_.
|
||||
|
||||
|
||||
If you want to use a new SSH key pair in this tutorial, you can generate it to ``./id_rsa`` and ``./id_rsa.pub`` as:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ ssh-keygen -t rsa -f ./id_rsa
|
||||
|
||||
If you want to use an existing key pair, just copy the private and public key over to the playbook directory.
|
||||
|
||||
|
||||
Device Creation
|
||||
===============
|
||||
|
||||
The following code block is a simple playbook that creates one `Type 0 <https://www.packet.com/cloud/servers/t1-small/>`_ server (the ``plan`` parameter). You have to supply ``plan`` and ``operating_system``. ``location`` defaults to ``ewr1`` (Parsippany, NJ). You can find all the possible values for the parameters through a `CLI client <https://www.packet.net/developers/integrations/>`_.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
# playbook_create.yml
|
||||
|
||||
- name: Create Ubuntu device
|
||||
hosts: localhost
|
||||
tasks:
|
||||
|
||||
- community.general.packet_sshkey:
|
||||
key_file: ./id_rsa.pub
|
||||
label: tutorial key
|
||||
|
||||
- community.general.packet_device:
|
||||
project_id: <your_project_id>
|
||||
hostnames: myserver
|
||||
operating_system: ubuntu_16_04
|
||||
plan: baremetal_0
|
||||
facility: sjc1
|
||||
|
||||
After running ``ansible-playbook playbook_create.yml``, you should have a server provisioned on Packet. You can verify through a CLI or in the `Packet portal <https://app.packet.net/portal#/projects/list/table>`__.
|
||||
|
||||
If you get an error with the message "failed to set machine state present, error: Error 404: Not Found", please verify your project UUID.
|
||||
|
||||
|
||||
Updating Devices
|
||||
================
|
||||
|
||||
The two parameters used to uniquely identify Packet devices are: "device_ids" and "hostnames". Both parameters accept either a single string (later converted to a one-element list), or a list of strings.
|
||||
|
||||
The ``device_ids`` and ``hostnames`` parameters are mutually exclusive. The following values are all acceptable:
|
||||
|
||||
- device_ids: ``a27b7a83-fc93-435b-a128-47a5b04f2dcf``
|
||||
|
||||
- hostnames: ``mydev1``
|
||||
|
||||
- device_ids: ``[a27b7a83-fc93-435b-a128-47a5b04f2dcf, 4887130f-0ccd-49a0-99b0-323c1ceb527b]``
|
||||
|
||||
- hostnames: ``[mydev1, mydev2]``
|
||||
|
||||
In addition, hostnames can contain a special ``%d`` formatter along with a ``count`` parameter that lets you easily expand hostnames that follow a simple name and number pattern; in other words, ``hostnames: "mydev%d", count: 2`` will expand to [mydev1, mydev2].
|
||||
|
||||
If your playbook acts on existing Packet devices, you can only pass the ``hostname`` and ``device_ids`` parameters. The following playbook shows how you can reboot a specific Packet device by setting the ``hostname`` parameter:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
# playbook_reboot.yml
|
||||
|
||||
- name: reboot myserver
|
||||
hosts: localhost
|
||||
tasks:
|
||||
|
||||
- community.general.packet_device:
|
||||
project_id: <your_project_id>
|
||||
hostnames: myserver
|
||||
state: rebooted
|
||||
|
||||
You can also identify specific Packet devices with the ``device_ids`` parameter. The device's UUID can be found in the `Packet Portal <https://app.packet.net/portal>`_ or by using a `CLI <https://www.packet.net/developers/integrations/>`_. The following playbook removes a Packet device using the ``device_ids`` field:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
# playbook_remove.yml
|
||||
|
||||
- name: remove a device
|
||||
hosts: localhost
|
||||
tasks:
|
||||
|
||||
- community.general.packet_device:
|
||||
project_id: <your_project_id>
|
||||
device_ids: <myserver_device_id>
|
||||
state: absent
|
||||
|
||||
|
||||
More Complex Playbooks
|
||||
======================
|
||||
|
||||
In this example, we will create a CoreOS cluster with `user data <https://packet.com/developers/docs/servers/key-features/user-data/>`_.
|
||||
|
||||
|
||||
The CoreOS cluster will use `etcd <https://etcd.io/>`_ for discovery of other servers in the cluster. Before provisioning your servers, you will need to generate a discovery token for your cluster:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ curl -w "\n" 'https://discovery.etcd.io/new?size=3'
|
||||
|
||||
The following playbook will create an SSH key, 3 Packet servers, and then wait until SSH is ready (or until 5 minutes passed). Make sure to substitute the discovery token URL in ``user_data``, and the ``project_id`` before running ``ansible-playbook``. Also, feel free to change ``plan`` and ``facility``.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
# playbook_coreos.yml
|
||||
|
||||
- name: Start 3 CoreOS nodes in Packet and wait until SSH is ready
|
||||
hosts: localhost
|
||||
tasks:
|
||||
|
||||
- community.general.packet_sshkey:
|
||||
key_file: ./id_rsa.pub
|
||||
label: new
|
||||
|
||||
- community.general.packet_device:
|
||||
hostnames: [coreos-one, coreos-two, coreos-three]
|
||||
operating_system: coreos_beta
|
||||
plan: baremetal_0
|
||||
facility: ewr1
|
||||
project_id: <your_project_id>
|
||||
wait_for_public_IPv: 4
|
||||
user_data: |
|
||||
# cloud-config
|
||||
coreos:
|
||||
etcd2:
|
||||
discovery: https://discovery.etcd.io/<token>
|
||||
advertise-client-urls: http://$private_ipv4:2379,http://$private_ipv4:4001
|
||||
initial-advertise-peer-urls: http://$private_ipv4:2380
|
||||
listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001
|
||||
listen-peer-urls: http://$private_ipv4:2380
|
||||
fleet:
|
||||
public-ip: $private_ipv4
|
||||
units:
|
||||
- name: etcd2.service
|
||||
command: start
|
||||
- name: fleet.service
|
||||
command: start
|
||||
register: newhosts
|
||||
|
||||
- name: wait for ssh
|
||||
ansible.builtin.wait_for:
|
||||
delay: 1
|
||||
host: "{{ item.public_ipv4 }}"
|
||||
port: 22
|
||||
state: started
|
||||
timeout: 500
|
||||
loop: "{{ newhosts.results[0].devices }}"
|
||||
|
||||
|
||||
As with most Ansible modules, the default states of the Packet modules are idempotent, meaning the resources in your project will remain the same after re-runs of a playbook. Thus, we can keep the ``packet_sshkey`` module call in our playbook. If the public key is already in your Packet account, the call will have no effect.
|
||||
|
||||
The second module call provisions 3 Packet Type 0 (specified using the ``plan`` parameter) servers in the project identified by the ``project_id`` parameter. The servers are all provisioned with CoreOS beta (the ``operating_system`` parameter) and are customized with cloud-config user data passed to the ``user_data`` parameter.
|
||||
|
||||
The ``packet_device`` module has a ``wait_for_public_IPv`` that is used to specify the version of the IP address to wait for (valid values are ``4`` or ``6`` for IPv4 or IPv6). If specified, Ansible will wait until the GET API call for a device contains an Internet-routeable IP address of the specified version. When referring to an IP address of a created device in subsequent module calls, it is wise to use the ``wait_for_public_IPv`` parameter, or ``state: active`` in the packet_device module call.
|
||||
|
||||
Run the playbook:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ ansible-playbook playbook_coreos.yml
|
||||
|
||||
Once the playbook quits, your new devices should be reachable through SSH. Try to connect to one and check if etcd has started properly:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
tomk@work $ ssh -i id_rsa core@$one_of_the_servers_ip
|
||||
core@coreos-one ~ $ etcdctl cluster-health
|
||||
|
||||
If you have any questions or comments let us know! help@packet.net
|
||||
+320
@@ -0,0 +1,320 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
.. _ansible_collections.community.general.docsite.guide_scaleway:
|
||||
|
||||
**************
|
||||
Scaleway Guide
|
||||
**************
|
||||
|
||||
Introduction
|
||||
============
|
||||
|
||||
`Scaleway <https://scaleway.com>`_ is a cloud provider supported by the community.general collection through a set of plugins and modules.
|
||||
Those modules are:
|
||||
|
||||
- :ansplugin:`community.general.scaleway_compute#module`: manages servers on Scaleway. You can use this module to create, restart and delete servers.
|
||||
- :ansplugin:`community.general.scaleway_compute_private_network#module`
|
||||
- :ansplugin:`community.general.scaleway_container#module`
|
||||
- :ansplugin:`community.general.scaleway_container_info#module`
|
||||
- :ansplugin:`community.general.scaleway_container_namespace_info#module`
|
||||
- :ansplugin:`community.general.scaleway_container_namespace#module`
|
||||
- :ansplugin:`community.general.scaleway_container_registry_info#module`
|
||||
- :ansplugin:`community.general.scaleway_container_registry#module`
|
||||
- :ansplugin:`community.general.scaleway_database_backup#module`
|
||||
- :ansplugin:`community.general.scaleway_function#module`
|
||||
- :ansplugin:`community.general.scaleway_function_info#module`
|
||||
- :ansplugin:`community.general.scaleway_function_namespace_info#module`
|
||||
- :ansplugin:`community.general.scaleway_function_namespace#module`
|
||||
- :ansplugin:`community.general.scaleway_image_info#module`
|
||||
- :ansplugin:`community.general.scaleway_ip#module`
|
||||
- :ansplugin:`community.general.scaleway_ip_info#module`
|
||||
- :ansplugin:`community.general.scaleway_lb#module`
|
||||
- :ansplugin:`community.general.scaleway_organization_info#module`
|
||||
- :ansplugin:`community.general.scaleway_private_network#module`
|
||||
- :ansplugin:`community.general.scaleway_security_group#module`
|
||||
- :ansplugin:`community.general.scaleway_security_group_info#module`
|
||||
- :ansplugin:`community.general.scaleway_security_group_rule#module`
|
||||
- :ansplugin:`community.general.scaleway_server_info#module`
|
||||
- :ansplugin:`community.general.scaleway_snapshot_info#module`
|
||||
- :ansplugin:`community.general.scaleway_sshkey#module`: adds a public SSH key from a file or value to the Packet infrastructure. Every subsequently-created device will have this public key installed in .ssh/authorized_keys.
|
||||
- :ansplugin:`community.general.scaleway_user_data#module`
|
||||
- :ansplugin:`community.general.scaleway_volume#module`: manages volumes on Scaleway.
|
||||
- :ansplugin:`community.general.scaleway_volume_info#module`
|
||||
|
||||
The plugins are:
|
||||
|
||||
- :ansplugin:`community.general.scaleway#inventory`: inventory plugin
|
||||
|
||||
|
||||
.. note::
|
||||
This guide assumes you are familiar with Ansible and how it works.
|
||||
If you are not, have a look at :ref:`ansible_documentation` before getting started.
|
||||
|
||||
Requirements
|
||||
============
|
||||
|
||||
The Scaleway modules and inventory script connect to the Scaleway API using `Scaleway REST API <https://developer.scaleway.com>`_.
|
||||
To use the modules and inventory script you will need a Scaleway API token.
|
||||
You can generate an API token through the `Scaleway console's credential page <https://cloud.scaleway.com/#/credentials>`__.
|
||||
The simplest way to authenticate yourself is to set the Scaleway API token in an environment variable:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ export SCW_TOKEN=00000000-1111-2222-3333-444444444444
|
||||
|
||||
If you are not comfortable exporting your API token, you can pass it as a parameter to the modules using the ``api_token`` argument.
|
||||
|
||||
If you want to use a new SSH key pair in this tutorial, you can generate it to ``./id_rsa`` and ``./id_rsa.pub`` as:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ ssh-keygen -t rsa -f ./id_rsa
|
||||
|
||||
If you want to use an existing key pair, just copy the private and public key over to the playbook directory.
|
||||
|
||||
How to add an SSH key?
|
||||
======================
|
||||
|
||||
Connection to Scaleway Compute nodes use Secure Shell.
|
||||
SSH keys are stored at the account level, which means that you can reuse the same SSH key in multiple nodes.
|
||||
The first step to configure Scaleway compute resources is to have at least one SSH key configured.
|
||||
|
||||
:ansplugin:`community.general.scaleway_sshkey#module` is a module that manages SSH keys on your Scaleway account.
|
||||
You can add an SSH key to your account by including the following task in a playbook:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: "Add SSH key"
|
||||
community.general.scaleway_sshkey:
|
||||
ssh_pub_key: "ssh-rsa AAAA..."
|
||||
state: "present"
|
||||
|
||||
The ``ssh_pub_key`` parameter contains your ssh public key as a string. Here is an example inside a playbook:
|
||||
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: Test SSH key lifecycle on a Scaleway account
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
environment:
|
||||
SCW_API_KEY: ""
|
||||
|
||||
tasks:
|
||||
|
||||
- community.general.scaleway_sshkey:
|
||||
ssh_pub_key: "ssh-rsa AAAAB...424242 developer@example.com"
|
||||
state: present
|
||||
register: result
|
||||
|
||||
- ansible.builtin.assert:
|
||||
that:
|
||||
- result is success and result is changed
|
||||
|
||||
How to create a compute instance?
|
||||
=================================
|
||||
|
||||
Now that we have an SSH key configured, the next step is to spin up a server!
|
||||
:ansplugin:`community.general.scaleway_compute#module` is a module that can create, update and delete Scaleway compute instances:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: Create a server
|
||||
community.general.scaleway_compute:
|
||||
name: foobar
|
||||
state: present
|
||||
image: 00000000-1111-2222-3333-444444444444
|
||||
organization: 00000000-1111-2222-3333-444444444444
|
||||
region: ams1
|
||||
commercial_type: START1-S
|
||||
|
||||
Here are the parameter details for the example shown above:
|
||||
|
||||
- ``name`` is the name of the instance (the one that will show up in your web console).
|
||||
- ``image`` is the UUID of the system image you would like to use.
|
||||
A list of all images is available for each availability zone.
|
||||
- ``organization`` represents the organization that your account is attached to.
|
||||
- ``region`` represents the Availability Zone which your instance is in (for this example, ``par1`` and ``ams1``).
|
||||
- ``commercial_type`` represents the name of the commercial offers.
|
||||
You can check out the Scaleway pricing page to find which instance is right for you.
|
||||
|
||||
Take a look at this short playbook to see a working example using ``scaleway_compute``:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- name: Test compute instance lifecycle on a Scaleway account
|
||||
hosts: localhost
|
||||
gather_facts: false
|
||||
environment:
|
||||
SCW_API_KEY: ""
|
||||
|
||||
tasks:
|
||||
|
||||
- name: Create a server
|
||||
register: server_creation_task
|
||||
community.general.scaleway_compute:
|
||||
name: foobar
|
||||
state: present
|
||||
image: 00000000-1111-2222-3333-444444444444
|
||||
organization: 00000000-1111-2222-3333-444444444444
|
||||
region: ams1
|
||||
commercial_type: START1-S
|
||||
wait: true
|
||||
|
||||
- ansible.builtin.debug:
|
||||
var: server_creation_task
|
||||
|
||||
- ansible.builtin.assert:
|
||||
that:
|
||||
- server_creation_task is success
|
||||
- server_creation_task is changed
|
||||
|
||||
- name: Run it
|
||||
community.general.scaleway_compute:
|
||||
name: foobar
|
||||
state: running
|
||||
image: 00000000-1111-2222-3333-444444444444
|
||||
organization: 00000000-1111-2222-3333-444444444444
|
||||
region: ams1
|
||||
commercial_type: START1-S
|
||||
wait: true
|
||||
tags:
|
||||
- web_server
|
||||
register: server_run_task
|
||||
|
||||
- ansible.builtin.debug:
|
||||
var: server_run_task
|
||||
|
||||
- ansible.builtin.assert:
|
||||
that:
|
||||
- server_run_task is success
|
||||
- server_run_task is changed
|
||||
|
||||
Dynamic Inventory Plugin
|
||||
========================
|
||||
|
||||
Ansible ships with :ansplugin:`community.general.scaleway#inventory`.
|
||||
You can now get a complete inventory of your Scaleway resources through this plugin and filter it on
|
||||
different parameters (``regions`` and ``tags`` are currently supported).
|
||||
|
||||
Let us create an example!
|
||||
Suppose that we want to get all hosts that got the tag web_server.
|
||||
Create a file named ``scaleway_inventory.yml`` with the following content:
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
plugin: community.general.scaleway
|
||||
regions:
|
||||
- ams1
|
||||
- par1
|
||||
tags:
|
||||
- web_server
|
||||
|
||||
This inventory means that we want all hosts that got the tag ``web_server`` on the zones ``ams1`` and ``par1``.
|
||||
Once you have configured this file, you can get the information using the following command:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ ansible-inventory --list -i scaleway_inventory.yml
|
||||
|
||||
The output will be:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"_meta": {
|
||||
"hostvars": {
|
||||
"dd8e3ae9-0c7c-459e-bc7b-aba8bfa1bb8d": {
|
||||
"ansible_verbosity": 6,
|
||||
"arch": "x86_64",
|
||||
"commercial_type": "START1-S",
|
||||
"hostname": "foobar",
|
||||
"ipv4": "192.0.2.1",
|
||||
"organization": "00000000-1111-2222-3333-444444444444",
|
||||
"state": "running",
|
||||
"tags": [
|
||||
"web_server"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"all": {
|
||||
"children": [
|
||||
"ams1",
|
||||
"par1",
|
||||
"ungrouped",
|
||||
"web_server"
|
||||
]
|
||||
},
|
||||
"ams1": {},
|
||||
"par1": {
|
||||
"hosts": [
|
||||
"dd8e3ae9-0c7c-459e-bc7b-aba8bfa1bb8d"
|
||||
]
|
||||
},
|
||||
"ungrouped": {},
|
||||
"web_server": {
|
||||
"hosts": [
|
||||
"dd8e3ae9-0c7c-459e-bc7b-aba8bfa1bb8d"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
As you can see, we get different groups of hosts.
|
||||
``par1`` and ``ams1`` are groups based on location.
|
||||
``web_server`` is a group based on a tag.
|
||||
|
||||
In case a filter parameter is not defined, the plugin supposes all values possible are wanted.
|
||||
This means that for each tag that exists on your Scaleway compute nodes, a group based on each tag will be created.
|
||||
|
||||
Scaleway S3 object storage
|
||||
==========================
|
||||
|
||||
`Object Storage <https://www.scaleway.com/object-storage>`_ allows you to store any kind of objects (documents, images, videos, and so on).
|
||||
As the Scaleway API is S3 compatible, Ansible supports it natively through the amazon.aws modules: :ansplugin:`amazon.aws.s3_bucket#module`, :ansplugin:`amazon.aws.s3_object#module`.
|
||||
|
||||
You can find many examples in the `scaleway_s3 integration tests <https://github.com/ansible/ansible-legacy-tests/tree/devel/test/legacy/roles/scaleway_s3>`_.
|
||||
|
||||
.. code-block:: yaml+jinja
|
||||
|
||||
- hosts: myserver
|
||||
vars:
|
||||
scaleway_region: nl-ams
|
||||
s3_url: https://s3.nl-ams.scw.cloud
|
||||
environment:
|
||||
# AWS_ACCESS_KEY matches your scaleway organization id available at https://cloud.scaleway.com/#/account
|
||||
AWS_ACCESS_KEY: 00000000-1111-2222-3333-444444444444
|
||||
# AWS_SECRET_KEY matches a secret token that you can retrieve at https://cloud.scaleway.com/#/credentials
|
||||
AWS_SECRET_KEY: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
|
||||
module_defaults:
|
||||
group/amazon.aws.aws:
|
||||
s3_url: '{{ s3_url }}'
|
||||
region: '{{ scaleway_region }}'
|
||||
tasks:
|
||||
# use a fact instead of a variable, otherwise template is evaluate each time variable is used
|
||||
- ansible.builtin.set_fact:
|
||||
bucket_name: "{{ 99999999 | random | to_uuid }}"
|
||||
|
||||
# "requester_pays:" is mandatory because Scaleway does not implement related API
|
||||
# another way is to use amazon.aws.s3_object and "mode: create" !
|
||||
- amazon.aws.s3_bucket:
|
||||
name: '{{ bucket_name }}'
|
||||
requester_pays:
|
||||
|
||||
- name: Another way to create the bucket
|
||||
amazon.aws.s3_object:
|
||||
bucket: '{{ bucket_name }}'
|
||||
mode: create
|
||||
encrypt: false
|
||||
register: bucket_creation_check
|
||||
|
||||
- name: add something in the bucket
|
||||
amazon.aws.s3_object:
|
||||
mode: put
|
||||
bucket: '{{ bucket_name }}'
|
||||
src: /tmp/test.txt # needs to be created before
|
||||
object: test.txt
|
||||
encrypt: false # server side encryption must be disabled
|
||||
+390
@@ -0,0 +1,390 @@
|
||||
..
|
||||
Copyright (c) Ansible Project
|
||||
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
.. _ansible_collections.community.general.docsite.guide_uthelper:
|
||||
|
||||
UTHelper Guide
|
||||
==============
|
||||
|
||||
Introduction
|
||||
^^^^^^^^^^^^
|
||||
|
||||
``UTHelper`` was written to reduce the boilerplate code used in unit tests for modules.
|
||||
It was originally written to handle tests of modules that run external commands using ``AnsibleModule.run_command()``.
|
||||
At the time of writing (Feb 2025) that remains the only type of tests you can use
|
||||
``UTHelper`` for, but it aims to provide support for other types of interactions.
|
||||
|
||||
Until now, there are many different ways to implement unit tests that validate a module based on the execution of external commands. See some examples:
|
||||
|
||||
* `test_apk.py <https://github.com/ansible-collections/community.general/blob/10.3.0/tests/unit/plugins/modules/test_apk.py>`_ - A very simple one
|
||||
* `test_bootc_manage.py <https://github.com/ansible-collections/community.general/blob/10.3.0/tests/unit/plugins/modules/test_bootc_manage.py>`_ -
|
||||
This one has more test cases, but do notice how the code is repeated amongst them.
|
||||
* `test_modprobe.py <https://github.com/ansible-collections/community.general/blob/10.3.0/tests/unit/plugins/modules/test_modprobe.py>`_ -
|
||||
This one has 15 tests in it, but to achieve that it declares 8 classes repeating quite a lot of code.
|
||||
|
||||
As you can notice, there is no consistency in the way these tests are executed -
|
||||
they all do the same thing eventually, but each one is written in a very distinct way.
|
||||
|
||||
``UTHelper`` aims to:
|
||||
|
||||
* provide a consistent idiom to define unit tests
|
||||
* reduce the code to a bare minimal, and
|
||||
* define tests as data instead
|
||||
* allow the test cases definition to be expressed not only as a Python data structure but also as YAML content
|
||||
|
||||
Quickstart
|
||||
""""""""""
|
||||
|
||||
To use UTHelper, your test module will need only a bare minimal of code:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# tests/unit/plugin/modules/test_ansible_module.py
|
||||
from ansible_collections.community.general.plugins.modules import ansible_module
|
||||
from .uthelper import UTHelper, RunCommandMock
|
||||
|
||||
|
||||
UTHelper.from_module(ansible_module, __name__, mocks=[RunCommandMock])
|
||||
|
||||
Then, in the test specification file, you have:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# tests/unit/plugin/modules/test_ansible_module.yaml
|
||||
test_cases:
|
||||
- id: test_ansible_module
|
||||
flags:
|
||||
diff: true
|
||||
input:
|
||||
state: present
|
||||
name: Roger the Shrubber
|
||||
output:
|
||||
shrubbery:
|
||||
looks: nice
|
||||
price: not too expensive
|
||||
changed: true
|
||||
diff:
|
||||
before:
|
||||
shrubbery: null
|
||||
after:
|
||||
shrubbery:
|
||||
looks: nice
|
||||
price: not too expensive
|
||||
mocks:
|
||||
run_command:
|
||||
- command: [/testbin/shrubber, --version]
|
||||
rc: 0
|
||||
out: "2.80.0\n"
|
||||
err: ''
|
||||
- command: [/testbin/shrubber, --make-shrubbery]
|
||||
rc: 0
|
||||
out: 'Shrubbery created'
|
||||
err: ''
|
||||
|
||||
.. note::
|
||||
|
||||
If you prefer to pick a different YAML file for the test cases, or if you prefer to define them in plain Python,
|
||||
you can use the convenience methods ``UTHelper.from_file()`` and ``UTHelper.from_spec()``, respectively.
|
||||
See more details below.
|
||||
|
||||
|
||||
Using ``UTHelper``
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Test Module
|
||||
"""""""""""
|
||||
|
||||
``UTHelper`` is **strictly for unit tests**. To use it, you import the ``.uthelper.UTHelper`` class.
|
||||
As mentioned in different parts of this guide, there are three different mechanisms to load the test cases.
|
||||
|
||||
.. seealso::
|
||||
|
||||
See the UTHelper class reference below for API details on the three different mechanisms.
|
||||
|
||||
|
||||
The easies and most recommended way of using ``UTHelper`` is literally the example shown.
|
||||
See a real world example at
|
||||
`test_gconftool2.py <https://github.com/ansible-collections/community.general/blob/10.3.0/tests/unit/plugins/modules/test_gconftool2.py>`_.
|
||||
|
||||
The ``from_module()`` method will pick the filename of the test module up (in the example above, ``tests/unit/plugins/modules/test_gconftool2.py``)
|
||||
and it will search for ``tests/unit/plugins/modules/test_gconftool2.yaml`` (or ``.yml`` if that is not found).
|
||||
In that file it will expect to find the test specification expressed in YAML format, conforming to the structure described below LINK LINK LINK.
|
||||
|
||||
If you prefer to read the test specifications a different file path, use ``from_file()`` passing the file handle for the YAML file.
|
||||
|
||||
And, if for any reason you prefer or need to pass the data structure rather than dealing with YAML files, use the ``from_spec()`` method.
|
||||
A real world example for that can be found at
|
||||
`test_snap.py <https://github.com/ansible-collections/community.general/blob/main/tests/unit/plugins/modules/test_snap.py>`_.
|
||||
|
||||
|
||||
Test Specification
|
||||
""""""""""""""""""
|
||||
|
||||
The structure of the test specification data is described below.
|
||||
|
||||
Top level
|
||||
---------
|
||||
|
||||
At the top level there are two accepted keys:
|
||||
|
||||
- ``anchors: dict``
|
||||
Optional. Placeholder for you to define YAML anchors that can be repeated in the test cases.
|
||||
Its contents are never accessed directly by test Helper.
|
||||
- ``test_cases: list``
|
||||
Mandatory. List of test cases, see below for definition.
|
||||
|
||||
Test cases
|
||||
----------
|
||||
|
||||
You write the test cases with five elements:
|
||||
|
||||
- ``id: str``
|
||||
Mandatory. Used to identify the test case.
|
||||
|
||||
- ``flags: dict``
|
||||
Optional. Flags controling the behavior of the test case. All flags are optional. Accepted flags:
|
||||
|
||||
* ``check: bool``: set to ``true`` if the module is to be executed in **check mode**.
|
||||
* ``diff: bool``: set to ``true`` if the module is to be executed in **diff mode**.
|
||||
* ``skip: str``: set the test case to be skipped, providing the message for ``pytest.skip()``.
|
||||
* ``xfail: str``: set the test case to expect failure, providing the message for ``pytest.xfail()``.
|
||||
|
||||
- ``input: dict``
|
||||
Optional. Parameters for the Ansible module, it can be empty.
|
||||
|
||||
- ``output: dict``
|
||||
Optional. Expected return values from the Ansible module.
|
||||
All RV names are used here are expected to be found in the module output, but not all RVs in the output must be here.
|
||||
It can include special RVs such as ``changed`` and ``diff``.
|
||||
It can be empty.
|
||||
|
||||
- ``mocks: dict``
|
||||
Optional. Mocked interactions, ``run_command`` being the only one supported for now.
|
||||
Each key in this dictionary refers to one subclass of ``TestCaseMock`` and its
|
||||
structure is dictated by the ``TestCaseMock`` subclass implementation.
|
||||
All keys are expected to be named using snake case, as in ``run_command``.
|
||||
The ``TestCaseMock`` subclass is responsible for defining the name used in the test specification.
|
||||
The structure for that specification is dependent on the implementing class.
|
||||
See more details below for the implementation of ``RunCommandMock``
|
||||
|
||||
Example using YAML
|
||||
------------------
|
||||
|
||||
We recommend you use ``UTHelper`` reading the test specifications from a YAML file.
|
||||
See an example below of how one actually looks like (excerpt from ``test_opkg.yaml``):
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
---
|
||||
anchors:
|
||||
environ: &env-def {environ_update: {LANGUAGE: C, LC_ALL: C}, check_rc: false}
|
||||
test_cases:
|
||||
- id: install_zlibdev
|
||||
input:
|
||||
name: zlib-dev
|
||||
state: present
|
||||
output:
|
||||
msg: installed 1 package(s)
|
||||
mocks:
|
||||
run_command:
|
||||
- command: [/testbin/opkg, --version]
|
||||
environ: *env-def
|
||||
rc: 0
|
||||
out: ''
|
||||
err: ''
|
||||
- command: [/testbin/opkg, list-installed, zlib-dev]
|
||||
environ: *env-def
|
||||
rc: 0
|
||||
out: ''
|
||||
err: ''
|
||||
- command: [/testbin/opkg, install, zlib-dev]
|
||||
environ: *env-def
|
||||
rc: 0
|
||||
out: |
|
||||
Installing zlib-dev (1.2.11-6) to root...
|
||||
Downloading https://downloads.openwrt.org/releases/22.03.0/packages/mips_24kc/base/zlib-dev_1.2.11-6_mips_24kc.ipk
|
||||
Installing zlib (1.2.11-6) to root...
|
||||
Downloading https://downloads.openwrt.org/releases/22.03.0/packages/mips_24kc/base/zlib_1.2.11-6_mips_24kc.ipk
|
||||
Configuring zlib.
|
||||
Configuring zlib-dev.
|
||||
err: ''
|
||||
- command: [/testbin/opkg, list-installed, zlib-dev]
|
||||
environ: *env-def
|
||||
rc: 0
|
||||
out: |
|
||||
zlib-dev - 1.2.11-6
|
||||
err: ''
|
||||
- id: install_zlibdev_present
|
||||
input:
|
||||
name: zlib-dev
|
||||
state: present
|
||||
output:
|
||||
msg: package(s) already present
|
||||
mocks:
|
||||
run_command:
|
||||
- command: [/testbin/opkg, --version]
|
||||
environ: *env-def
|
||||
rc: 0
|
||||
out: ''
|
||||
err: ''
|
||||
- command: [/testbin/opkg, list-installed, zlib-dev]
|
||||
environ: *env-def
|
||||
rc: 0
|
||||
out: |
|
||||
zlib-dev - 1.2.11-6
|
||||
err: ''
|
||||
|
||||
TestCaseMocks Specifications
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The ``TestCaseMock`` subclass is free to define the expected data structure.
|
||||
|
||||
RunCommandMock Specification
|
||||
""""""""""""""""""""""""""""
|
||||
|
||||
``RunCommandMock`` mocks can be specified with the key ``run_command`` and it expects a ``list`` in which elements follow the structure:
|
||||
|
||||
- ``command: Union[list, str]``
|
||||
Mandatory. The command that is expected to be executed by the module. It corresponds to the parameter ``args`` of the ``AnsibleModule.run_command()`` call.
|
||||
It can be either a list or a string, though the list form is generally recommended.
|
||||
- ``environ: dict``
|
||||
Mandatory. All other parameters passed to the ``AnsibleModule.run_command()`` call.
|
||||
Most commonly used are ``environ_update`` and ``check_rc``.
|
||||
Must include all parameters the Ansible module uses in the ``AnsibleModule.run_command()`` call, otherwise the test will fail.
|
||||
- ``rc: int``
|
||||
Mandatory. The return code for the command execution.
|
||||
As per usual in bash scripting, a value of ``0`` means success, whereas any other number is an error code.
|
||||
- ``out: str``
|
||||
Mandatory. The *stdout* result of the command execution, as one single string containing zero or more lines.
|
||||
- ``err: str``
|
||||
Mandatory. The *stderr* result of the command execution, as one single string containing zero or more lines.
|
||||
|
||||
|
||||
``UTHelper`` Reference
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. py:module:: .uthelper
|
||||
|
||||
.. py:class:: UTHelper
|
||||
|
||||
A class to encapsulate unit tests.
|
||||
|
||||
.. py:staticmethod:: from_spec(ansible_module, test_module, test_spec, mocks=None)
|
||||
|
||||
Creates an ``UTHelper`` instance from a given test specification.
|
||||
|
||||
:param ansible_module: The Ansible module to be tested.
|
||||
:type ansible_module: :py:class:`types.ModuleType`
|
||||
:param test_module: The test module.
|
||||
:type test_module: :py:class:`types.ModuleType`
|
||||
:param test_spec: The test specification.
|
||||
:type test_spec: dict
|
||||
:param mocks: List of ``TestCaseMocks`` to be used during testing. Currently only ``RunCommandMock`` exists.
|
||||
:type mocks: list or None
|
||||
:return: An ``UTHelper`` instance.
|
||||
:rtype: UTHelper
|
||||
|
||||
Example usage of ``from_spec()``:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import sys
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import ansible_module
|
||||
from .uthelper import UTHelper, RunCommandMock
|
||||
|
||||
TEST_SPEC = dict(
|
||||
test_cases=[
|
||||
...
|
||||
]
|
||||
)
|
||||
|
||||
helper = UTHelper.from_spec(ansible_module, sys.modules[__name__], TEST_SPEC, mocks=[RunCommandMock])
|
||||
|
||||
.. py:staticmethod:: from_file(ansible_module, test_module, test_spec_filehandle, mocks=None)
|
||||
|
||||
Creates an ``UTHelper`` instance from a test specification file.
|
||||
|
||||
:param ansible_module: The Ansible module to be tested.
|
||||
:type ansible_module: :py:class:`types.ModuleType`
|
||||
:param test_module: The test module.
|
||||
:type test_module: :py:class:`types.ModuleType`
|
||||
:param test_spec_filehandle: A file handle to an file stream handle providing the test specification in YAML format.
|
||||
:type test_spec_filehandle: ``file-like object``
|
||||
:param mocks: List of ``TestCaseMocks`` to be used during testing. Currently only ``RunCommandMock`` exists.
|
||||
:type mocks: list or None
|
||||
:return: An ``UTHelper`` instance.
|
||||
:rtype: UTHelper
|
||||
|
||||
Example usage of ``from_file()``:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import sys
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import ansible_module
|
||||
from .uthelper import UTHelper, RunCommandMock
|
||||
|
||||
with open("test_spec.yaml", "r") as test_spec_filehandle:
|
||||
helper = UTHelper.from_file(ansible_module, sys.modules[__name__], test_spec_filehandle, mocks=[RunCommandMock])
|
||||
|
||||
.. py:staticmethod:: from_module(ansible_module, test_module_name, mocks=None)
|
||||
|
||||
Creates an ``UTHelper`` instance from a given Ansible module and test module.
|
||||
|
||||
:param ansible_module: The Ansible module to be tested.
|
||||
:type ansible_module: :py:class:`types.ModuleType`
|
||||
:param test_module_name: The name of the test module. It works if passed ``__name__``.
|
||||
:type test_module_name: str
|
||||
:param mocks: List of ``TestCaseMocks`` to be used during testing. Currently only ``RunCommandMock`` exists.
|
||||
:type mocks: list or None
|
||||
:return: An ``UTHelper`` instance.
|
||||
:rtype: UTHelper
|
||||
|
||||
Example usage of ``from_module()``:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from ansible_collections.community.general.plugins.modules import ansible_module
|
||||
from .uthelper import UTHelper, RunCommandMock
|
||||
|
||||
# Example usage
|
||||
helper = UTHelper.from_module(ansible_module, __name__, mocks=[RunCommandMock])
|
||||
|
||||
|
||||
Creating TestCaseMocks
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
To create a new ``TestCaseMock`` you must extend that class and implement the relevant parts:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
class ShrubberyMock(TestCaseMock):
|
||||
# this name is mandatory, it is the name used in the test specification
|
||||
name = "shrubbery"
|
||||
|
||||
def setup(self, mocker):
|
||||
# perform setup, commonly using mocker to patch some other piece of code
|
||||
...
|
||||
|
||||
def check(self, test_case, results):
|
||||
# verify the tst execution met the expectations of the test case
|
||||
# for example the function was called as many times as it should
|
||||
...
|
||||
|
||||
def fixtures(self):
|
||||
# returns a dict mapping names to pytest fixtures that should be used for the test case
|
||||
# for example, in RunCommandMock it creates a fixture that patches AnsibleModule.get_bin_path
|
||||
...
|
||||
|
||||
Caveats
|
||||
^^^^^^^
|
||||
|
||||
Known issues/opportunities for improvement:
|
||||
|
||||
* Only one ``UTHelper`` per test module: UTHelper injects a test function with a fixed name into the module's namespace,
|
||||
so placing a second ``UTHelper`` instance is going to overwrite the function created by the first one.
|
||||
|
||||
.. versionadded:: 7.5.0
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user