You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/puppet/type/file/content.rb
+24-27Lines changed: 24 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -54,34 +54,31 @@ module Puppet
54
54
if@actual_content || resource.parameter(:source)
55
55
# Actual content is already set, value contains it's checksum
56
56
value
57
+
elsifPuppet[:use_checksum_in_file_content]
58
+
# The value passed in the "content" attribute of this file looks like
59
+
# a checksum, and this is intended by the user.
60
+
# Display a warning as this behavior is deprecated.
61
+
Puppet.puppet_deprecation_warning([
62
+
# TRANSLATORS "content" is an attribute and should not be translated
63
+
_('Using a checksum in a file\'s "content" property is deprecated.'),
64
+
# TRANSLATORS "filebucket" is a resource type and should not be translated. The quoted occurrence of "content" is an attribute and should not be translated.
65
+
_('The ability to use a checksum to retrieve content from the filebucket using the "content" property will be removed in a future release.'),
66
+
# TRANSLATORS "content" is an attribute and should not be translated.
67
+
_('The literal value of the "content" property will be written to the file.'),
68
+
# TRANSLATORS "static catalogs" should not be translated.
69
+
_('The checksum retrieval functionality is being replaced by the use of static catalogs.'),
70
+
_('See https://puppet.com/docs/puppet/latest/static_catalogs.html for more information.')
# We return the value assuming it really is the checksum of the
75
+
# actual content we want. It should be fetched from filebucket
76
+
# later on.
77
+
value
57
78
else
58
-
# The value passed in the "content" attribute of this file looks like a checksum.
59
-
ifPuppet[:use_checksum_in_file_content]
60
-
# Assume user wants the deprecated behavior; display a warning though.
61
-
# XXX This is potentially dangerous because it means users can't write a file whose
62
-
# entire contents are a plain checksum unless it is a Binary content.
63
-
Puppet.puppet_deprecation_warning([
64
-
# TRANSLATORS "content" is an attribute and should not be translated
65
-
_('Using a checksum in a file\'s "content" property is deprecated.'),
66
-
# TRANSLATORS "filebucket" is a resource type and should not be translated. The quoted occurrence of "content" is an attribute and should not be translated.
67
-
_('The ability to use a checksum to retrieve content from the filebucket using the "content" property will be removed in a future release.'),
68
-
# TRANSLATORS "content" is an attribute and should not be translated.
69
-
_('The literal value of the "content" property will be written to the file.'),
70
-
# TRANSLATORS "static catalogs" should not be translated.
71
-
_('The checksum retrieval functionality is being replaced by the use of static catalogs.'),
72
-
_('See https://puppet.com/docs/puppet/latest/static_catalogs.html for more information.')
0 commit comments