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

Issue:
hetzner_firewall example in documentation is wrong
<!--- Verify first that your improvement is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->

##### SUMMARY
<!--- Explain the problem briefly below, add suggestions to wording or structure -->
The parameter **state** is controlling whether the firewall is `present` or `absent` Yet the example code uses:

```yaml
status: active
```

A very easy mistake to make as **status** `active` or `disabled` is part of the return values. No idea why they are not the same but for now it's not working with the example.

<!--- HINT: Did you know the documentation has an "Edit on GitHub" link on every page ? -->

P.S. the Edit on GitHub link is missing here: https://docs.ansible.com/ansible/latest/collections/community/general/hetzner_firewall_module.html and it seems to be broken elsewhere in the docs site anyway.

##### ISSUE TYPE
- Documentation Report

##### COMPONENT NAME
<!--- Write the short name of the rst file, module, plugin, task or feature below, use your best guess if unsure -->
hetzner_firewall

##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.10.1
  config file = None
  configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.7/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0]
```



Discussion:
Files identified in the description:
None

If these files are inaccurate, 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/master/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->

Resolving patch:
diff --git a/plugins/modules/net_tools/hetzner_firewall.py b/plugins/modules/net_tools/hetzner_firewall.py
--- a/plugins/modules/net_tools/hetzner_firewall.py
+++ b/plugins/modules/net_tools/hetzner_firewall.py
@@ -146,7 +146,7 @@
     hetzner_user: foo
     hetzner_password: bar
     server_ip: 1.2.3.4
-    status: active
+    state: present
     whitelist_hos: yes
     rules:
       input:


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

Issue:
document what "archive" does when "dest" exists
Recreating from ansible/ansible#41973.

SUMMARY

"archive" documentation does not state what will be done when "dest" already exists.
ISSUE TYPE

    Documentation Report

COMPONENT NAME

archive
ANSIBLE VERSION

2.5

STEPS TO REPRODUCE

Look at https://docs.ansible.com/ansible/2.5/modules/archive_module.html .
EXPECTED RESULTS

Find out what will happen if "dest" exists.
ACTUAL RESULTS

Didn't figure that out.


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

If these files are inaccurate, 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/master/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
cc @bendoh
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->
You probably mean ansible/ansible#41973?
Thanks, messed up the reference. Fixed now :)

Resolving patch:
diff --git a/plugins/modules/files/archive.py b/plugins/modules/files/archive.py
--- a/plugins/modules/files/archive.py
+++ b/plugins/modules/files/archive.py
@@ -36,6 +36,7 @@
     description:
       - The file name of the destination archive. The parent directory must exists on the remote host.
       - This is required when C(path) refers to multiple files by either specifying a glob, a directory or multiple paths in a list.
+      - If the destination archive already exists, it will be truncated and overwritten.
     type: path
   exclude_path:
     description:
@@ -153,7 +154,6 @@
 '''
 
 import bz2
-import filecmp
 import glob
 import gzip
 import io


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

Issue:
document what "archive" does when "dest" exists
Recreating from ansible/ansible#41973.

SUMMARY

"archive" documentation does not state what will be done when "dest" already exists.
ISSUE TYPE

    Documentation Report

COMPONENT NAME

archive
ANSIBLE VERSION

2.5

STEPS TO REPRODUCE

Look at https://docs.ansible.com/ansible/2.5/modules/archive_module.html .
EXPECTED RESULTS

Find out what will happen if "dest" exists.
ACTUAL RESULTS

Didn't figure that out.


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

If these files are inaccurate, 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/master/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
cc @bendoh
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->
You probably mean ansible/ansible#41973?
Thanks, messed up the reference. Fixed now :)

Resolving patch:
diff --git a/plugins/modules/files/archive.py b/plugins/modules/files/archive.py
--- a/plugins/modules/files/archive.py
+++ b/plugins/modules/files/archive.py
@@ -36,6 +36,7 @@
     description:
       - The file name of the destination archive. The parent directory must exists on the remote host.
       - This is required when C(path) refers to multiple files by either specifying a glob, a directory or multiple paths in a list.
+      - If the destination archive already exists, it will be truncated and overwritten.
     type: path
   exclude_path:
     description:


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

Issue:
ipa_user field userauthtype takes string instead of list
### Summary

The ipa_user module has a field for userauthtype, which is currently set to str.  It also lists choices, which all seem to be the valid choices.  However, the field is multiselect in IPA.  With the type str and fixed choices, only one value is permitted with this implementation.  

The solution is easy and just changing the type to list of str seems to work.  That includes in a backwards compatible way (existing playbooks should still work).  However, please validate this.  I will make a simple PR to address.

### Issue Type

Bug Report

### Component Name

ipa_user

### Ansible Version

```console (paste below)
$ ansible --version
ansible 2.9.18
```


### Configuration

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


### OS / Environment

Centos 7 controlling a Centos 8 IPA server. (IPA 4.8.7, API version 2.239)

### Steps to Reproduce

The following fails, because userauthtype is set to str, instead of list of str.
```yaml (paste below)
- name: Create newuser1
  community.general.ipa_user:
    name: newuser1
    givenname: New User
    sn: User
    userauthtype: ['otp', 'password']
    ipa_host: IPA_HOST
    ipa_user: USERNAME
    ipa_pass: PASSWORD
