mas: Fix parsing on mas 3.0.0+. (#11179)
* mas: Fix parsing on mas 3.0.0+.
`mas` changed the formatting of `mas list` with version 3, which breaks
the parsing this module uses to determine which apps are installed. In
particular, app IDs may now have leading space, which causes us to split
the string too early.
* Changelog fragment.
* Better format examples and changlog fragment.
(cherry picked from commit ebb534166e)
Fixed typo in decompress example documentation (#11150)
(cherry picked from commit 32f0ad2f97)
Co-authored-by: Thomas Löhr <tlhr@users.noreply.github.com>
Use Cobbler API version format to check version (#11045)
* Use Cobbler API version format to check version
Cobbler use the formula below to return the version:
float(format(int(elems[0]) + 0.1 * int(elems[1]) + 0.001 * int(elems[2]), '.3f'))
Which means that 3.3.7 is changed to 3.307 which is > 3.4.
* Compare Cobbler version as a float
* Remove LooseVersion import
(cherry picked from commit 6f11d75047)
Co-authored-by: Bruno Travouillon <devel@travouillon.fr>
Migrate 1 RTD URLs to docs.ansible.com (#11081)
Migrate RTD URLs to docs.ansible.com
Updated 1 ansible.readthedocs.io URLs to docs.ansible.com equivalents
as part of the Read the Docs migration.
🤖 Generated with Claude Code
https://claude.ai/code
(cherry picked from commit e8bdf46627)
Co-authored-by: John Barker <john@johnrbarker.com>
Co-authored-by: Claude <noreply@anthropic.com>
filesystem: xfs resize: minimal required increment (#11033)
Internally XFS uses allocation groups. Allocation groups have a maximum
size of 1 TiB - 1 block. For devices >= 4 TiB XFS uses max size
allocation groups. If a filesystem is extended and the last allocation
group is already at max size, a new allocation group is added. An
allocation group seems to require at least 64 4 KiB blocks.
For devices with integer TiB size (>4), this creates a filesystem that
has initially has 1 unused block per TiB size. The `resize` option
detects this unused space, and tries to resize the filesystem. The
xfs_growfs call is successful (exit 0), but does not increase the file
system size. This is detected as repeated change in the task.
Test case:
```
- hosts: localhost
tasks:
- ansible.builtin.command:
cmd: truncate -s 4T /media/xfs.img
creates: /media/xfs.img
notify: loopdev xfs
- ansible.builtin.meta: flush_handlers
- name: pickup xfs.img resize
ansible.builtin.command:
cmd: losetup -c /dev/loop0
changed_when: false
- community.general.filesystem:
dev: "/dev/loop0"
fstype: "xfs"
- ansible.posix.mount:
src: "/dev/loop0"
fstype: "xfs"
path: "/media/xfs"
state: "mounted"
# always shows a diff even for newly created filesystems
- community.general.filesystem:
dev: "/dev/loop0"
fstype: "xfs"
resizefs: true
handlers:
- name: loopdev xfs
ansible.builtin.command:
cmd: losetup /dev/loop0 /media/xfs.img
```
NB: If the last allocation group is not yet at max size, the filesystem
can be resized. Detecting this requires considering the XFS topology.
Other filesystems (at least ext4) also seem to require a minimum
increment after the initial device size, but seem to use the entire
device after initial creation.
Fun observation: creating a 64(+) TiB filesystem leaves a 64(+) block
gap at the end, that is allocated in a subsequent xfs_growfs call.
(cherry picked from commit f5943201b9)
Co-authored-by: jnaab <25617714+jnaab@users.noreply.github.com>
Co-authored-by: Johannes Naab <johannes.naab@hetzner-cloud.de>
omapi_host: fix bytes vs. str confusion (#11001)
* omapi_host: fix bytes vs. str confusion
After an update of the control node from Debian
bookworm to trixie, the omapi_host module fails to
work with the error message:
Key of type 'bytes' is not JSON serializable by the
'module_legacy_m2c' profile.
https://github.com/ansible/ansible/issues/85937 had the
same error, but the fix is a bit more intricate here
because the result dict is dynamically generated from
an API response object.
This also fixes unpacking the MAC and IP address and
hardware type, which were broken for Python3.
* Merge suggestion for changelog fragment
* do not unpack_ip twice
Noticed by Felix Fontein <felix@fontein.de>
* mention py3k in changelog fragment, too
---------
(cherry picked from commit eb6337c0c9)
Co-authored-by: mirabilos <tg@mirbsd.org>
Co-authored-by: Felix Fontein <felix@fontein.de>
keycloak_user: mark credentials[].value as no_log=True (#11005)
Mark credentials[].value as no_log=True.
(cherry picked from commit 54af64ad36)
Co-authored-by: Felix Fontein <felix@fontein.de>
fix(pritunl_user): improve resilience to null or missing user parameters (#10955)
* fix(pritunl_user): improve resilience to null or missing user parameters
* added changelog fragment - 10955
* standardize 10955 changelog fragment content
* simplify user params comparison
* simplify list fetch
* simplify remote value retrieval
---------
(cherry picked from commit e84f59a62d)
Co-authored-by: David Jenkins <david.jenkins@twosixtech.com>
Co-authored-by: djenkins <djenkins@twosix.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
onepassword: extend CLI class initialization with additional parameters (#10965)
* onepassword: extend CLI class initialization with additional parameters
* add changelog fragment 10965-onepassword-bugfix.yml
* Update changelogs/fragments/10965-onepassword-bugfix.yml
---------
(cherry picked from commit ce0d06b306)
Co-authored-by: Matthew <mjmjelde@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
terraform: Fix bug when None values aren't processed correctly (#10961)
* terraform: Fix bug when None values aren't processed correctly
Just found that i can't pass null values as complex variables into terraform using this module, while i can do that with terraform itself. Fixed undesired behavior.
* chore: changelog fragment 10961-terraform-complexvars-null-bugfix.yaml
* Update changelogs/fragments/10961-terraform-complexvars-null-bugfix.yaml
* Update plugins/modules/terraform.py
* Update plugins/modules/terraform.py
* Fix condition to check for None type in terraform.py
---------
(cherry picked from commit af8c4fb95e)
Co-authored-by: nbragin4 <139489942+nbragin4@users.noreply.github.com>
keycloak_user_rolemapping: docs fixes and examples about mapping realm roles in keycloak_user_rolemapping (#10953)
* Fix docs and add examples about mapping realm roles for keycloak_user_rolemapping.py module (#7149)
* fix sanity tests
(cherry picked from commit 258e65f5fc)
Co-authored-by: Stanislav Shamilov <shamilovstas@protonmail.com>
Add support for client auth in Keycloak cllient secrets module (#10933)
* keycloak: add client authentication support for client_secret
* readd ['token', 'auth_realm']
---------
(cherry picked from commit c850e209ab)
Signed-off-by: Marius Bertram <marius@brtrm.de>
Co-authored-by: Marius Bertram <marius@brtrm.de>
fix(modules/gitlab_runner): Fix exception in check mode on new runners (#10918)
* fix(modules/gitlab_runner): Fix exception in check mode on new runners
When a new runner is added in check mode, the role used to throw an
exception. Fix this by returning a valid runner object instead of a
boolean.
Fixes#8854
* docs: Add changelog fragment
(cherry picked from commit 7e666a9c31)
Co-authored-by: carlfriedrich <carlfriedrich@posteo.de>
Add __init__.py to work around ansible-test/pylint bug (#10926)
Add __init__.py to work around ansible-test/pylint bug.
(cherry picked from commit 9dedd77459)
Co-authored-by: Felix Fontein <felix@fontein.de>
Add stable-2.20 to CI, bump version of devel branch (#10923)
Add stable-2.20 to CI, bump version of devel branch.
(cherry picked from commit 8472dc22ea)
refactor dict from literal list (#10891)
* refactor dict from literal list
* add changelog frag
(cherry picked from commit 5f471b8e5b)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
pacman: link to yay bug report (#10887)
Link to yay bug report.
(cherry picked from commit 68b8345199)
Co-authored-by: Felix Fontein <felix@fontein.de>
github_app_access_token: add support for GitHub Enterprise Server (#10880)
* github_app_access_token: add support for GitHub Enterprise Server (#10879)
Add option to specify api endpoint for a GitHub Enterprise Server.
If option is not specified, defaults to https://api.github.com.
* refactor: apply changes as suggested by felixfontein
* docs: fix nox check error and type-o
nox check: plugins/lookup/github_app_access_token.py:57:1: DOCUMENTATION: error: too many blank lines (1 > 0) (empty-lines)
* refactor: apply changes as suggested by russoz
* refactor: apply changes as suggested by felixfontein
(cherry picked from commit 30894f4144)
Co-authored-by: Chris <chodonne@gmail.com>