-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Update copy.py #56370
Update copy.py #56370
Conversation
<!--- Updated the description of the 'dest' parameter to specify that a file will be created if path is invalid if 'content' parameter is used instead of 'src' parameter --> +label: docsite_pr
lib/ansible/modules/files/copy.py
Outdated
@@ -46,6 +46,7 @@ | |||
- If C(dest) is a non-existent path and if either C(dest) ends with "/" or C(src) is a directory, C(dest) is created. | |||
- If I(dest) is a relative path, the starting directory is determined by the remote host. | |||
- If C(src) and C(dest) are files, the parent directory of C(dest) is not created and the task fails if it does not already exist. | |||
- If C(content) is used and C(dest) is a file, file is created if it does not already exist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add .
to the end of the sentence, please.
It will be appreciated if you show the evidence(playbook and output) for the change. |
@ptux
Let me know if more evidence is needed |
lib/ansible/modules/files/copy.py
Outdated
@@ -46,6 +46,7 @@ | |||
- If C(dest) is a non-existent path and if either C(dest) ends with "/" or C(src) is a directory, C(dest) is created. | |||
- If I(dest) is a relative path, the starting directory is determined by the remote host. | |||
- If C(src) and C(dest) are files, the parent directory of C(dest) is not created and the task fails if it does not already exist. | |||
- If C(content) is used and C(dest) is a file, file is created if it does not already exist. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion, this is documenting obvious functionality of the module. As such, I don't find this added documentation useful.
Perhaps additional clarification can be added to the description of the module to indicate that it does not require a file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a change to the content description now, @sivel please review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@acozine Check now
+label: docsite_pr
SUMMARY
Updated the description of the 'dest' parameter to specify that a file will be created if path is invalid but 'content' parameter is used instead of 'src' parameter
ISSUE TYPE
COMPONENT NAME
copy
ADDITIONAL INFORMATION