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

htpasswd does not report changes when updating ownership #9485

Closed
1 task done
sdm-tim-strong opened this issue Dec 30, 2024 · 3 comments · Fixed by #9490
Closed
1 task done

htpasswd does not report changes when updating ownership #9485

sdm-tim-strong opened this issue Dec 30, 2024 · 3 comments · Fixed by #9490
Labels
bug This issue/PR relates to a bug module module plugins plugin (any type)

Comments

@sdm-tim-strong
Copy link

Summary

When updating 'owner' or 'group' properties with community.general.htpasswd, the change is applied correctly to the target host but zero changes are reported. Any changes to the target host should be reported as a change.

Issue Type

Bug Report

Component Name

htpasswd

Ansible Version

ansible [core 2.16.0]
  config file = /etc/ansible/ansible-9.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /root/venv/ansible-9/lib/python3.10/site-packages/ansible
  ansible collection location = /root/venv/ansible-9/lib/python3.10/site-packages/ansible_collections
  executable location = /root/venv/ansible-9/bin/ansible
  python version = 3.10.12 (main, Nov  6 2024, 20:22:13) [GCC 11.4.0] (/root/venv/ansible-9/bin/python)
  jinja version = 3.1.3
  libyaml = True

Community.general Version

$ Collection        Version
----------------- -------
community.general 10.1.0

Configuration


OS / Environment

Ubuntu 22.04 LTS

Steps to Reproduce

- name: Configure htpasswd file
  community.general.htpasswd:
    path: /etc/nginx/htpasswd
    name: "{{ htpasswd_user_name }}"
    password: "{{ htpasswd_user_pass }}"
    owner: root
    group: www-data
    mode: "0640"

Expected Results

Group ownership is updated on the filesystem as expected but no change is reported during the Ansible play.

Actual Results

PLAY RECAP ********************************************************************************************************************************************************************************************************
server-1                 : ok=59   changed=0    unreachable=0    failed=0    skipped=7    rescued=0    ignored=0

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link
Collaborator

cc @None
click here for bot help

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module plugins plugin (any type) labels Dec 30, 2024
@felixfontein
Copy link
Collaborator

Thanks for reporting this! #9490 should fix it.

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 module module plugins plugin (any type)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants