internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: ansible-collections/community.general

Issue:
Allow community.general.ldap_search to be used even in check mode
### Summary

It looks like community.general.ldap_search does no return data if using check mode. You have to use "check_mode=no" to get data if testing. It's a search, so nothing should be changed anyways. So whether or not "--check" is used when calling the playbook the correct result should be returned. 


### Issue Type

Feature Idea

### Component Name

community.general.ldap_search

### Additional Information

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)

```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct


Discussion:
Files identified in the description:
* [`plugins/modules/net_tools/ldap/ldap_search.py`](https://github.com/ansible-collections/community.general/blob/main/plugins/modules/net_tools/ldap/ldap_search.py)

If these files are incorrect, please update the `component name` section of the description or use the `!component` bot command.

[click here for bot help](https://github.com/ansible/ansibullbot/blob/devel/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
cc @eryx12o45 @jtyr
[click here for bot help](https://github.com/ansible/ansibullbot/blob/devel/ISSUE_HELP.md)
<!--- boilerplate: notify --->
The culprit is https://github.com/ansible-collections/community.general/blob/main/plugins/modules/net_tools/ldap/ldap_search.py#L109 which simply skips the module's code if check mode is active.
@sabman3 this seems to be a very simple and straightforward change. If you would be willing to send a pull-request for that, we would be more than happy to assist you on that process.

@russoz I'm working on it. This is my first time contributing to a public GitHub project. I think I got the procedure correct. Also want to verify my change work in both check mode and non-check mode so it's backwards compatible for those that did use check_mode no as a workaroung.
Will be checking soon 

Resolving patch:
diff --git a/plugins/modules/net_tools/ldap/ldap_search.py b/plugins/modules/net_tools/ldap/ldap_search.py
--- a/plugins/modules/net_tools/ldap/ldap_search.py
+++ b/plugins/modules/net_tools/ldap/ldap_search.py
@@ -106,11 +106,10 @@ def main():
         module.fail_json(msg=missing_required_lib('python-ldap'),
                          exception=LDAP_IMP_ERR)
 
-    if not module.check_mode:
-        try:
-            LdapSearch(module).main()
-        except Exception as exception:
-            module.fail_json(msg="Attribute action failed.", details=to_native(exception))
+    try:
+        LdapSearch(module).main()
+    except Exception as exception:
+        module.fail_json(msg="Attribute action failed.", details=to_native(exception))
 
     module.exit_json(changed=False)
 


Test patch:
Repository: ansible-collections/community.general

Issue:
proxmox_kvm.py ostype w2k19 missing
### Summary

Currently it is not possible to create Windows Server 2019 VMs with this module because it`s not in the list of choices for ostype. Or should win10 be used in this case?

### Issue Type

Feature Idea

### Component Name

proxmox_kvm

### Additional Information

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)

```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct


Discussion:
Files identified in the description:
* [`plugins/modules/cloud/misc/proxmox_kvm.py`](https://github.com/ansible-collections/community.general/blob/main/plugins/modules/cloud/misc/proxmox_kvm.py)

If these files are incorrect, please update the `component name` section of the description or use the `!component` bot command.

[click here for bot help](https://github.com/ansible/ansibullbot/blob/devel/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
cc @Ajpantuso @Thulium-Drake @helldorado @joshainglis @karmab @tleguern
[click here for bot help](https://github.com/ansible/ansibullbot/blob/devel/ISSUE_HELP.md)
<!--- boilerplate: notify --->
[Proxmox api](https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/qemu) lists Windows Server 2019 with 2016 and Windows 10, so `win10` is the way to go.

Anyway, there's now the `win11` option for windows 11 and 2022 that should be added to the `ostype`  `choices`.
Feel free to create a PR that adds these options :)

Resolving patch:
diff --git a/plugins/modules/cloud/misc/proxmox_kvm.py b/plugins/modules/cloud/misc/proxmox_kvm.py
--- a/plugins/modules/cloud/misc/proxmox_kvm.py
+++ b/plugins/modules/cloud/misc/proxmox_kvm.py
@@ -286,7 +286,7 @@
       - The l26 is Linux 2.6/3.X Kernel.
       - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(l26).
     type: str
-    choices: ['other', 'wxp', 'w2k', 'w2k3', 'w2k8', 'wvista', 'win7', 'win8', 'win10', 'l24', 'l26', 'solaris']
+    choices: ['other', 'wxp', 'w2k', 'w2k3', 'w2k8', 'wvista', 'win7', 'win8', 'win10', 'win11', 'l24', 'l26', 'solaris']
   parallel:
     description:
       - A hash/dictionary of map host parallel devices. C(parallel='{"key":"value", "key":"value"}').
@@ -996,7 +996,7 @@ def main():
         numa=dict(type='dict'),
         numa_enabled=dict(type='bool'),
         onboot=dict(type='bool'),
-        ostype=dict(choices=['other', 'wxp', 'w2k', 'w2k3', 'w2k8', 'wvista', 'win7', 'win8', 'win10', 'l24', 'l26', 'solaris']),
+        ostype=dict(choices=['other', 'wxp', 'w2k', 'w2k3', 'w2k8', 'wvista', 'win7', 'win8', 'win10', 'win11', 'l24', 'l26', 'solaris']),
         parallel=dict(type='dict'),
         pool=dict(type='str'),
         protection=dict(type='bool'),


Test patch:
Repository: ansible-collections/community.general

Issue:
proxmox_kvm.py ostype w2k19 missing
### Summary

Currently it is not possible to create Windows Server 2019 VMs with this module because it`s not in the list of choices for ostype. Or should win10 be used in this case?