```


### Expected Results

The above ansible snippet will succeed without failure.

### Actual Results

```console (paste below)
"msg": "value of userauthtype must be one of: password, radius, otp, pkinit, hardened, got: ['otp', 'password']"
```


### Code of Conduct

I agree to follow the Ansible Code of Conduct


Discussion:

Resolving patch:
diff --git a/plugins/modules/identity/ipa/ipa_user.py b/plugins/modules/identity/ipa/ipa_user.py
--- a/plugins/modules/identity/ipa/ipa_user.py
+++ b/plugins/modules/identity/ipa/ipa_user.py
@@ -94,7 +94,8 @@
     description:
     - The authentication type to use for the user.
     choices: ["password", "radius", "otp", "pkinit", "hardened"]
-    type: str
+    type: list
+    elements: str
     version_added: '1.2.0'
 extends_documentation_fragment:
 - community.general.ipa.documentation
@@ -146,11 +147,13 @@
     ipa_pass: topsecret
     update_password: on_create
 
-- name: Ensure pinky is present and using one time password authentication
+- name: Ensure pinky is present and using one time password and RADIUS authentication
   community.general.ipa_user:
     name: pinky
     state: present
-    userauthtype: otp
+    userauthtype:
+      - otp
+      - radius
     ipa_host: ipa.example.com
     ipa_user: admin
     ipa_pass: topsecret
@@ -361,7 +364,7 @@ def main():
                          telephonenumber=dict(type='list', elements='str'),
                          title=dict(type='str'),
                          homedirectory=dict(type='str'),
-                         userauthtype=dict(type='str',
+                         userauthtype=dict(type='list', elements='str',
                                            choices=['password', 'radius', 'otp', 'pkinit', 'hardened']))
 
     module = AnsibleModule(argument_spec=argument_spec,


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

Issue:
Examples of nomad_job_info not working
### Summary

The examples for nomad_job_info are using the module nomad_job instead of nomad_job_info.

### Issue Type

Documentation Report

### Component Name

nomad_job_info.py

### Ansible Version

```console (paste below)
$ ansible --version

```


### Configuration

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


### OS / Environment

_No response_

### Additional Information

Example:
- name: List Nomad jobs
  community.general.nomad_job:
    host: localhost
  register: result

Instead of:
- name: List Nomad jobs
  community.general.nomad_job_info:
    host: localhost
  register: result


### Code of Conduct

I agree to follow the Ansible Code of Conduct


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

If these files are inaccurate, 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/master/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
cc @chris93111
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->

Resolving patch:
diff --git a/plugins/modules/clustering/nomad/nomad_job_info.py b/plugins/modules/clustering/nomad/nomad_job_info.py
--- a/plugins/modules/clustering/nomad/nomad_job_info.py
+++ b/plugins/modules/clustering/nomad/nomad_job_info.py
@@ -36,13 +36,13 @@
 
 EXAMPLES = '''
 - name: Get info for job awx
-  community.general.nomad_job:
+  community.general.nomad_job_info:
     host: localhost
     name: awx
   register: result
 
 - name: List Nomad jobs
-  community.general.nomad_job:
+  community.general.nomad_job_info:
     host: localhost
   register: result
 


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

Issue:
jenkins_plugin: HTTP Error 405: Method Not Allowed on disable/enable plugin
### Summary

When I use `state: disabled` for jenkins_plugin module for any plugin ansible fails with 405 response code, because jenkins_plugin.py sends GET request to jenkins but jenkins expects POST method for pluginManager/plugin/*  api requests.

I think this issue can easily be fixed with adding method=POST perameter to the _get_url_data here:
https://github.com/ansible-collections/community.general/blob/main/plugins/modules/web_infrastructure/jenkins_plugin.py#L696 

### Issue Type

Bug Report

### Component Name

jenkins_plugin

### Ansible Version

```console (paste below)
$ ansible --version
ansible 2.9.18
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Aug 13 2020, 02:51:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
```

### Configuration

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


### OS / Environment

RHEL 7

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
- name: Install Plugins
  jenkins_plugin:
    name: xvfb
    url: "{{ jenkins_instance_url }}"
    state: disabled
```


