我一直在尝试运行以下食谱食谱——它使用 opscode 应用程序和主管食谱来安装东西。
问题是我不想总是运行主管和 pip 安装位,当我改变周围的东西以使用代码示例中注释掉的行时,通知永远不会被执行。它们应该被推迟到运行配方之后,但会丢失。
在删除注释行的情况下,“supervisor_service”上的操作是action :nothing
.
application "testing" do
repository "git@github.com:..."
path "/opt/somewhere/testing"
revision "master"
notifies :run, "execute[pip-ingestion]", :immediately
#notifies :enable, "supervisor_service[s3batcher]"
#notifies :restart, "supervisor_service[s3batcher]"
deploy_key <<EOF
-----BEGIN RSA PRIVATE KEY-----
....
EOF
end
execute "pip-ingestion" do
command "pip install -r #{root}/requirements.txt"
action :run
end
supervisor_service "s3batcher" do
command "python #{root}/manage.py batch_s3 --settings=#{root}/settings.yaml"
process_name "s3batcher-%(process_num)s"
action [:enable, :restart]
autostart true
user "root"
numprocs 1
end