### Issue Type

Feature Idea

### Component Name

proxmox_kvm

### Additional Information

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)

```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct


Discussion:
Files identified in the description:
* [`plugins/modules/cloud/misc/proxmox_kvm.py`](https://github.com/ansible-collections/community.general/blob/main/plugins/modules/cloud/misc/proxmox_kvm.py)

If these files are incorrect, please update the `component name` section of the description or use the `!component` bot command.

[click here for bot help](https://github.com/ansible/ansibullbot/blob/devel/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
cc @Ajpantuso @Thulium-Drake @helldorado @joshainglis @karmab @tleguern
[click here for bot help](https://github.com/ansible/ansibullbot/blob/devel/ISSUE_HELP.md)
<!--- boilerplate: notify --->
[Proxmox api](https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/qemu) lists Windows Server 2019 with 2016 and Windows 10, so `win10` is the way to go.

Anyway, there's now the `win11` option for windows 11 and 2022 that should be added to the `ostype`  `choices`.
Feel free to create a PR that adds these options :)
Done :wink: 

Resolving patch:
diff --git a/plugins/modules/cloud/misc/proxmox_kvm.py b/plugins/modules/cloud/misc/proxmox_kvm.py
--- a/plugins/modules/cloud/misc/proxmox_kvm.py
+++ b/plugins/modules/cloud/misc/proxmox_kvm.py
@@ -286,7 +286,7 @@
       - The l26 is Linux 2.6/3.X Kernel.
       - This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(l26).
     type: str
-    choices: ['other', 'wxp', 'w2k', 'w2k3', 'w2k8', 'wvista', 'win7', 'win8', 'win10', 'l24', 'l26', 'solaris']
+    choices: ['other', 'wxp', 'w2k', 'w2k3', 'w2k8', 'wvista', 'win7', 'win8', 'win10', 'win11', 'l24', 'l26', 'solaris']
   parallel:
     description:
       - A hash/dictionary of map host parallel devices. C(parallel='{"key":"value", "key":"value"}').
@@ -996,7 +996,7 @@ def main():
         numa=dict(type='dict'),
         numa_enabled=dict(type='bool'),
         onboot=dict(type='bool'),
-        ostype=dict(choices=['other', 'wxp', 'w2k', 'w2k3', 'w2k8', 'wvista', 'win7', 'win8', 'win10', 'l24', 'l26', 'solaris']),
+        ostype=dict(choices=['other', 'wxp', 'w2k', 'w2k3', 'w2k8', 'wvista', 'win7', 'win8', 'win10', 'win11', 'l24', 'l26', 'solaris']),
         parallel=dict(type='dict'),
         pool=dict(type='str'),
         protection=dict(type='bool'),


Test patch:
Repository: ansible-collections/community.general

Issue:
filesize: sparse creation not working with Alpine linux
### Summary
It seems that creating sparse files does not work on Alpine linux, which is supported in CI since #4222. I disabled the sparse file tests for Alpine linux for now.

### Issue Type

Bug Report

### Component Name

filesize

### Ansible Version

unrelated



Discussion:
Files identified in the description:
* [`plugins/modules/files/filesize.py`](https://github.com/ansible-collections/community.general/blob/main/plugins/modules/files/filesize.py)

If these files are incorrect, please update the `component name` section of the description or use the `!component` bot command.

[click here for bot help](https://github.com/ansible/ansibullbot/blob/devel/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
cc @quidame
[click here for bot help](https://github.com/ansible/ansibullbot/blob/devel/ISSUE_HELP.md)
<!--- boilerplate: notify --->

Resolving patch:
diff --git a/plugins/modules/files/filesize.py b/plugins/modules/files/filesize.py
--- a/plugins/modules/files/filesize.py
+++ b/plugins/modules/files/filesize.py
@@ -83,7 +83,7 @@
       - Whether or not the file to create should be a sparse file.
       - This option is effective only on newly created files, or when growing a
         file, only for the bytes to append.
-      - This option is not supported on OpenBSD, Solaris and AIX.
+      - This option is not supported on OSes or filesystems not supporting sparse files.
       - I(force=true) and I(sparse=true) are mutually exclusive.
     type: bool
     default: false
@@ -129,6 +129,10 @@
   - name: dd(1) manpage for NetBSD
     description: Manual page of the NetBSD's dd implementation.
     link: https://man.netbsd.org/dd.1
+
+  - name: busybox(1) manpage for Linux
+    description: Manual page of the GNU/Linux's busybox, that provides its own dd implementation.
+    link: https://www.unix.com/man-page/linux/1/busybox
 '''
 
 EXAMPLES = r'''
@@ -377,12 +381,10 @@ def complete_dd_cmdline(args, dd_cmd):
         return list()
 
     bs = args['size_spec']['blocksize']
-    conv = list()
 
     # For sparse files (create, truncate, grow): write count=0 block.
     if args['sparse']:
         seek = args['size_spec']['blocks']
-        conv += ['sparse']
     elif args['force'] or not os.path.exists(args['path']):     # Create file
         seek = 0
     elif args['size_diff'] < 0:                                 # Truncate file
@@ -394,8 +396,6 @@ def complete_dd_cmdline(args, dd_cmd):
 
     count = args['size_spec']['blocks'] - seek
     dd_cmd += ['bs=%s' % str(bs), 'seek=%s' % str(seek), 'count=%s' % str(count)]
-    if conv:
-        dd_cmd += ['conv=%s' % ','.join(conv)]
 
     return dd_cmd
 


Test patch:
Repository: ansible-collections/community.general

Issue:
Incorrect Examples for keycloak_client_rolemapping
### Summary

The name of the module is singular, `keycloak_client_rolemapping`, however the examples have the module as plural, `keycloak_client_rolemappings`.

### Issue Type

Documentation Report

### Component Name

keycloak_client_rolemapping

### Ansible Version

```console (paste below)
$ ansible --version
ansible [core 2.12.3]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/shnee/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.10/site-packages/ansible
  ansible collection location = /home/shnee/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.10.2 (main, Jan 15 2022, 19:56:27) [GCC 11.1.0]
  jinja version = 3.0.3
  libyaml = True
