itamae-plugin-recipe-nginx_build 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ddf76e85ddac516da9b395b7823fc14a5b221cc3
4
- data.tar.gz: 0ca8dddcd9a98ba1408b3afcd2dbe0eace415ee2
3
+ metadata.gz: 9905ee5adcfe92fc7e7dad7c4c720f2cf72d9357
4
+ data.tar.gz: 38a8a082bcbd32a2d1a04d24a289d745d8d45994
5
5
  SHA512:
6
- metadata.gz: 0a87fe5126e5e86443168630a352fc00feb06fe9a664882776f6d64d00ba094bbb094ef70e005a17c1aeea34984071e0f55df361b528d0f651219a3b955a5829
7
- data.tar.gz: 85b6e4c039d63aebb6410745bf87ae923d904e574cb455d2f4e0c36c60a8dba1ce18bef24a4f97d2cafa5c55e1259ee96047c8b58e2181aabbc467d937f1ba20
6
+ metadata.gz: 263669a2de224ff9439e37f9bf9eb4d2742ca95a6131ffdcb1423369f9d50c3ca88c1c18e9afafd8775f3703f6c72e3999950a3812325b4003929919a9b85b84
7
+ data.tar.gz: 0c76e653d463643aa47289913541213b0012a89e71d8cd23fd7c6db15942717786773e51a7833b615aa545ceee6619aaea63860df6e2a403775461be021cdc8f
@@ -31,7 +31,7 @@ nginx_modules3rds = node[:nginx_build][:modules3rds] if node[:nginx_build] && no
31
31
  nginx_version = "1.8.0"
32
32
  nginx_version = node[:nginx_build][:nginx_version] if node[:nginx_build] && node[:nginx_build][:nginx_version]
33
33
 
34
- build_user = "ec2-user"
34
+ build_user = node[:server][:user]
35
35
  build_user = node[:nginx_build][:build_user] if node[:nginx_build] && node[:nginx_build][:build_user]
36
36
 
37
37
  if configure_path =~ /^(.+)\/([^\/]+)$/
@@ -68,9 +68,10 @@ if modules3rd_path =~ /^(.+)\/([^\/]+)$/
68
68
  end
69
69
 
70
70
  execute "build-nginx" do
71
- command "#{nginx_build_bin}nginx-build -d work -v #{nginx_version} -c #{configure_path} -m #{modules3rd_path} && cd ~/work/nginx/#{nginx_version}/nginx-#{nginx_version} && sudo make install"
71
+ command "#{nginx_build_bin}nginx-build -d work -v #{nginx_version} -c #{configure_path} -m #{modules3rd_path} && \
72
+ cd ~/work/nginx/#{nginx_version}/nginx-#{nginx_version} && sudo make install"
72
73
  user build_user
73
- # action :nothing
74
+ action :nothing
74
75
  end
75
76
 
76
77
  template "/etc/init.d/nginx" do
@@ -83,8 +84,11 @@ template "/etc/init.d/nginx" do
83
84
  "nginx_conf" => nginx_conf,
84
85
  "nginx_pid" => nginx_pid,
85
86
  })
87
+ notifies :enable, 'service[nginx]', :delayed
88
+ notifies :start, 'service[nginx]', :delayed
86
89
  end
87
90
 
88
91
  service 'nginx' do
89
92
  action [:enable, :start]
90
- end
93
+ only_if "test -f #{nginx_sbin}"
94
+ end
@@ -2,6 +2,11 @@
2
2
  [<%=m[:name]%>]
3
3
  form=<%=m[:form]%>
4
4
  url=<%=m[:url]%>
5
- rev=<%=m[:rev]%>
6
-
7
- <% end %>
5
+ rev=<%=m[:rev] || 'master'%>
6
+ <% if m[:shprov] -%>
7
+ shprov=<%=m[:shprov]%>
8
+ <% end -%>
9
+ <% if m[:shprovdir] -%>
10
+ shprovdir=<%=m[:shprovdir]%>
11
+ <% end -%>
12
+ <% end -%>
@@ -2,7 +2,7 @@ module Itamae
2
2
  module Plugin
3
3
  module Recipe
4
4
  module NginxBuild
5
- VERSION = "0.1.1"
5
+ VERSION = "0.1.2"
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itamae-plugin-recipe-nginx_build
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - zaru