prun-ops 0.2.8 → 0.2.9
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/README.md +10 -0
- data/lib/capistrano/diagnosis.rake +8 -2
- data/lib/capistrano/prun-ops.rb +7 -0
- data/lib/prun-ops/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4cc369b566bb02ccc1fe78b58f15cbd0f4f4b141
|
|
4
|
+
data.tar.gz: 779f55d7d14fa2acb5d97844855a66c1e2cc4388
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3ee5dfdc858b45b521fb08cf2d67cf741f8a3428f7e9a3e288e7325224a204c236967a2e2b04237ccb053666d9492d74271dccbb3e70ecca2d5855e3a7e22308
|
|
7
|
+
data.tar.gz: 22c0b2437a0f2613baa87704b913dcace2913c1f58a1feb2d02377bdc14d489267f269611f83a13a09f28e3c1963b7f3b8fe4b6ce1db95db07aa791583b0ecca
|
data/README.md
CHANGED
|
@@ -54,6 +54,12 @@ server "example.com", user: 'root', roles: %w{web app db}, port: 2222
|
|
|
54
54
|
|
|
55
55
|
Note: Remember change this line in production.rb file: `config.assets.compile = true`
|
|
56
56
|
|
|
57
|
+
If you are accessing your server through a bastion you can define it:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
bastion 'bastion.example.com', user: 'user'
|
|
61
|
+
```
|
|
62
|
+
|
|
57
63
|
### Configuration
|
|
58
64
|
|
|
59
65
|
Main task is `cap [stg] config`
|
|
@@ -243,3 +249,7 @@ require 'capistrano/prun-ops'
|
|
|
243
249
|
### v0.2.0
|
|
244
250
|
|
|
245
251
|
* Configuration tasks: Add `cap stage config` and other tasks.
|
|
252
|
+
|
|
253
|
+
### v0.2.8
|
|
254
|
+
|
|
255
|
+
* Bastion command
|
|
@@ -61,6 +61,12 @@ task :rake, :remote_task do |task, args|
|
|
|
61
61
|
end
|
|
62
62
|
|
|
63
63
|
|
|
64
|
-
def run_in(host,
|
|
65
|
-
|
|
64
|
+
def run_in(host, remote_cmd)
|
|
65
|
+
cmd = %w[ssh]
|
|
66
|
+
opts = fetch(:ssh_options)
|
|
67
|
+
cmd << "-oProxyCommand='#{opts[:proxy].command_line_template}'" if opts
|
|
68
|
+
cmd << "#{host.user}@#{host.hostname}"
|
|
69
|
+
cmd << "-p #{host.port || '22'}"
|
|
70
|
+
cmd << "-tt '#{remote_cmd}'"
|
|
71
|
+
exec cmd.join(' ')
|
|
66
72
|
end
|
data/lib/capistrano/prun-ops.rb
CHANGED
|
@@ -16,3 +16,10 @@ def template(template_name, target_path)
|
|
|
16
16
|
execute "sudo cp #{tmp_file} #{target_path}"
|
|
17
17
|
execute "rm #{tmp_file}"
|
|
18
18
|
end
|
|
19
|
+
|
|
20
|
+
## Bastion config
|
|
21
|
+
def bastion(host, user:)
|
|
22
|
+
require 'net/ssh/proxy/command'
|
|
23
|
+
ssh_command = "ssh -W %h:%p -o StrictHostKeyChecking=no #{user}@#{host}"
|
|
24
|
+
set :ssh_options, proxy: Net::SSH::Proxy::Command.new(ssh_command)
|
|
25
|
+
end
|
data/lib/prun-ops/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: prun-ops
|
|
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
|
- Juan Lebrijo
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-10-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|