### Expected Results

correctly disabled or enabled plugin

### Actual Results

```console (paste below)
TASK [jenkins : Disable or Enable Plugins] *************************************
failed: [test-jenkins-master-001] (item={'key': 'xvfb', 'value': 'false'}) => changed=false
  ansible_facts:
    discovered_interpreter_python: /usr/bin/python
  ansible_loop_var: item
  details: 'HTTP Error 405: Method Not Allowed'
  item:
    key: xvfb
    value: 'false'
  msg: Plugin not found.
```


### Code of Conduct

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


Discussion:

Resolving patch:
diff --git a/plugins/modules/web_infrastructure/jenkins_plugin.py b/plugins/modules/web_infrastructure/jenkins_plugin.py
--- a/plugins/modules/web_infrastructure/jenkins_plugin.py
+++ b/plugins/modules/web_infrastructure/jenkins_plugin.py
@@ -696,7 +696,8 @@ def _pm_query(self, action, msg):
         self._get_url_data(
             url,
             msg_status="Plugin not found. %s" % url,
-            msg_exception="%s has failed." % msg)
+            msg_exception="%s has failed." % msg,
+            method="POST")
 
 
 def main():


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

Issue:
pacman: pointless 'removed' state?
### Summary

https://docs.ansible.com/ansible/latest/collections/community/general/pacman_module.html

The 'state' parameter has two seemingly synonymous options - absent and removed.

removed is not used in any example.

https://github.com/ansible-collections/community.general/blob/main/plugins/modules/packaging/os/pacman.py#L398-L402

It seems to me that removed is simply an alias for absent? This is not made clear in the documentation if so.

### Issue Type

Documentation Report

### Component Name

pacman

### Ansible Version

_No response_

### Configuration

_No response_

### OS / Environment

_No response_

### Additional Information

_No response_

### Code of Conduct

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


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

If these files are inaccurate, 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/master/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
cc @indrajitr @tchernomax
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->
Yes, it's an alias, same as `installed` is an alias for `present`.

See https://github.com/ansible-collections/community.general/blob/main/plugins/modules/packaging/os/pacman.py#L463-L464
It should probably be mentioned in the Comments page, Yum has an identical layout with mentions:
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/yum_module.html#parameter-state

I can send a PR if desired

---

Semi-irrelevant sidenote, the states are not alphabetical.


Would be great if you could create a PR to improve the docs :)

Resolving patch:
diff --git a/plugins/modules/packaging/os/pacman.py b/plugins/modules/packaging/os/pacman.py
--- a/plugins/modules/packaging/os/pacman.py
+++ b/plugins/modules/packaging/os/pacman.py
@@ -30,9 +30,12 @@
 
     state:
         description:
-            - Desired state of the package.
+          - Whether to install (C(present) or C(installed), C(latest)), or remove (C(absent) or C(removed)) a package.
+          - C(present) and C(installed) will simply ensure that a desired package is installed.
+          - C(latest) will update the specified package if it is not of the latest available version.
+          - C(absent) and C(removed) will remove the specified package.
         default: present
-        choices: [ absent, latest, present, installed, removed ]
+        choices: [ absent, installed, latest, present, removed ]
         type: str
 
     force:


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

Issue:
proxmox_kvm clone/update/state should return vmid at least
was described here: https://github.com/ansible/ansible/issues/28517
but nothing has changed since 2017