```


### Community.general Version

```console (paste below)
$ ansible-galaxy collection list community.general

# /usr/lib/python3.10/site-packages/ansible_collections
Collection        Version
----------------- -------
community.general 4.5.0 
```


### Configuration

```console (paste below)
$ ansible-config dump --only-changed

```


### OS / Environment

Manjaro

### Additional Information

The incorrect pluralization in the examples might cause a less observant user (myself) to run into errors while copying and pasting from the examples.

### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct


Discussion:
If you'll indulge me, I'd like to create my first PR for this issue.
cc @Gaetan2907 @eikef @ndclt
[click here for bot help](https://github.com/ansible/ansibullbot/blob/devel/ISSUE_HELP.md)
<!--- boilerplate: notify --->

Resolving patch:
diff --git a/plugins/modules/identity/keycloak/keycloak_client_rolemapping.py b/plugins/modules/identity/keycloak/keycloak_client_rolemapping.py
--- a/plugins/modules/identity/keycloak/keycloak_client_rolemapping.py
+++ b/plugins/modules/identity/keycloak/keycloak_client_rolemapping.py
@@ -104,7 +104,7 @@
 
 EXAMPLES = '''
 - name: Map a client role to a group, authentication with credentials
-  community.general.keycloak_client_rolemappings:
+  community.general.keycloak_client_rolemapping:
     realm: MyCustomRealm
     auth_client_id: admin-cli
     auth_keycloak_url: https://auth.example.com/auth
@@ -122,7 +122,7 @@
   delegate_to: localhost
 
 - name: Map a client role to a group, authentication with token
-  community.general.keycloak_client_rolemappings:
+  community.general.keycloak_client_rolemapping:
     realm: MyCustomRealm
     auth_client_id: admin-cli
     auth_keycloak_url: https://auth.example.com/auth
@@ -138,7 +138,7 @@
   delegate_to: localhost
 
 - name: Unmap client role from a group
-  community.general.keycloak_client_rolemappings:
+  community.general.keycloak_client_rolemapping:
     realm: MyCustomRealm
     auth_client_id: admin-cli
     auth_keycloak_url: https://auth.example.com/auth


Test patch:
Repository: ansible-collections/community.general

Issue:
Incorrect Examples for keycloak_client_rolemapping
### Summary

The name of the module is singular, `keycloak_client_rolemapping`, however the examples have the module as plural, `keycloak_client_rolemappings`.

### Issue Type

Documentation Report

### Component Name

keycloak_client_rolemapping

### Ansible Version

```console (paste below)
$ ansible --version
ansible [core 2.12.3]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/shnee/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.10/site-packages/ansible
  ansible collection location = /home/shnee/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.10.2 (main, Jan 15 2022, 19:56:27) [GCC 11.1.0]
  jinja version = 3.0.3
  libyaml = True
