capistrano-ubuntu 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/capistrano/tasks/ubuntu.rake +14 -7
- data/lib/capistrano/ubuntu/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5cd54a5977ac3798987382aef4ff2cc5585e75fb
|
4
|
+
data.tar.gz: 388a9e1767d8bdee9779e645b411ab011b0243f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16ed2d85b92b07753f8a99fd82938c45bcbe592facf7cb496b95003ffe072f4bfaf4a934a94daec93cbdbd00afb68ae1a289a23aeff4b67056c9dd1af5e21c92
|
7
|
+
data.tar.gz: 3090ed6f081309cb3450c2e6526b1ac62f64515ecaa8fe5df1e3e08310f50007b410835a8112e84c4daa8d8986ff8a4edcaedcb1a3c9c1ba62fbedf04f3fa19f
|
@@ -12,6 +12,7 @@ default_ubuntu_packages = %w[
|
|
12
12
|
git
|
13
13
|
lsof
|
14
14
|
ufw
|
15
|
+
ntp
|
15
16
|
]
|
16
17
|
|
17
18
|
|
@@ -24,8 +25,11 @@ namespace :ubuntu do
|
|
24
25
|
|
25
26
|
task :update_sources do
|
26
27
|
|
27
|
-
on roles(:all) do
|
28
|
-
|
28
|
+
on roles(:all) do |server|
|
29
|
+
|
30
|
+
sources = server.roles.map { |role| fetch(:"ubuntu_software_sources_for_#{role}",[])}.flatten + fetch(:ubuntu_software_sources)
|
31
|
+
|
32
|
+
sources.each do |source|
|
29
33
|
|
30
34
|
if source.is_a? Array
|
31
35
|
execute "wget --quiet -O - #{source.last} | sudo apt-key add -"
|
@@ -41,9 +45,12 @@ namespace :ubuntu do
|
|
41
45
|
|
42
46
|
task :install_packages do
|
43
47
|
|
44
|
-
packages = default_ubuntu_packages + fetch(:ubuntu_packages)
|
45
48
|
|
46
|
-
|
49
|
+
|
50
|
+
on roles(:all) do |server|
|
51
|
+
|
52
|
+
packages = server.roles.map { |role| fetch(:"ubuntu_packages_for_#{role}",[])}.flatten + fetch(:ubuntu_packages) + default_ubuntu_packages
|
53
|
+
packages.uniq!
|
47
54
|
|
48
55
|
sudo "apt-get", "-q", "-y", "update"
|
49
56
|
sudo "apt-get", "-q", "-y", "--force-yes","install", *packages.flatten
|
@@ -79,9 +86,9 @@ Unattended-Upgrade::Allowed-Origins {
|
|
79
86
|
end
|
80
87
|
|
81
88
|
|
82
|
-
before "deploy:starting", "ubuntu:update_sources"
|
83
|
-
after "ubuntu:update_sources", "ubuntu:install_packages"
|
84
|
-
after "ubuntu:install_packages", "ubuntu:unattended_upgrades"
|
85
89
|
|
90
|
+
before "ubuntu:install_packages", "ubuntu:update_sources"
|
91
|
+
after "ubuntu:install_packages", "ubuntu:unattended_upgrades"
|
92
|
+
before "deploy:starting", "ubuntu:install_packages"
|
86
93
|
|
87
94
|
|