##### SUMMARY
```
community.general.proxmox_kvm:
  clone: my-template
```
Current output:
```
{
"msg": "VM lalala with newid 101 cloned from vm with vmid 100",
}
```
should become:
```
{
"msg": "VM lalala with newid 101 cloned from vm with vmid 100",
"vmid": 101
"cloned_id": 100
}
```
```
community.general.proxmox_kvm:
  state: current
```
current output
```
"msg": "VM mycoolhostname-1 with vmid = 114 is running",
"status": "running"
```
should become
```
"msg": "VM mycoolhostname-1 with vmid = 114 is running",
"status": "running",
"hostname": "mycoolhostname-1",
"vmid": 114   
```

##### ISSUE TYPE
- Feature Idea

##### COMPONENT NAME
proxmox_kvm



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

If these files are inaccurate, 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/master/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
cc @Aversiste @Thulium-Drake @helldorado @joshainglis @karmab
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->
This is a duplicate (subset) of #1410.

Should be easy to fix, someone just has to do it.

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
@@ -1303,7 +1303,7 @@ def main():
             if update:
                 module.exit_json(changed=True, vmid=vmid, msg="VM %s with vmid %s updated" % (name, vmid))
             elif clone is not None:
-                module.exit_json(changed=True, vmid=vmid, msg="VM %s with newid %s cloned from vm with vmid %s" % (name, newid, vmid))
+                module.exit_json(changed=True, vmid=newid, msg="VM %s with newid %s cloned from vm with vmid %s" % (name, newid, vmid))
             else:
                 module.exit_json(changed=True, msg="VM %s with vmid %s deployed" % (name, vmid), **results)
         except Exception as e:


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

Issue:
hpilo_info current system power status
### Summary

I don't see in the docs how to get the current `System Power` status.

### Issue Type

Documentation Report

### Component Name

hpilo_info

### Ansible Version

```console (paste below)
ansible 2.10.11
  config file = /code/ansible.cfg
  configured module search path = ['/home/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.10/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.10.0b1 (default, May  4 2021, 17:55:34) [GCC 10.2.1 20201203]
```


### Configuration

```console (paste below)
ANSIBLE_FORCE_COLOR(env: ANSIBLE_FORCE_COLOR) = True
DEFAULT_CALLBACK_WHITELIST(env: ANSIBLE_CALLBACK_WHITELIST) = ['junit', 'profile_tasks']
DEFAULT_GATHERING(env: ANSIBLE_GATHERING) = smart
HOST_KEY_CHECKING(env: ANSIBLE_HOST_KEY_CHECKING) = False
INTERPRETER_PYTHON(env: ANSIBLE_PYTHON_INTERPRETER) = /usr/local/bin/python3
```


### OS / Environment


iLO 4
ProLiant DL360 Gen9



### Additional Information

_No response_

### Code of Conduct

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


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

If these files are inaccurate, 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/master/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
cc @haad
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->

Resolving patch:
diff --git a/plugins/modules/remote_management/hpilo/hpilo_info.py b/plugins/modules/remote_management/hpilo/hpilo_info.py
--- a/plugins/modules/remote_management/hpilo/hpilo_info.py
+++ b/plugins/modules/remote_management/hpilo/hpilo_info.py
@@ -113,6 +113,15 @@
     returned: always
     type: str
     sample: 123456ABC78901D2
+
+host_power_status:
+    description:
+      - Power status of host.
+      - Will be one of C(ON), C(OFF) and C(UNKNOWN).
+    returned: always
+    type: str
+    sample: ON
+    version_added: 3.5.0
 '''
 
 import re
@@ -177,6 +186,7 @@ def main():
     # TODO: Count number of CPUs, DIMMs and total memory
     try:
         data = ilo.get_host_data()
+        power_state = ilo.get_host_power_status()
     except hpilo.IloCommunicationError as e:
         module.fail_json(msg=to_native(e))
 
@@ -243,6 +253,9 @@ def main():
         # reformat into a text friendly format
         info['hw_memory_total'] = "{0} GB".format(info['hw_memory_total'])
 
+    # Report host state
+    info['host_power_status'] = power_state or 'UNKNOWN'
+
     module.exit_json(**info)
 
 


Test patch: