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

Idempotence issue with Create config and data directory #178

Open
felinira opened this issue Dec 2, 2024 · 1 comment
Open

Idempotence issue with Create config and data directory #178

felinira opened this issue Dec 2, 2024 · 1 comment

Comments

@felinira
Copy link

felinira commented Dec 2, 2024

I was running this role as part of a larger molecule integration test and stumbled upon the following idempotence issue:

TASK [l3d.git.gitea : Create config and data directory] ************************
task path: /home/user/.ansible/collections/ansible_collections/l3d/git/roles/gitea/tasks/directory.yml:2
changed: [debian12] => (item=/var/lib/gitea) => {"ansible_loop_var": "item", "changed": true, "gid": 997, "group": "gitea", "item": "/var/lib/gitea", "mode": "0755", "owner": "gitea", "path": "/var/lib/gitea", "size": 106, "state": "directory", "uid": 997}
[...]
TASK [l3d.git.gitea : Create config and data directory] ************************
task path: /home/user/.ansible/collections/ansible_collections/l3d/git/roles/gitea/tasks/directory.yml:22
changed: [debian12] => (item=/etc/gitea) => {"ansible_loop_var": "item", "changed": true, "gid": 997, "group": "gitea", "item": "/etc/gitea", "mode": "0750", "owner": "gitea", "path": "/etc/gitea", "size": 174, "state": "directory", "uid": 997}
[...]
CRITICAL Idempotence test failed because of the following tasks:
*  => l3d.git.gitea : Create config and data directory
*  => l3d.git.gitea : Create config and data directory

These two directories will show as changed every time I run the role.

I am honestly not entirely sure why, and ansible won't tell me even when running it with --diff.

@DO1JLR
Copy link
Member

DO1JLR commented Jan 31, 2025

Yes, true. I am happy to accept a pull-request for that. If I find the time, I will fix it myself...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants