我正在尝试在包含的文件中使用局部变量。我收到未定义的错误。我不确定有什么方法可以做到这一点,是吗?我有一个配方文件夹:
recipes/
development.rb
testing.rb
config.rb
Run Code Online (Sandbox Code Playgroud)
发展.rb
username = "vagrant"
static = []
django = ["project1", "project2"]
include_recipe "server::config" # <-- Trying to use static and django in there.
Run Code Online (Sandbox Code Playgroud)
配置文件
static.each do |vhost| # <-- How do I get the "static" var in here?
...
end
django.each do |vhost| # <-- How do I get the "django" var in here?
...
end
Run Code Online (Sandbox Code Playgroud)