From 28eb9466c7083b07dc7b61661afbabb27cf6ced2 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bonicoli Date: Wed, 14 Jun 2017 16:26:02 +0200 Subject: [PATCH] copy: document behavior related to dest creation --- lib/ansible/modules/files/copy.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/files/copy.py b/lib/ansible/modules/files/copy.py index d28b40ac35..1afb3f70cb 100644 --- a/lib/ansible/modules/files/copy.py +++ b/lib/ansible/modules/files/copy.py @@ -37,8 +37,9 @@ options: version_added: "1.1" dest: description: - - Remote absolute path where the file should be copied to. If C(src) is a directory, - this must be a directory too. + - Remote absolute path where the file should be copied to. If C(src) is a directory, this must be a directory too and + dest directory is created when it doesn't exist. + If src and dest are files, then parent directory of dest isn't created: the task fails if it doesn't already exist. required: yes backup: description: