Install and initial setup for `lsyncd`.
This commit is contained in:
parent
7ae5394e76
commit
fdfa8d05de
|
@ -60,6 +60,9 @@ include_recipe './kernel.rb'
|
||||||
# Install mc command:
|
# Install mc command:
|
||||||
include_recipe './mc.rb'
|
include_recipe './mc.rb'
|
||||||
|
|
||||||
|
# Install lsyncd command:
|
||||||
|
include_recipe './lsyncd.rb'
|
||||||
|
|
||||||
# recipes for Ubuntu 16.04
|
# recipes for Ubuntu 16.04
|
||||||
if node['platform_version'].to_f == 16.04
|
if node['platform_version'].to_f == 16.04
|
||||||
# ntp configurations
|
# ntp configurations
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
/var/log/lsyncd/*.log {
|
||||||
|
rotate 4
|
||||||
|
compress
|
||||||
|
delaycompress
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
sharedscripts
|
||||||
|
postrotate
|
||||||
|
if [ -f /var/run/lsyncd.pid ]; then
|
||||||
|
/usr/bin/systemctl restart lsyncd.service > /dev/null 2>/dev/null || true
|
||||||
|
fi
|
||||||
|
endscript
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
-----BEGIN OPENSSH PRIVATE KEY-----
|
||||||
|
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn
|
||||||
|
NhAAAAAwEAAQAAAYEAtWmcJslzZaMUgqKoFW+lWI8XLpOh6rzHHb4h6ueUDQSwk9ShrxlA
|
||||||
|
RewgJTbOUIcVEl28xXPDmNm1VKMHCRMBqvCSQVJHdVFCkLFzIX++t0n9A3tJef1GSsCc/D
|
||||||
|
g2si/TO4Vux56mkDFqp0mJk3nI2obihh78PPSJAd6ScNZDUYGP2jM33ubbeytm/qPITd5I
|
||||||
|
gEKbKgQMzKDC1VaFmwTN9idhvFS8U2dA1oVG1CtOVhAPEQ5xqY5Dwfp4FZSrnvF64DZ7UX
|
||||||
|
PKG1ww4mxonECkM2hmcRLHs/FPGXpC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XRwDOCiJ7z5Sc2huuJ5OCTnmW4yGajXo/yfX63B+suELbPk
|
||||||
|
tjO5nl6yGcgOz95V2sfkCqlvchsxYN3qTmolWD0PadK5Sno8glzyM60sGv+basfgEOBsli
|
||||||
|
GTIWv6gUA8QSVPkYFyircWMk7S7HwB1nc39B2XVdMzZkKnNKqv9yHhaEBxOzWwulUksEuN
|
||||||
|
Jge4w7RaxPRg3vAAAAEHJvb3RAYmFzdGlvbjIwMDQBAg==
|
||||||
|
-----END OPENSSH PRIVATE KEY-----
|
|
@ -0,0 +1 @@
|
||||||
|
|1|/SRt7pnr5wRdTihEn9BLVAij7X8=|AiMlTVmMn4KG3ITCPxG+iL+1Z4o= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBAej4lWqrN/bly94FQVTjNEsBxK7RiMlAkXrJQhnr6nLaLK0yEAJUHGZXF0LwnxYH9r734W6eDfQiqyqmbE2vPg=
|
|
@ -0,0 +1,30 @@
|
||||||
|
package 'lsyncd'
|
||||||
|
|
||||||
|
# Create /etc/sudoers.d/
|
||||||
|
%w( /etc/lsyncd /var/log/lsyncd ).each do |d|
|
||||||
|
directory d do
|
||||||
|
owner 'root'
|
||||||
|
group 'root'
|
||||||
|
mode '755'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
directory '/root/.ssh/' do
|
||||||
|
owner 'root'
|
||||||
|
group 'root'
|
||||||
|
mode '0700'
|
||||||
|
end
|
||||||
|
|
||||||
|
%w(id_rsa known_hosts).each do |f|
|
||||||
|
remote_file "/root/.ssh/#{f}" do
|
||||||
|
owner 'root'
|
||||||
|
group 'root'
|
||||||
|
mode '600'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
remote_file '/etc/logrotate.d/lsyncd' do
|
||||||
|
owner 'root'
|
||||||
|
group 'root'
|
||||||
|
mode '644'
|
||||||
|
end
|
Loading…
Reference in New Issue