```


### Community.general Version

```console (paste below)
$ ansible-galaxy collection list community.general

# /usr/lib/python3.10/site-packages/ansible_collections
Collection        Version
----------------- -------
community.general 4.5.0 
```


### Configuration

```console (paste below)
$ ansible-config dump --only-changed

```


### OS / Environment

Manjaro

### Additional Information

The incorrect pluralization in the examples might cause a less observant user (myself) to run into errors while copying and pasting from the examples.

### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct


Discussion:
If you'll indulge me, I'd like to create my first PR for this issue.
cc @Gaetan2907 @eikef @ndclt
[click here for bot help](https://github.com/ansible/ansibullbot/blob/devel/ISSUE_HELP.md)
<!--- boilerplate: notify --->

Resolving patch:
diff --git a/plugins/modules/identity/keycloak/keycloak_client_rolemapping.py b/plugins/modules/identity/keycloak/keycloak_client_rolemapping.py
--- a/plugins/modules/identity/keycloak/keycloak_client_rolemapping.py
+++ b/plugins/modules/identity/keycloak/keycloak_client_rolemapping.py
@@ -103,7 +103,7 @@
 
 EXAMPLES = '''
 - name: Map a client role to a group, authentication with credentials
-  community.general.keycloak_client_rolemappings:
+  community.general.keycloak_client_rolemapping:
     realm: MyCustomRealm
     auth_client_id: admin-cli
     auth_keycloak_url: https://auth.example.com/auth
@@ -121,7 +121,7 @@
   delegate_to: localhost
 
 - name: Map a client role to a group, authentication with token
-  community.general.keycloak_client_rolemappings:
+  community.general.keycloak_client_rolemapping:
     realm: MyCustomRealm
     auth_client_id: admin-cli
     auth_keycloak_url: https://auth.example.com/auth
@@ -137,7 +137,7 @@
   delegate_to: localhost
 
 - name: Unmap client role from a group
-  community.general.keycloak_client_rolemappings:
+  community.general.keycloak_client_rolemapping:
     realm: MyCustomRealm
     auth_client_id: admin-cli
     auth_keycloak_url: https://auth.example.com/auth


Test patch:
Repository: ansible-collections/community.general

Issue:
Gem: Force is not working when uninstalling
### Summary

Force flag is not being appended when uninstalling, which could lead to a hang because gem could interactively ask if the user is sure to uninstall when there are dependencies

### Issue Type

Bug Report

### Component Name

gem

### Ansible Version

```console (paste below)
$ ansible --version
ansible [core 2.13.6]
  [...]
  python version = 3.11.0 (main, Oct 25 2022, 13:57:33) [Clang 14.0.0 (clang-1400.0.29.202)]
  jinja version = 3.1.2
```


### Community.general Version

```console (paste below)
$ ansible-galaxy collection list community.general
# /Users/admin/.ansible/collections/ansible_collections
Collection        Version
----------------- -------
community.general 5.6.0  

# /opt/homebrew/Cellar/ansible/6.6.0/libexec/lib/python3.11/site-packages/ansible_collections
Collection        Version
----------------- -------
community.general 5.8.0
```


### Configuration

Not relevant

### OS / Environment

Not relevant

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
- name: Uninstall fastlane gem
  community.general.gem:
    name: fastlane
    state: absent
    force: true
    user_install: no
```


### Expected Results

The `--force` flag should be appended to the `gem uninstall` command

### Actual Results

The `--force` flag is not being appended to the `gem uninstall` command

### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct


Discussion:

Resolving patch:
diff --git a/plugins/modules/gem.py b/plugins/modules/gem.py
--- a/plugins/modules/gem.py
+++ b/plugins/modules/gem.py
@@ -105,7 +105,7 @@
     required: false
   force:
     description:
