Ensure Parameter Not A Symlink Target


In the interest of clarity, symbolic links should be declared by using an ensure value of ensure => link and explicitly specifying a value for the target attribute. Using a path to the target as the ensure value is not recommended (style guide).

What you have done

file { '/tmp/foo':
  ensure => '/tmp/bar',
}

What you should have done:

file { '/tmp/foo':
  ensure => link,
  target => '/tmp/bar',
}

Disabling the check

To disable this check you can add --no-ensure_not_symlink_target-check to your puppet-lint command line.

$ puppet-lint --no-ensure_not_symlink_target-check path/to/file.pp

Alternatively, if you’re calling puppet-lint via the Rake task, you should insert the following line to your Rakefile.

PuppetLint.configuration.send('disable_ensure_not_symlink_target')