From d02e938df2e7dbac3ca0ad6efc497dc92d1e61e7 Mon Sep 17 00:00:00 2001 From: Mrten Date: Fri, 15 Mar 2019 21:02:14 +0100 Subject: [PATCH 1/2] documentation change add a line to the documentation to help silence a warning (see #24895) --- salt/states/file.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/salt/states/file.py b/salt/states/file.py index b968f20c750d..5fe9a7e254df 100644 --- a/salt/states/file.py +++ b/salt/states/file.py @@ -2004,7 +2004,9 @@ def managed(name, (use ~ in YAML), the file will be created as an empty file and the content will not be managed. This is also the case when a file already exists and the source is undefined; the contents of the file - will not be changed or managed. + will not be changed or managed. If source is left blank or None, please + also set replaced to False to make your intention explicit. + If the file is hosted on a HTTP or FTP server then the source_hash argument is also required. From 0c983aa7dc81c2c2fbda483bfe2c0d4440dccbbf Mon Sep 17 00:00:00 2001 From: "Gareth J. Greenaway" Date: Fri, 15 Mar 2019 18:23:29 -0700 Subject: [PATCH 2/2] Update file.py Fixing lint. --- salt/states/file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/states/file.py b/salt/states/file.py index 5fe9a7e254df..5c37561cf77f 100644 --- a/salt/states/file.py +++ b/salt/states/file.py @@ -2006,7 +2006,7 @@ def managed(name, already exists and the source is undefined; the contents of the file will not be changed or managed. If source is left blank or None, please also set replaced to False to make your intention explicit. - + If the file is hosted on a HTTP or FTP server then the source_hash argument is also required.