-      - Force gem to install, bypassing dependency checks.
+      - Force gem to (un-)install, bypassing dependency checks.
     required: false
     default: false
     type: bool
@@ -235,6 +235,8 @@ def uninstall(module):
     else:
         cmd.append('--all')
     cmd.append('--executable')
+    if module.params['force']:
+        cmd.append('--force')
     cmd.append(module.params['name'])
     module.run_command(cmd, environ_update=environ, check_rc=True)
 


Test patch:
Repository: ansible-collections/community.general

Issue:
Gem: Force is not working when uninstalling
### Summary

Force flag is not being appended when uninstalling, which could lead to a hang because gem could interactively ask if the user is sure to uninstall when there are dependencies

### Issue Type

Bug Report

### Component Name

gem

### Ansible Version

```console (paste below)
$ ansible --version
ansible [core 2.13.6]
  [...]
  python version = 3.11.0 (main, Oct 25 2022, 13:57:33) [Clang 14.0.0 (clang-1400.0.29.202)]
  jinja version = 3.1.2
```


### Community.general Version

```console (paste below)
$ ansible-galaxy collection list community.general
# /Users/admin/.ansible/collections/ansible_collections
Collection        Version
----------------- -------
community.general 5.6.0  

# /opt/homebrew/Cellar/ansible/6.6.0/libexec/lib/python3.11/site-packages/ansible_collections
Collection        Version
----------------- -------
community.general 5.8.0
```


### Configuration

Not relevant

### OS / Environment

Not relevant

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
- name: Uninstall fastlane gem
  community.general.gem:
    name: fastlane
    state: absent
    force: true
    user_install: no
```


### Expected Results

The `--force` flag should be appended to the `gem uninstall` command

### Actual Results

The `--force` flag is not being appended to the `gem uninstall` command

### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct


Discussion:
Files identified in the description:
* [`plugins/modules/gem.py`](https://github.com/ansible-collections/community.general/blob/main/plugins/modules/gem.py)

If these files are incorrect, please update the `component name` section of the description or use the `!component` bot command.

[click here for bot help](https://github.com/ansible/ansibullbot/blob/devel/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
cc @None @johanwiren
[click here for bot help](https://github.com/ansible/ansibullbot/blob/devel/ISSUE_HELP.md)
<!--- boilerplate: notify --->

Resolving patch:
diff --git a/plugins/modules/gem.py b/plugins/modules/gem.py
--- a/plugins/modules/gem.py
+++ b/plugins/modules/gem.py
@@ -105,7 +105,7 @@
     required: false
   force:
     description:
-      - Force gem to install, bypassing dependency checks.
+      - Force gem to (un-)install, bypassing dependency checks.
     required: false
     default: false
     type: bool
@@ -235,6 +235,8 @@ def uninstall(module):
     else:
         cmd.append('--all')
     cmd.append('--executable')
+    if module.params['force']:
+        cmd.append('--force')
     cmd.append(module.params['name'])
     module.run_command(cmd, environ_update=environ, check_rc=True)
 


Test patch:
Repository: ansible-collections/community.general

Issue:
Composite variables support for Proxmox nodes in dynamic inventory plugin
### Summary

In my environment Proxmox nodes are assigned an IP address in management VLAN and DNS name in a subdomain of my local domain. Currently if I try to configure the `ansible_host` variable in `compose:` section it will only work for hosts on the Proxmox nodes but not for the nodes themselves.

### Issue Type

Feature Idea

### Component Name

plugins/inventory/proxmox.py

### Additional Information

<!--- Paste example playbooks or commands between quotes below -->
```yaml
plugin: community.general.proxmox
url: https://pve.domain.local:8006
want_facts: false
want_proxmox_nodes_ansible_host: false
compose:
   ansible_host: inventory_hostname + '.domain. Local'
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct


Discussion:

Resolving patch:
diff --git a/plugins/inventory/proxmox.py b/plugins/inventory/proxmox.py
--- a/plugins/inventory/proxmox.py
+++ b/plugins/inventory/proxmox.py
@@ -590,6 +590,10 @@ def _populate(self):
                 ip = self._get_node_ip(node['node'])
                 self.inventory.set_variable(node['node'], 'ansible_host', ip)
 
+            # Setting composite variables
+            variables = self.inventory.get_host(node['node']).get_vars()
+            self._set_composite_vars(self.get_option('compose'), variables, node['node'], strict=self.strict)
+
             # add LXC/Qemu groups for the node
             for ittype in ('lxc', 'qemu'):
                 node_type_group = self._group('%s_%s' % (node['node'], ittype))


Test patch: