danarchy_deploy 0.2.8 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/bin/danarchy_deploy +0 -1
- data/lib/danarchy_deploy/applicator/ssl.rb +1 -1
- data/lib/danarchy_deploy/archiver.rb +1 -1
- data/lib/danarchy_deploy/system/centos.rb +1 -1
- data/lib/danarchy_deploy/system/debian.rb +1 -1
- data/lib/danarchy_deploy/system/fstab.rb +15 -5
- data/lib/danarchy_deploy/system/gentoo.rb +7 -6
- data/lib/danarchy_deploy/system/opensuse.rb +1 -1
- data/lib/danarchy_deploy/system.rb +2 -2
- data/lib/danarchy_deploy/version.rb +1 -1
- data/lib/danarchy_deploy.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1cebdd523daec796bb3189d1fce8b0f48296e575a0c84ec731a3983acf856868
|
4
|
+
data.tar.gz: aaf5be0aa79434f6982051ab9472b868f591c4e0025a2fe076210fccf94fa4be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a08ce041b150b6033e6a6d644cd4f90682479fca8c214ede36c440e02eed573a3a9508ec432d219e9ba8097e73d901253c6ed1da9c12527c590f079dcf44395
|
7
|
+
data.tar.gz: ddbcf529c9b5a5612d3e6f455017e82fa98c870244fbfe6709e480bb07b9c787ffc5fd0ed53d686de796e3256646b309fa3dbb5493d4d9d55607fdf77b8ec8d9
|
data/CHANGELOG.md
CHANGED
data/bin/danarchy_deploy
CHANGED
@@ -10,7 +10,7 @@ module DanarchyDeploy
|
|
10
10
|
|
11
11
|
tmparchive = false
|
12
12
|
if !archive[:source] && archive[:data]
|
13
|
-
archive[:source] = options[:deploy_dir] + "/.tmp_archive_#{
|
13
|
+
archive[:source] = options[:deploy_dir] + "/.tmp_archive_#{Time.now.strftime("%Y%m%d_%H%M%S")}"
|
14
14
|
tmparchive = true
|
15
15
|
data = DanarchyDeploy::Helpers.decode_base64(archive[:data])
|
16
16
|
write_tmp_archive(archive[:source], data)
|
@@ -39,11 +39,7 @@ module DanarchyDeploy
|
|
39
39
|
puts "\n > Formatting mountpoints"
|
40
40
|
|
41
41
|
fstab[:mounts].each do |mount|
|
42
|
-
fs_check
|
43
|
-
"file -sL #{mount[:filesystem]}", options
|
44
|
-
)
|
45
|
-
|
46
|
-
if fs_check[:stdout] && fs_check[:stdout] =~ /.*data$/
|
42
|
+
if fs_check(mount, options) == true
|
47
43
|
puts "\n > Formatting #{mount[:filesystem]}"
|
48
44
|
mkfs = DanarchyDeploy::Helpers.run_command(
|
49
45
|
"mkfs -t #{mount[:type]} #{mount[:filesystem]}", options
|
@@ -55,6 +51,20 @@ module DanarchyDeploy
|
|
55
51
|
!Dir.exist?(mount[:mountpoint])
|
56
52
|
end
|
57
53
|
end
|
54
|
+
|
55
|
+
def self.fs_check(mount, options)
|
56
|
+
return false if mount[:type] =~ /^nfs/
|
57
|
+
|
58
|
+
fs_check = DanarchyDeploy::Helpers.run_command(
|
59
|
+
"file -sL #{mount[:filesystem]}", options
|
60
|
+
)
|
61
|
+
|
62
|
+
if fs_check[:stdout] && fs_check[:stdout] =~ /.*data$/
|
63
|
+
return true
|
64
|
+
else
|
65
|
+
return false
|
66
|
+
end
|
67
|
+
end
|
58
68
|
end
|
59
69
|
end
|
60
70
|
end
|
@@ -49,18 +49,19 @@ module DanarchyDeploy
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def self.emerge_sync(sync, options)
|
52
|
+
puts "\n > Gentoo Emerge Sync"
|
52
53
|
if sync.nil?
|
53
|
-
|
54
|
+
install_sync_cron(sync, options)
|
54
55
|
elsif sync == false
|
55
|
-
puts "\
|
56
|
-
|
56
|
+
puts "\n - Not running emerge sync; set to: #{sync}"
|
57
|
+
install_sync_cron(sync, options)
|
57
58
|
elsif sync == true
|
58
59
|
File.delete('/var/spool/cron/crontabs/portage') if File.exist?('/var/spool/cron/crontabs/portage')
|
59
60
|
DanarchyDeploy::Helpers.run_command('emerge --sync &>/var/log/emerge-sync.log', options)
|
60
61
|
elsif sync =~ /([0-9]{1,2}|\*|\@[a-z]{4,7})/i
|
61
|
-
|
62
|
+
install_sync_cron(sync, options)
|
62
63
|
else
|
63
|
-
puts "\
|
64
|
+
puts "\n ! Unknown sync cron time: #{sync}. Not running emerge sync!"
|
64
65
|
end
|
65
66
|
end
|
66
67
|
|
@@ -73,7 +74,7 @@ module DanarchyDeploy
|
|
73
74
|
end
|
74
75
|
end
|
75
76
|
|
76
|
-
def self.
|
77
|
+
def self.install_sync_cron(sync, options)
|
77
78
|
templates = if sync.nil? || sync == false
|
78
79
|
[
|
79
80
|
{
|
@@ -25,7 +25,7 @@ module DanarchyDeploy
|
|
25
25
|
else
|
26
26
|
puts "\n - Not installing packages."
|
27
27
|
puts " |_ Packages selected: #{deployment[:packages].count}"
|
28
|
-
puts " |_
|
28
|
+
puts " |_ Install/Update: #{deployment[:system][:update]}"
|
29
29
|
end
|
30
30
|
|
31
31
|
puts "\n > #{deployment[:os].capitalize} System Updates"
|
@@ -35,7 +35,7 @@ module DanarchyDeploy
|
|
35
35
|
puts updater_result[:stdout] if updater_result[:stdout]
|
36
36
|
else
|
37
37
|
puts "\n - Not running #{deployment[:os].capitalize} system updates."
|
38
|
-
puts " |_
|
38
|
+
puts " |_ Install/Update: #{deployment[:system][:update]}"
|
39
39
|
end
|
40
40
|
|
41
41
|
if install_result || updater_result
|
data/lib/danarchy_deploy.rb
CHANGED
@@ -9,6 +9,7 @@ module DanarchyDeploy
|
|
9
9
|
require_relative 'danarchy_deploy/templater'
|
10
10
|
require_relative 'danarchy_deploy/users'
|
11
11
|
require_relative 'danarchy_deploy/version'
|
12
|
+
require 'time'
|
12
13
|
|
13
14
|
class LocalDeploy
|
14
15
|
def self.new(deployment, options)
|
@@ -26,7 +27,7 @@ module DanarchyDeploy
|
|
26
27
|
deployment = DanarchyDeploy::Users.new(deployment, options)
|
27
28
|
deployment = DanarchyDeploy::Services::Init.new(deployment, options)
|
28
29
|
|
29
|
-
deployment[:last_deploy] =
|
30
|
+
deployment[:last_deploy] = Time.now.strftime("%Y/%m/%d %H:%M:%S")
|
30
31
|
puts "\nFinished Local Deployment at #{deployment[:last_deploy]}!"
|
31
32
|
|
32
33
|
if options[:deploy_file].end_with?('.json')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danarchy_deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan James
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: danarchy_couchdb
|