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:
Files identified in the description:
* [`plugins/modules/identity/ipa/ipa_user.py`](https://github.com/ansible-collections/community.general/blob/master/plugins/modules/identity/ipa/ipa_user.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 @Akasurde @Nosmoht @fxfitz
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->

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
@@ -363,7 +366,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: