Deprecated language features

This version of Puppet is not included in Puppet Enterprise. The latest version of PE includes Puppet 4.10.

These features of the Puppet language are deprecated in Puppet 5.0.

Hiera 3.x features

These Hiera features are deprecated, because we replaced them with improved equivalents in Hiera 5.

Old feature Replacement
The classic hiera_* functions. The lookup function.
The hiera command line tool. The puppet lookup command.
Version 3 and version 4 of the hiera.yaml file. Version 5.
Hiera 3 custom backends. Hiera 5 custom backends.
Setting a global hash merge behavior in hiera.yaml. Per-key and per-lookup merge behavior.
The calling_module, calling_class, and calling_class_path pseudo-variables. The module data layer.

Non-strict variables

By default, you can access the value of a variable that was never assigned. The value of an unassigned variable is undef.

If you set the strict_variables setting to true, Puppet raises an error if you try to access an unassigned variable.

To update: Enable strict_variables on your Puppet master, run as normal, and look for compilation errors.

Puppet doesn’t validate the value of the ensure attribute in file resources. If the value is not present, absent, file, directory, or link, Puppet treats the value as an arbitrary path and creates a symbolic link to that path.

For example, these resource declarations are equivalent:

file { "/etc/inetd.conf":
  ensure => link,
  target => "/etc/inet/inetd.conf",

file { "/etc/inetd.conf":
  ensure => "/etc/inet/inetd.conf",

However, syntax errors in the ensure attribute’s value can lead to unexpected behaviors. For instance, mistyping a value can lead Puppet to create a symbolic link that treats the typo as the link’s target:

file { "/etc/inetd.conf":
  ensure => filer,

The above example results in Puppet creating a symbolic link at /etc/inetd.conf that points to filer—it doesn’t throw an error or produce a warning.

$ sudo /opt/puppetlabs/bin/puppet apply -e 'file { "/etc/inetd.conf": ensure => filer}'
Notice: Compiled catalog for in environment production in 1.18 seconds
Notice: /Stage[main]/Main/File[/etc/filer]/ensure: created
Notice: Applied catalog in 0.49 seconds

$ sudo ls -la /etc/inetd.conf
lrwxrwxrwx 1 root root 10 Nov  9 20:53 /etc/inetd.conf -> filer

To update: Confirm that the ensure attribute of your file resources has one of its allowed values. If you rely on this implicit symlinking behavior, change the value of ensure to link and add a target attribute that contains the target path as its value.

↑ Back to top