From 1701922c91f16304527a73cb2acd910d8fa8cf99 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sat, 1 May 2021 21:29:30 +0900 Subject: [PATCH] Execute deploy scripts for `nginx`. --- cookbooks/nginx/webadm.rb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/cookbooks/nginx/webadm.rb b/cookbooks/nginx/webadm.rb index f1e6ae4..aab4f1e 100644 --- a/cookbooks/nginx/webadm.rb +++ b/cookbooks/nginx/webadm.rb @@ -46,7 +46,17 @@ end git '/home/webadm/repo/nginx-config' do user 'webadm' repository 'https://gitea.kazu634.com/kazu634/nginx-config.git' - - not_if 'test -e /home/webadm/repo/nginx-config' end +execute '/home/webadm/repo/nginx-config/deploy.sh' do + user 'root' + cwd '/home/webadm/repo/nginx-config/' +end + +service 'consul-template' do + action :restart +end + +service 'nginx' do + action :restart +end