deploy_mate 0.18.3 → 0.18.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8015a223be95cf034bc92c203370e527b870b59a
4
- data.tar.gz: a68d6e4be14b9b7fba434ffb3ca62cded6afdbad
3
+ metadata.gz: 221d9dcd04b1b34307ac5f64f794acac59350c48
4
+ data.tar.gz: 54a6b901d5cac8605209b3a4a85d00833685a031
5
5
  SHA512:
6
- metadata.gz: f78cc6d64ad514db68e0e964d2a765bd5d9d20ef6c6410dd27d920ec6db39413376af3fc3db1860410c9cec9bd36f194ae0fad4e6f5771417f584ab7bad50b01
7
- data.tar.gz: b4cbdd8fc83c41247a7729a494db321a1762dabb330cdcd23f1f8f9b270a00c165c7c50694159b0589fe923515c003da9381af03700ae834503a5d2aeeaea6ad
6
+ metadata.gz: df7304f62064c6722b1b02c6b918ed1388b92d784509c10597269adf6d2b6c50dd478af477077172a1af95a34e4f4bbe2d1735e3533963f8b61346e9474088b4
7
+ data.tar.gz: 8aa0a62a0c22561f2f04ed8b630f926bd4cd6bde4d3d22234c5c4efc618b659c7b0ad19ab0c1ba1fe8a17b7e45d9eabc9b6d684f0de06fa8010a5d4fb36145d2
data/README.md CHANGED
@@ -29,7 +29,7 @@ It uses the following Capistrano-roles to divide the installed components:
29
29
  - **cronjobs**: [OPTIONAL] For environments where `whenever` should manage/run cronjobs
30
30
 
31
31
  ## Changelog
32
- * **0.18.3 (2016-03-22)**: Added mandatory task to install `ssh_key`s
32
+ * **0.18.4 (2016-03-22)**: Added mandatory task to install `ssh_key`s
33
33
  * **0.18.2 (2016-03-08)**: Added basic DDoS and flooding-proof via nginx `req_limit` and `fail2ban`
34
34
  * **0.18.1 (2016-03-01)**: Added support for memcached
35
35
  * **0.18 (2016-02-25)**: Added support for capistrano 3.4, Ask before overwriting existing config-files
@@ -91,3 +91,12 @@ This will bump you up to the latest repo-version.
91
91
  3. Run `cap <your-stage> machine:init` to install the needed packages.
92
92
  4. Run `cap <your-stage> machine:setup` the setup all needed configuration-files on the server
93
93
  5. Run `cap <your-stage> deploy branch=optional_branch` and be done.
94
+
95
+ ## Reinstalling SSH-Keys
96
+ If you need to redeploy SSH Keys to your server (e.g. somebody leaves your team), run:
97
+
98
+ ```
99
+ bundle exec cap <your-stage> machine:install:ssh_keys
100
+ ```
101
+
102
+ It will pull the SSH Keys from the location configured in your `deploy.rb`. You can also change it there.
data/deploy-mate.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "deploy_mate"
3
- s.version = "0.18.3"
3
+ s.version = "0.18.4"
4
4
 
5
5
  s.authors = ["Tim Adler", "Marcus Geißler", "Johannes Strampe"]
6
6
  s.date = %q{2016-03-22}
@@ -188,24 +188,26 @@ namespace :machine do
188
188
  desc "Installs new SSH Keys"
189
189
  task :ssh_keys do
190
190
  on roles(:app) do
191
- file_names = fetch(:ssh_file_names)
191
+ file_patterns = fetch(:ssh_file_names)
192
192
 
193
- puts "Installing SSH Keys from '#{file_names}'..."
193
+ puts "Installing SSH Keys from #{file_patterns.join(',')}..."
194
194
 
195
195
  keys = []
196
- Dir.glob(File.expand_path(file_names)).each do |file_name|
197
- next if File.directory?(file_name)
198
- key_as_string = File.read(file_name)
199
-
200
- if key_as_string.start_with?("ssh-rsa")
201
- keys << key_as_string
202
- puts file_name
203
- else
204
- warn "#{file_name} is NO publickey"
196
+ file_patterns.each do |file_pattern|
197
+ Dir.glob(File.expand_path(file_pattern)).each do |file_name|
198
+ next if File.directory?(file_name)
199
+ key_as_string = File.read(file_name)
200
+
201
+ if key_as_string.start_with?("ssh-rsa")
202
+ keys << key_as_string
203
+ puts file_name
204
+ else
205
+ warn "#{file_name} is NO publickey"
206
+ end
205
207
  end
206
208
  end
207
209
 
208
- fail "No ssh-keys found in #{file_names}." unless keys.any?
210
+ fail "No ssh-keys found in #{file_patterns.join(',')}." unless keys.any?
209
211
 
210
212
  upload!(StringIO.new(keys.join("")), 'new_keys')
211
213
  sudo "rm ~/.ssh/authorized_keys"
@@ -16,7 +16,7 @@ set :imagemagick, <%= @needs_imagemagick %>
16
16
  set :memcached, <%= @needs_memcached %>
17
17
  set :sidekiq, <%= @uses_sidekiq %>
18
18
 
19
- set :ssh_file_names, '<%= @ssh_file_names %>'
19
+ set :ssh_file_names, ['<%= @ssh_file_names %>']
20
20
 
21
21
  # Optionals
22
22
  # Uncomment, if needed
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deploy_mate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.3
4
+ version: 0.18.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Adler