Ensure to satisfy the prerequisites.
This commit is contained in:
parent
380b464d42
commit
70c90a18e2
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"insecure-registries" : ["reg.kazu634.com"]
|
||||
}
|
|
@ -19,4 +19,10 @@ execute 'apt-get update' do
|
|||
not_if 'which docker'
|
||||
end
|
||||
|
||||
package 'docker-ce'
|
||||
%w(docker-ce docker-ce-cli containerd.io).each do |p|
|
||||
package p
|
||||
end
|
||||
|
||||
service 'docker' do
|
||||
action :nothing
|
||||
end
|
||||
|
|
|
@ -1,7 +1,16 @@
|
|||
# Ignore the certificate
|
||||
remote_file '/etc/docker/daemon.json' do
|
||||
owner 'root'
|
||||
group 'root'
|
||||
mode '0600'
|
||||
|
||||
notifies :restart, 'service[docker]'
|
||||
end
|
||||
|
||||
# install `cifs-utils`
|
||||
package 'cifs-utils'
|
||||
|
||||
%w( /mnt/backup /var/spool/apt-mirror ).each do |d|
|
||||
%w( /mnt/shared /var/spool/apt-mirror ).each do |d|
|
||||
directory d do
|
||||
owner 'root'
|
||||
group 'root'
|
||||
|
@ -13,23 +22,13 @@ file '/etc/fstab' do
|
|||
action :edit
|
||||
|
||||
block do |content|
|
||||
content << "//192.168.10.200/Shared/AppData /mnt/backup cifs username=admin,password=Holiday88,uid=root,gid=root,file_mode=0777,dir_mode=0777,vers=3.0,_netdev 0 0\n"
|
||||
content << "//192.168.10.200/Shared/AppData /mnt/shared cifs username=admin,password=Holiday88,uid=root,gid=root,file_mode=0777,dir_mode=0777,vers=3.0,_netdev 0 0\n"
|
||||
end
|
||||
|
||||
not_if 'grep backup /etc/fstab'
|
||||
not_if 'grep shared /etc/fstab'
|
||||
end
|
||||
|
||||
file '/etc/fstab' do
|
||||
action :edit
|
||||
|
||||
block do |content|
|
||||
content << "//192.168.10.200/Shared/PXEBoot/www/ubuntu/apt-mirror /var/spool/apt-mirror cifs username=admin,password=Holiday88,uid=root,gid=root,file_mode=0777,dir_mode=0777,vers=3.0,_netdev 0 0\n"
|
||||
end
|
||||
|
||||
not_if 'grep apt-mirror /etc/fstab'
|
||||
end
|
||||
|
||||
execute 'mount -a'
|
||||
execute 'mount -a || true'
|
||||
|
||||
# Deploy the cron.d file:
|
||||
remote_file '/etc/cron.d/docker-housekeep' do
|
||||
|
|
Loading…
Reference in New Issue