From 664fe45be92db83d40a6e1013b02d68452f67816 Mon Sep 17 00:00:00 2001 From: Aditya Putta Date: Thu, 26 Oct 2023 14:20:50 -0500 Subject: [PATCH] Create a User with a Home Directory (#82078) --- lib/ansible/modules/user.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/ansible/modules/user.py b/lib/ansible/modules/user.py index 27c8afa09ab..ad3b27e5889 100644 --- a/lib/ansible/modules/user.py +++ b/lib/ansible/modules/user.py @@ -305,6 +305,11 @@ EXAMPLES = r''' uid: 1040 group: admin +- name: Create a user 'johnd' with a home directory + ansible.builtin.user: + name: johnd + create_home: yes + - name: Add the user 'james' with a bash shell, appending the group 'admins' and 'developers' to the user's groups ansible.builtin.user: name: james