From bb08884221c084d93161191ffd1c308b5c11cb22 Mon Sep 17 00:00:00 2001 From: Rafael Guterres Jeffman Date: Wed, 24 Aug 2022 23:23:51 -0300 Subject: [PATCH] ipauser: Add note on attributes 'first' and 'last' requirements Attributes 'first' and 'last' are required if user does not exist, but current documentation doesn't make it clear. This patch adds a note on both attributes to make clear the cases where the attribute is required --- README-user.md | 4 ++-- plugins/modules/ipauser.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README-user.md b/README-user.md index 6cb3e62908..ec0f6cfda9 100644 --- a/README-user.md +++ b/README-user.md @@ -381,8 +381,8 @@ Variable | Description | Required Variable | Description | Required -------- | ----------- | -------- -`first` \| `givenname` | The first name string. | no -`last` \| `sn` | The last name string. | no +`first` \| `givenname` | The first name string. Required if user does not exist. | no +`last` \| `sn` | The last name string. Required if user does not exist. | no `fullname` \| `cn` | The full name string. | no `displayname` | The display name string. | no `homedir` | The home directory string. | no diff --git a/plugins/modules/ipauser.py b/plugins/modules/ipauser.py index 739b27b560..ec18522931 100644 --- a/plugins/modules/ipauser.py +++ b/plugins/modules/ipauser.py @@ -47,11 +47,11 @@ description: The user (internally uid). required: true first: - description: The first name + description: The first name. Required if user does not exist. required: false aliases: ["givenname"] last: - description: The last name + description: The last name. Required if user doesnot exst. required: false aliases: ["sn"] fullname: @@ -212,11 +212,11 @@ type: bool required: false first: - description: The first name + description: The first name. Required if user does not exist. required: false aliases: ["givenname"] last: - description: The last name + description: The last name. Required if user does not exist. required: false aliases: ["sn"] fullname: