Skip to content

[Files] Forward recurse to file module for directory state - #791

Merged
hyvs merged 1 commit into
mainfrom
fix/files-attributes-directory-recurse
Jun 11, 2026
Merged

[Files] Forward recurse to file module for directory state#791
hyvs merged 1 commit into
mainfrom
fix/files-attributes-directory-recurse

Conversation

@Tom32i

@Tom32i Tom32i commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Small PR to fix a recurse problem on this manala file role:

When state: directory, the action plugin called ansible.builtin.file with only owner/group/mode, dropping recurse.
As a result recurse: true was silently ignored for directories, so mode/owner/group were never applied to existing children — only to the directory itself.

Add recurse to the forwarded task args so the declared mode propagates to the directory tree, and cover it with an integration test.

When `state: directory`, the action plugin called ansible.builtin.file
with only owner/group/mode, dropping `recurse`. As a result `recurse: true`
was silently ignored for directories, so mode/owner/group were never
applied to existing children — only to the directory itself.

Add `recurse` to the forwarded task args so the declared mode propagates
to the directory tree, and cover it with an integration test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@hyvs
hyvs merged commit 18380e5 into main Jun 11, 2026
3 checks passed
@hyvs
hyvs deleted the fix/files-attributes-directory-recurse branch June 11, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants