Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 729 Bytes

deprecations_verify_file.md

File metadata and controls

35 lines (27 loc) · 729 Bytes

+++ title = "Deprecation: Verify File Expansion (CHEF-7)" draft = false

gh_repo = "chef-web-docs" robots = "noindex" sitemapExclude = true aliases = "/deprecations_verify_file.html" +++

The verify metaproperty allows the user to specify a {path} variable that is expanded to the path of the file to be verified. Previously, it was possible to use {file} as the variable, but that is now deprecated.

The {file} expansion was deprecated in Chef Infra Client 12.5, and will be removed in Chef Infra Client 13.

Example

file '/etc/nginx.conf' do
  verify 'nginx -t -c %{file}'
end

Remediation

Replace %{file} with %{path}:

file '/etc/nginx.conf' do
  verify 'nginx -t -c %{path}'
end