diff --git a/lib/ansible/modules/user.py b/lib/ansible/modules/user.py index 2535f3cf2d4..9585cbe051b 100644 --- a/lib/ansible/modules/user.py +++ b/lib/ansible/modules/user.py @@ -74,6 +74,7 @@ options: Since Ansible 2.5, the default shell for non-system users on macOS is V(/bin/bash). - On other operating systems, the default shell is determined by the underlying tool invoked by this module. See Notes for a per platform list of invoked tools. + - From Ansible 2.18, the type is changed to I(path) from I(str). type: path home: description: diff --git a/test/integration/targets/user/tasks/test_create_user.yml b/test/integration/targets/user/tasks/test_create_user.yml index 532ec9393d0..b9571aeca82 100644 --- a/test/integration/targets/user/tasks/test_create_user.yml +++ b/test/integration/targets/user/tasks/test_create_user.yml @@ -83,6 +83,7 @@ user: name: bob shell: ~/custom_shell + register: user_create_result - name: Create a new user with custom shell to test ~ expansion second time should show ok not changed user: @@ -90,8 +91,8 @@ shell: ~/custom_shell register: user_creation_result -- name: Assert that the user was not changed on subsequent runs +- name: Assert that the user with a tilde in the shell path is created assert: that: - user_creation_result is not changed - fail_msg: "Failure: User state was changed, We expect it to be same." \ No newline at end of file + - user_create_result is changed \ No newline at end of file