Compare commits
2 Commits
2063cf2f6c
...
f122269855
Author | SHA1 | Date |
---|---|---|
Kazuhiro MUSASHI | f122269855 | |
Kazuhiro MUSASHI | 6fe04fdaa0 |
|
@ -1,5 +1,5 @@
|
||||||
case node['platform_version']
|
case node['platform_version']
|
||||||
when "18.04", "20.04", "22.04"
|
when "18.04", "20.04", "22.04", "24.04"
|
||||||
execute 'timedatectl set-timezone Asia/Tokyo' do
|
execute 'timedatectl set-timezone Asia/Tokyo' do
|
||||||
not_if 'timedatectl | grep Tokyo'
|
not_if 'timedatectl | grep Tokyo'
|
||||||
end
|
end
|
||||||
|
|
|
@ -45,7 +45,7 @@ when "18.04"
|
||||||
not_if 'test -e /var/log/cron-apt/log'
|
not_if 'test -e /var/log/cron-apt/log'
|
||||||
end
|
end
|
||||||
|
|
||||||
when '20.04', '22.04'
|
when '20.04', '22.04', '24.04'
|
||||||
%w(20auto-upgrades 50unattended-upgrades).each do |conf|
|
%w(20auto-upgrades 50unattended-upgrades).each do |conf|
|
||||||
remote_file "/etc/apt/apt.conf.d/#{conf}" do
|
remote_file "/etc/apt/apt.conf.d/#{conf}" do
|
||||||
owner 'root'
|
owner 'root'
|
||||||
|
|
|
@ -3,8 +3,9 @@
|
||||||
# -------------------------------------------
|
# -------------------------------------------
|
||||||
node.reverse_merge!({
|
node.reverse_merge!({
|
||||||
'nginx' => {
|
'nginx' => {
|
||||||
'version' => '1.25.0',
|
'version' => '1.26.0',
|
||||||
'skip_lego' => 'true',
|
'skip_lego' => true,
|
||||||
'skip_webadm' => 'true'
|
'skip_webadm' => false,
|
||||||
|
'skip_deploy_conf' => true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -78,7 +78,7 @@ directory MODULEDIR do
|
||||||
end
|
end
|
||||||
|
|
||||||
# Build starts here:
|
# Build starts here:
|
||||||
execute "#{NGINXBUILD} -d working -v #{version} -c configure.sh -zlib -pcre -libressl -libresslversion 3.8.0" do
|
execute "#{NGINXBUILD} -d working -v #{version} -c configure.sh -zlib -pcre -libressl -libresslversion 3.9.1" do
|
||||||
cwd WORKDIR
|
cwd WORKDIR
|
||||||
user USER
|
user USER
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,13 @@ end
|
||||||
# Prerequisites for Building nginx:
|
# Prerequisites for Building nginx:
|
||||||
if !node['nginx']['skip_webadm']
|
if !node['nginx']['skip_webadm']
|
||||||
include_recipe './webadm.rb'
|
include_recipe './webadm.rb'
|
||||||
|
end
|
||||||
|
|
||||||
|
# Build nginx:
|
||||||
|
include_recipe './build.rb'
|
||||||
|
|
||||||
|
# Check whether to deploy the nginx confings:
|
||||||
|
if !node['nginx']['skip_deploy_conf']
|
||||||
include_recipe '../blog/default.rb'
|
include_recipe '../blog/default.rb'
|
||||||
include_recipe '../everun/default.rb'
|
include_recipe '../everun/default.rb'
|
||||||
end
|
end
|
||||||
|
@ -44,9 +51,5 @@ if !node['nginx']['skip_lego']
|
||||||
include_recipe './lego.rb'
|
include_recipe './lego.rb'
|
||||||
end
|
end
|
||||||
|
|
||||||
# Build nginx:
|
|
||||||
include_recipe './build.rb'
|
|
||||||
|
|
||||||
# Setup nginx:
|
# Setup nginx:
|
||||||
include_recipe './setup.rb'
|
include_recipe './setup.rb'
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,7 @@ end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Create `repo` directory:
|
# Create `repo` directory:
|
||||||
|
if !node['nginx']['skip_deploy_conf']
|
||||||
git '/home/webadm/repo/nginx-config' do
|
git '/home/webadm/repo/nginx-config' do
|
||||||
user 'webadm'
|
user 'webadm'
|
||||||
repository 'https://github.com/kazu634/nginx-config.git'
|
repository 'https://github.com/kazu634/nginx-config.git'
|
||||||
|
@ -60,4 +61,4 @@ end
|
||||||
service 'consul-template' do
|
service 'consul-template' do
|
||||||
action :restart
|
action :restart
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# -------------------------------------------
|
# -------------------------------------------
|
||||||
|
|
||||||
case run_command('grep VERSION_ID /etc/os-release | awk -F\" \'{print $2}\'').stdout.chomp
|
case run_command('grep VERSION_ID /etc/os-release | awk -F\" \'{print $2}\'').stdout.chomp
|
||||||
when "20.04", "22.04"
|
when "20.04", "22.04", "24.04"
|
||||||
cmd = 'LANG=C ip a | grep "inet " | grep -v -E "(127|172)" | cut -d" " -f6 | perl -pe "s/\/.+//g"'
|
cmd = 'LANG=C ip a | grep "inet " | grep -v -E "(127|172)" | cut -d" " -f6 | perl -pe "s/\/.+//g"'
|
||||||
|
|
||||||
when "18.04"
|
when "18.04"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# Specifying the default settings:
|
# Specifying the default settings:
|
||||||
# -------------------------------------------
|
# -------------------------------------------
|
||||||
case run_command('grep VERSION_ID /etc/os-release | awk -F\" \'{print $2}\'').stdout.chomp
|
case run_command('grep VERSION_ID /etc/os-release | awk -F\" \'{print $2}\'').stdout.chomp
|
||||||
when "20.04", "22.04"
|
when "20.04", "22.04", "24.04"
|
||||||
cmd = 'LANG=C ip a | grep "inet " | grep -v -E "(127|172)" | cut -d" " -f6 | perl -pe "s/\/.+//g"'
|
cmd = 'LANG=C ip a | grep "inet " | grep -v -E "(127|172)" | cut -d" " -f6 | perl -pe "s/\/.+//g"'
|
||||||
|
|
||||||
when "18.04"
|
when "18.04"
|
||||||
|
|
Loading…
Reference in New Issue