capistrano3-consul 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/capistrano/consul.rb +5 -1
- data/lib/capistrano/consul/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82039e309f6d3e4afe64399aed1930523c1d8ead
|
4
|
+
data.tar.gz: 1a25e17c52d5f4d3d01ec4b5be473dec592594d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b913cbe1f95f6830ed4e7f211596e72386803c4d1ff0698a348ec680e6e5282eac8df8c42041611faeeeb1853fbbf0eb12061c2e9c4f7c5659a9ba7a3ec929f
|
7
|
+
data.tar.gz: 7c1cce72c90ec4017b7f88b97130ab04df5e41bf66576a6b0c4ed6862fe730e9c2ee61233f1d238bf4f8be93193887898b8cd9a3fc407dd1edfecca569be51ef
|
data/README.md
CHANGED
@@ -39,6 +39,7 @@ consul_all_nodes roles %w{web app}
|
|
39
39
|
|
40
40
|
## Configuration
|
41
41
|
**consul_url** The api endpoint
|
42
|
+
**consul_token** The Consul token needed if an ACL is specified
|
42
43
|
**consul_ssh_gateway** You can configure an ssh gateway (i.e. a tunner that will be created before connecting to consul).
|
43
44
|
|
44
45
|
Example:
|
data/lib/capistrano/consul.rb
CHANGED
@@ -7,15 +7,19 @@ module Capistrano
|
|
7
7
|
def self.setup
|
8
8
|
return if @url
|
9
9
|
@url = fetch(:consul_url)
|
10
|
+
@token = fetch(:consul_token)
|
10
11
|
return false unless @url
|
11
12
|
@ssh_gateway = fetch(:consul_ssh_gateway)
|
12
13
|
if @ssh_gateway
|
13
|
-
@gateway = Net::SSH::Gateway.new(@ssh_gateway[:host], @ssh_gateway[:username], @ssh_gateway[:options] || {})
|
14
|
+
@gateway = Net::SSH::Gateway.new(@ssh_gateway[:host], @ssh_gateway[:username] || @ssh_gateway[:user], @ssh_gateway[:options] || {})
|
14
15
|
@gateway.open('127.0.0.1', @ssh_gateway[:port], @ssh_gateway[:port])
|
15
16
|
end
|
16
17
|
|
17
18
|
Diplomat.configure do |config|
|
18
19
|
config.url = @url
|
20
|
+
if @token
|
21
|
+
config.acl_token = @token
|
22
|
+
end
|
19
23
|
end
|
20
24
|
end
|
21
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano3-consul
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jose Fernandez (magec)
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
133
|
version: '0'
|
134
134
|
requirements: []
|
135
135
|
rubyforge_project:
|
136
|
-
rubygems_version: 2.4.5
|
136
|
+
rubygems_version: 2.4.5.1
|
137
137
|
signing_key:
|
138
138
|
specification_version: 4
|
139
139
|
summary: Plugin to use a consul server/cluster to define capistrano servers.
|