Make use of variables in chef inspec

74 Views Asked by At

Is it possible to make use of environment variable and even concatenating it for describe and match? Below is an example

files.rb

title "File section"

django_project = os_env("DJANGO_PROJECT")

control "files.1" do
    title "Django Settings Configuration"
    desc "Django Settings Boilerplate must be followed"
    describe file(django_project + "/setting.py") do
        it { should exist }
        it { should be_file}
    end
end
0

There are 0 best solutions below