Merge pull request 'Move static sites from centaurus to fornax' (#398) from chore/move_static_sites into master
Reviewed-on: #398
This commit is contained in:
commit
e3d0f8f83f
@ -77,11 +77,7 @@
|
||||
},
|
||||
"run_list": [
|
||||
"recipe[kosmos-base]",
|
||||
"recipe[kosmos_encfs]",
|
||||
"recipe[kosmos_assets::nginx_site]",
|
||||
"recipe[kosmos_kvm::host]",
|
||||
"recipe[kosmos-ejabberd::firewall]",
|
||||
"recipe[kosmos_website::default]",
|
||||
"recipe[kosmos_zerotier::firewall]"
|
||||
]
|
||||
}
|
||||
|
@ -12,15 +12,18 @@
|
||||
"hostname": "fornax",
|
||||
"ipaddress": "148.251.83.201",
|
||||
"roles": [
|
||||
|
||||
"nginx_proxy"
|
||||
],
|
||||
"recipes": [
|
||||
"kosmos-base",
|
||||
"kosmos-base::default",
|
||||
"kosmos_kvm::host",
|
||||
"kosmos_assets::nginx_site",
|
||||
"kosmos_discourse::nginx",
|
||||
"kosmos_gitea::nginx",
|
||||
"kosmos_drone::nginx",
|
||||
"kosmos_gitea::nginx",
|
||||
"kosmos_website",
|
||||
"kosmos_website::default",
|
||||
"apt::default",
|
||||
"timezone_iii::default",
|
||||
"timezone_iii::debian",
|
||||
@ -45,6 +48,8 @@
|
||||
"nginx::commons_script",
|
||||
"nginx::commons_conf",
|
||||
"kosmos-nginx::firewall",
|
||||
"git::default",
|
||||
"git::package",
|
||||
"kosmos-base::letsencrypt"
|
||||
],
|
||||
"platform": "ubuntu",
|
||||
|
@ -1,9 +1,11 @@
|
||||
name "nginx_proxy"
|
||||
|
||||
default_run_list = %w(
|
||||
kosmos_assets::nginx_site
|
||||
kosmos_discourse::nginx
|
||||
kosmos_gitea::nginx
|
||||
kosmos_drone::nginx
|
||||
kosmos_gitea::nginx
|
||||
kosmos_website::default
|
||||
)
|
||||
|
||||
env_run_lists(
|
||||
|
@ -65,3 +65,17 @@ end
|
||||
unless node.chef_environment == "development"
|
||||
include_recipe "kosmos-nginx::firewall"
|
||||
end
|
||||
|
||||
ruby_block "nginx configuration" do
|
||||
block do
|
||||
file = Chef::Util::FileEdit.new("/etc/nginx/nginx.conf")
|
||||
file.insert_line_if_no_match(/stream {/, <<-EOF
|
||||
stream {
|
||||
include /etc/nginx/streams-enabled/*;
|
||||
}
|
||||
EOF
|
||||
)
|
||||
file.write_file
|
||||
end
|
||||
notifies :reload, 'ohai[reload_nginx]', :immediately
|
||||
end
|
||||
|
@ -8,3 +8,4 @@ version '1.0.0'
|
||||
chef_version '>= 15.10' if respond_to?(:chef_version)
|
||||
|
||||
depends "kosmos-nginx"
|
||||
depends 'git'
|
||||
|
@ -4,6 +4,7 @@
|
||||
#
|
||||
|
||||
include_recipe "kosmos-nginx"
|
||||
include_recipe "git"
|
||||
|
||||
domain = node["kosmos_website"]["domain"]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user