Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Creating user directory using tilde always reports "changed" #83113

Open
wants to merge 6 commits into
base: devel
Choose a base branch
from

Conversation

yctomwang
Copy link
Contributor

SUMMARY

Fixes the issue of when Creating user directory using tilde, ansible always reports "changed"(#82490). along with an integration test to prevent regression. Fixed this issue through changing the spec from 'string' to 'path' for shell. This allowed for auto expansion of the tilde in user provided shell variable.

Fixes #82490

ISSUE TYPE
  • Bugfix Pull Request
ADDITIONAL INFORMATION

@ansibot ansibot added bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. module This issue/PR relates to a module. has_issue needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Apr 21, 2024
test/integration/targets/user/tasks/test_create_user.yml Outdated Show resolved Hide resolved
test/integration/targets/user/tasks/test_create_user.yml Outdated Show resolved Hide resolved
lib/ansible/modules/user.py Show resolved Hide resolved
@Akasurde Akasurde self-assigned this Apr 22, 2024
@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Apr 22, 2024
@ansibot ansibot added stale_review Updates were made after the last review and the last review is more than 7 days old. and removed ci_verified Changes made in this PR are causing tests to fail. labels Apr 23, 2024
@yctomwang
Copy link
Contributor Author

@Akasurde Hi, thanks for the code review, I have applied changes you have suggested. I am not sure as to why the tests are failing on FreeBSD, I dont have that locally, I will try to look into it on the weekend or something by trying to get a VM with FreeBSD on it and run the ansible tests.

@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label Apr 23, 2024
@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label Apr 23, 2024
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label May 7, 2024
@ansibot ansibot removed ci_verified Changes made in this PR are causing tests to fail. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels May 8, 2024
@bcoca
Copy link
Member

bcoca commented May 8, 2024

its failing because the user 'doesnotmatter' already exists, revert back to 'bob'.

@yctomwang
Copy link
Contributor Author

@bcoca Hi, the reason why i changed to 'doesnotmatter' is because 'bob' was failiing aswell, the playbook was giving back showing that changed is false which is suspicous,so I thought 'bob' might already exist. It still doesnot explain why its failing on the FreeBSD regardless.

@webknjaz webknjaz added the ci_verified Changes made in this PR are causing tests to fail. label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug. ci_verified Changes made in this PR are causing tests to fail. has_issue module This issue/PR relates to a module. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. stale_review Updates were made after the last review and the last review is more than 7 days old.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Creating user directory using tilde always reports "changed"
6 participants