Add `everun` recipe.
This commit is contained in:
parent
227ddd9362
commit
4aaecfdcfd
|
@ -0,0 +1,9 @@
|
|||
# -------------------------------------------
|
||||
# Specifying the default settings:
|
||||
# -------------------------------------------
|
||||
node.reverse_merge!({
|
||||
'everun' => {
|
||||
'FQDN' => 'everun.club',
|
||||
'production' => true
|
||||
}
|
||||
})
|
|
@ -0,0 +1,5 @@
|
|||
include_recipe './attributes.rb'
|
||||
|
||||
if node['everun']['production']
|
||||
include_recipe './nginx.rb'
|
||||
end
|
|
@ -0,0 +1 @@
|
|||
@reboot webadm cp -pr /home/webadm/works/everun/* /var/www/everun/
|
|
@ -0,0 +1,38 @@
|
|||
# Create the nginx directory:
|
||||
%w( everun test-everun ).each do |d|
|
||||
directory "/var/www/#{d}" do
|
||||
owner 'www-data'
|
||||
group 'webadm'
|
||||
mode '770'
|
||||
end
|
||||
end
|
||||
|
||||
# Add the fstab entry:
|
||||
file '/etc/fstab' do
|
||||
action :edit
|
||||
|
||||
block do |content|
|
||||
content << "tmpfs /var/www/everun tmpfs size=250m,noatime 0 0\n"
|
||||
end
|
||||
|
||||
not_if 'grep /var/www/everun /etc/fstab'
|
||||
|
||||
notifies :run, 'execute[mount -a]'
|
||||
end
|
||||
|
||||
execute 'mount -a' do
|
||||
action :nothing
|
||||
end
|
||||
|
||||
remote_file '/etc/cron.d/everun' do
|
||||
owner 'root'
|
||||
group 'root'
|
||||
mode '644'
|
||||
end
|
||||
|
||||
# Create storage directory for blog data
|
||||
directory '/home/webadm/works/everun' do
|
||||
owner 'webadm'
|
||||
group 'webadm'
|
||||
mode '775'
|
||||
end
|
Loading…
Reference in New Issue