swarm_cluster_cli_ope 0.5.3 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/lib/swarm_cluster_cli_ope/kubernetes/sync_configs/rsync.rb +15 -3
- data/lib/swarm_cluster_cli_ope/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec7a0b3dd9f3253a1e18bcb091b4e31a5de19b6304a91fe77ed4d704c9a9f109
|
4
|
+
data.tar.gz: b552969314967d155c2ddba35de7f4f809b5905830c1fb2edc20a0542879005f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64f80000c7b36cd5ef521f41939fb93060b3e94520081b33522d44ecf52cba7754022881089a981a206b230287289e19735efd9b6fdcb1acdb60e26563c2f14a
|
7
|
+
data.tar.gz: e7943eaad259b10bc0e3c6879aca2910d6a864e843d0235844eca2ef90c10c8ba7fa671b1fa2bbcbdec5041a0946abae4d96b6a49d311636f8a52dd5717a7a7a
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -50,9 +50,9 @@ module SwarmClusterCliOpe
|
|
50
50
|
if cmd.failed?
|
51
51
|
puts "Problemi nell'installazione di rsync nel pod"
|
52
52
|
else
|
53
|
-
cmd = container.cp_in(
|
53
|
+
cmd = container.cp_in(configs_path("rsyncd.conf"), "/tmp/.")
|
54
54
|
copy_1 = cmd.execute.failed?
|
55
|
-
cmd = container.cp_in(
|
55
|
+
cmd = container.cp_in(configs_path("rsyncd.secrets"), "/tmp/.")
|
56
56
|
copy_2 = cmd.execute.failed?
|
57
57
|
cmd = container.exec(['bash -c "chmod 600 /tmp/rsyncd.secrets && chown root /tmp/*"'])
|
58
58
|
chmod = cmd.failed?
|
@@ -76,11 +76,15 @@ module SwarmClusterCliOpe
|
|
76
76
|
|
77
77
|
sleep 1
|
78
78
|
|
79
|
+
# forzo i permessi sul file della password
|
80
|
+
cmd = ShellCommandExecution.new(["chmod 600 #{ configs_path("password")}"])
|
81
|
+
cmd.execute
|
82
|
+
|
79
83
|
# lanciamo il comando quindi per far rsync
|
80
84
|
rsync_command = [
|
81
85
|
"rsync -az --no-o --no-g",
|
82
86
|
"--delete",
|
83
|
-
"--password-file=#{
|
87
|
+
"--password-file=#{ configs_path("password")}"
|
84
88
|
]
|
85
89
|
|
86
90
|
if direction == :up
|
@@ -119,6 +123,14 @@ module SwarmClusterCliOpe
|
|
119
123
|
|
120
124
|
end
|
121
125
|
|
126
|
+
##
|
127
|
+
# Estrapola la path al file di configurazione
|
128
|
+
# @param [String] file
|
129
|
+
# @return [String]
|
130
|
+
def configs_path(file)
|
131
|
+
File.expand_path("../../rsync_cfgs/#{file}", __FILE__)
|
132
|
+
end
|
133
|
+
|
122
134
|
end
|
123
135
|
end
|
124
136
|
end
|