Skip to content

Conversation

@Jkhall81
Copy link
Contributor

SUMMARY
Add create_parent option to ansible.builtin.copy and ansible.builtin.template to explicitly create the parent directory of a file destination when it does not exist.
This makes existing implicit behavior explicit and controllable without changing default behavior.

Fixes: #85795

Signed-off-by: Jason Hall [email protected]

ISSUE TYPE
Feature Pull Request

COMPONENT NAME
lib/ansible/modules/copy.py
lib/ansible/modules/template.py
lib/ansible/plugins/action/template.py

@ansibot ansibot added needs_triage Needs a first human triage before being processed. module This issue/PR relates to a module. has_issue labels Dec 15, 2025
@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 Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

has_issue module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ansible.builtin.copy module can create directories when copying files

2 participants